I still have my Rails application running at www.gixtra.com. What drives me away from a full Rails solution is growing amount of frontend JS code and the lack Rails had in keeping up. It has become better recently, but I would just love to separate my frontend stuff from the backend. After trying to use Rails with vuejs within the Rails application — even with the now available support for real JS tools and the overdue death of the “asset pipeline” — it has been tedious and felt hacky (like hydrating vuejs components by injecting Rails objects into HTML tags in the view).

And once I wanted a separate codebase for frontend, I needed JWT handling (or similar things). I first tried to do it myself (using Devise and gems for token handling), but it is a pain and hard to do right (and secure). So I looked to Firebase Auth for the auth part only.

I moved away from Firebase, because it had been in beta for too long. And even now it seems many things are still not possible on Firebase. If you only use the auth solution, it will be fine. But I then wanted to use the hosting for my frontend and move to the Firestore database over the long term. Especially the DB triggers looked promising to me as Rails is very lacking in that manner. My app often has to notify people if an object in the DB changed. But Firestore is very limited in capability, while DynamoDB (AWS) is — while not feature complete — a lot more versatile and practical.

My plan on AWS is this:

First I built a new frontend for my application. I use Cognito to have a single-sign on for both the old Rails frontend and the new (not yet feature complete) JS frontend. This let’s my customers transition smoothly and only when they’re ready. The new frontend will also be snappier and have offline capabilities (thanks to AppSync). The data and business logic will still come from Rails. I connect the frontend via AppSync to Rails, which allows the frontend to use a GraphQL interface, while I delegate that to the REST interface of the Rails application.

Over time I want to replace and augment certain parts of the Rails backend with Lambda functions. Some data could also move to AWS, while the graphql interface to the frontend remains unchanged :). I can use the fancy capabilities of DynamoDB or even the AI stuff AWS offers.

Also I’m looking to have a nice deployment pipeline either via AWS Amplify Console or via serverless and circleci. The former would be preferred, but AWS Amplify is also still pretty beta.

To sum it up: my customers are still on the full-stack Rails app. But I’m moving auth to Cognito (which should go largely unnoticed by my customers) and I’m preparing an improved frontend built with vuejs. Feel free to prompt me to check, whether my plans worked out or whether I might have run into dead ends with AWS as well :).

Written by

Agile Coach, Business Innovator, Software Engineer, Musician

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store