Rails app with the defaults I like to build with :)
- users
- accounts
- admin/users
- code standards
- github actions
- health check
git clone git@github.com:candland/rails-starter-7.git new_project
Change database names in database.yml
rg -l 'RailsStarter7' | xargs -n 1 sed -i '' -e 's/RailsStarter7/NewProject/g'
rg -l 'RAILS_STARTER_7' | xargs -n 1 sed -i '' -e 's/RAILS_STARTER_7/NEW_PROJECT/g'
rg -l 'rails_starter_7' | xargs -n 1 sed -i '' -e 's/rails_starter_7/new_project/g'
rg -l 'rails-starter-7' | xargs -n 1 sed -i '' -e 's/rails-starter-7/new-project/g'
rg -l 'Rails Starter 7' | xargs -n 1 sed -i '' -e 's/Rails Starter 7/New Project/g'
rg -i 'rails[- _]*starter[- _]*7'
bundle install
yarn install
bin/rails db:create
bin/rails db:migrate
- Ruby version: 3.1
- postgresql
- redis
- nodejs
- yarn
Credential files.
jwt_secret:
secret_key_base:
rails db:create
rails db:migrate
rails test
overcommit --sign
overcommit --sign --pre-commit
overcommit --install
Run code converage
COVERAGE=1 rails test
That will output a report to converage/index.html. Use CI=1
to output JSON for continuous itegration.
- Exception Notification
- Minitest Spec
- FactoryBot
- OverCommit
- Guard
- Guard Minitest
- Annotate
- Faker
- Letter Opener
- Solargraph
- Ordinare
- Slim Lint
- Standard
- StandardJS
- StyleLint
- VCR
- Webmock
- Simplecov
- Brakeman
- Services
- Policy
- Worker
- Scaffold
curl -v -H 'content-type: application/json' -d '{"email":"candland+xyz@gmail.com","password":"password"}' 'localhost:3000/api/v1/auth'
{"token":"eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiYTUyZjgzNDItZWQzZC00NzlkLThkZWEtODYzMTI5OTk5OGM0In0.iZPRhTwCnudSV_dxzNmhe_CuMc5fiFd0RRHcsGkLr0Q"}
curl -v -H 'content-type: application/json' -H 'authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiYTUyZjgzNDItZWQzZC00NzlkLThkZWEtODYzMTI5OTk5OGM0In0.ZE0P602LJLKFwTlvOtnMZ6clF-QpqVY0q7P-7KP3-9k' 'localhost:3000/api/v1/me'