2.5.12 Decouple the front-end and back-end code
Related to the audit.
The front-end code should be extracted in a separate project / repository. All front-end tests done by the Ruby on Rails application will be rewritten with vitest or another integration testing utility, which will bring speed to both the back-end deployment pipeline. This will require a new API authentication system for the JavaScript client application to work, but will greatly improve both JavaScript and Ruby developers experiences.
Well, this one is tough, but having custom clients was an idea from the beginning, hence the kind of duplication between the Cucumber tests, the Vue components tests, presence of an OpenAPI documentation, etc... But no time was ever spent on this decoupling.
As the app works as is, that's not a priority but definitely something we should tackle one day or another.
After a few seconds of thinking, here's what I see:
- extract all the app frontend in another repo.
- admin is fine as it is: Rails views are ok for now and I don't think we need dedicated apps.
- implement support for JWT tokens (there's a gem about it and Devise somewhere)
- create more API endpoints to move some logic from the current frontend to the backend
- maybe create a JS package with some logic in it (thinking about the map), so it can be reused by other JS clients
- be able to test the client with data easily (special emphasis on this point)
- ...
If you're interested to work on this, please reach us on Matrix so we can discuss on the subtasks and overall architecture.