A boilerplate for quickly setting up a Rails API:
- Ruby (3.4.1)
- Rails (8.0.2)
- PostgreSQL
- Sidekiq, Redis
- Devise, Devise JWT
- Swagger
- Sentry
- RSpec
Follow these steps to install and start the application:
- Install ruby
3.4.1
rbenv install 3.4.1
rbenv local 3.4.1
ruby -v- Install gems:
gem install bundler
bundle install- Add
config/database.ymlfile (reference:config/database.yml.sample) - Add
.envfile (reference:.env.sample) - Generate new rails master key
rm -f config/credentials.yml.enc && rm -f config/master.key && EDITOR=vim bin/rails credentials:edit- Database setup:
bin/rails db:setup- Start server:
bin/rails s
bundle exec sidekiqSpecs
bundle exec rspecCheck the coverage at coverage/index.html
API Doc
bin/rake rswagCheck the generated document at http://localhost:3000/docs
Security Vulnerability Scanner
bundle exec brakemanLinter With Rubocop
bundle exec rubocopLicensed under the MIT license, see the separate LICENSE.md file.