Open alicewriteswrongs opened 8 years ago
ok radical idea
I don't really want to re-use very much of the code / stuff that's already here
what if I just ran rails new
on a new Rails 5 app?
what if I did?
I might.
I started the process here: #26
basically that will just get us a clean rails 5 app.
then we're going to start porting things over, starting with just the models and controllers (and migrations, obviously).
It's been a little while since I made any progress on this.
Here's what I'm currently thinking about how to architect this application.
Backend
The backend is Beauvoir, a Rails app running atop Postgres and deployed on Heroku. Rails serves up some administrative pages, but doesn't concern itself with the serious frontend stuff (Simone).
Beauvoir exposes a number of resources as RESTful API endpoints, including sales, sales history, book searches, user login/authentication, etc.
Beauvoir currently sits at Rails 4.2 - I may bump it up to 5 for the new features that make API building easier.
Frontend
A separate nodejs/express app (Simone) serves up the React + React-router + Redux frontend. We authenticate to Beauvoir using OAuth or similar (I believe Devise has support for this). Sales, reporting, etc are all handled w/ Simone.
I think the idea is to initially build just the register page in Simone (the piece of the UI that will get the most use) and initially just use haml and so on within Beauvoir for other functions. Then we can gradually migrate more functionality to Simone once the register is totally solid.
Simone will be an express app, to make it easy to serve up the webpack bundled JS file and any other assets. We'll probably deploy this to heroku as well.
Steps to get there
I think that's it!