This repos is related to a Ruby on rails template, it add dependencies and configuration to make your rails api projet ready to code. No additional configuration is required
build with ruby 3.0.2
and rails 7.0.4
- Devise-jwt for api authentification based on Jwt token
- Pundit to manage authorizations
- Rack-cors to avoid cors error (development setup only)
- Annotate to add sql column on models, specs and factories
- Letter Opener to preview mail in development
- Rubocop Rails linter and config for rails project
- FactoryBot Rails great spec fixtures with config
- Rspec Rails great testing framework with config
- Database Cleaner to avoid data conflict in test
- Webmock to mock api requests during test
- Siplecov for spec coverage metrics
- Faker for random test data
- Byebug for debug breaking point (because I prefer it to the official debugger)
git clone git@github.com:Eth3rnit3/rails_api_template.git
rails new my_app -T -J --database=postgresql --api -m ./rails_api_template/template.rb
cd my_app
# Without docker
rails s
# With docker
docker-compose up -d --build && docker-compose logs -f --tail=100
Template will ask you to dockerize app, it will configure docker image for api, worker and database (if db adapter is compatible with this template).
Adapter | Compatible | Version |
---|---|---|
postgresql | ✅ | 12.1 |
mysql | ✅ | 5.7 |
sqlite3 | ✅ | 3 |
oracle | ❌ | - |
sqlserver | ❌ | - |
jdbcmysql | ❌ | - |
jdbcsqlite3 | ❌ | - |
jdbcpostgresql | ❌ | - |
jdbc | ❌ | - |