I'm building my first Rails App and I want it to consume everything from a REST API. What I want to do is to have Rails serve my web application as a frontend to my API. As far as I've read (I'm staring with Rails right now), Rails has a lot of potential with ORMs and direct access to database systems. My platform, on the other hand, is designed in such a way that every layer is accessed via a defined interface (in this case a REST API), so no databases are read from any client, but via their interfaces.
For example, my API exposes the following resource:
https://api.example.com/v1/users/feature-xxx [GET]
And I want my web app to have a page like:
https://example.com/feature
So the users will visit this URL and when logged in, the Rails app will request the data to generate this dynamic content from my API.
The question is:
- What are the necessary steps for my Rails Application to consume its data from a HTTP/Rest Backend? and,
- Is this a good design for a Rails app?
Thanks!