Grape as Ruby REST API Starter Boilerplate (Grrapi)
The objective of this project is to enable super fast & amazing architected development and deployment of REST API projects using Ruby (and Grape as API micro framework) as server side language. You can learn all the benefits Grrapi(Grape as Ruby REST API) will give to you through this documentation.
To be more cleaner, I was tired of moving along pieces of code through all new API project I started, so I decided to create a minimal API starter boilerplate for my projects, and this saved me A LOT of time. (And not only time, but wasted time, cuz I will need to develop again e again things that I've implemented before, so it's not super funny time, and this get worse when you don't have such too much time to spend configurating and doing things that you can automatized to get results faster).
Table of Contents
- 1 minute overview
- How to use
- Server Dependencies
- What's included in this starter project
- User Session Management
- Project Organization (for real)
- Rake Tasks
- How it Works
- Deeper Look
- License - MIT
1 minute overview
So ok, are you running of time as a usual and you need to convice your brain that this project deserve the required attention. Fair enough.
So to quickly sumarize: This projects is mounted as a Rails application, but uses Grape as HTTP requests handling. The code is projected to be very modular and well versioned (and documented too).
Just by using this template, you can save weeks of work from your team, this mean gaining a little more of chance to be on air soon, since the development process is acelerated by this pre defined application structure.
Current implemented features:
|modular, standartized and versioned application codebase|
|fully local/system(email/password) user registration and login|
|forces users to confirm their email address before logging|
|social integrations for login and registrations. Currently supports Facebook and Google Plus|
|request password reset e-mail [configurable]|
|endpoint to update user password (with validations)|
|hard or soft delete of user data|
|for heroku our cloud(such AWS, Digital Ocean)|
|use system environment variables to ocnfigure sensitive application configurations|
|use this AngularJS project as basic starter point for client applications|
Things exposed above are really time taking in most of projects, because almost every product have this same key necessities(eg: configuration, deployment) and features(such login, password management, registration). By using Ruby API Starter (Grapi) you can save weeks of work with a very well structured base boilerplate for your projects by starting and deploying your application in matter of minutes.
Interested? Procced to Acknowledgements
How it Works
The project glues all components together and delegate HTTP flow of request-response to Grape
user -> rack -> puma -> rails -> grape -> service -> serializer -> response
◽️Create demo application with Postman collection available
Bug reports and pull requests are welcome on GitHub at http://github.com/fidelisrafael/Grape-as-Ruby-REST-API-Starter-Boilerplate. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.