This is very opinionated template for Rails and React application, powered by Relay(modern).
Please don't different namings, this is amalgamation of my various projects.
Powered by:
- Rails 7
- Rspec and factory_bot for testing
- React 18 and Relay Modern (Typescript and Suspense)
- Tailwind CSS
Features:
- User authentication
- User authentication with Google Identity Service
- Model versioning with PaperTrail
- Graphql API (Relay compatible). Directly build node from postgres table
- Bugsnag integration
- LogDNA integration (with lograge)
- Background job with good_job (run on your postgres)
- File upload with ActiveStorage
- Spoof user for testing (to test as different user).
- Code coverage with simplecov
- Encrypted GraphQL ID's
Backend
- Copy master.key to niaum-api/config
- Install dependencies using
bundle install - Setup database using
rails db:setup && RAILS_ENV=test rails db:setup - Run test using
rspecorCOV=1 rspecfor coverage - Start server using
rails s
Frontend
- Install dependencies using
yarn install - Start dev process using
yarn dev - Start server using
yarn web
Deployment
- Backend
web: bundle exec puma -C config/puma.rb worker: bundle exec good_job start --poll-interval=5 --max-cache=50 --enable-cron
- Frontend