Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 1.85 KB

README.md

File metadata and controls

53 lines (37 loc) · 1.85 KB

Rails Best Practices Boilerplate 2022

Ruby on Rails boilerplate configured with the most useful gems and best practices. It comes with the latest Ruby (v3.1.3) and Rails(v7.0.2) versions as of September 2022.

This boilerplate consists of the following

  1. User Authentication with Routes using JWT tokens (devise & devise-jwt).
  2. Dockerfiles & Docker-Compose files for both local & production environments
  3. Configured Database - Postgres
  4. Parameter validations using rails-param
  5. bullet gem for N+1 query finder
  6. Case conversion of incoming & outgoing data using oj & olive_branch
  7. dot-env gem for loading Environment files
  8. whenever gem for Cron Jobs
  9. activerecord-import for bulk save & update queries
  10. This repo also contains few best practices to follow.

Refer to the following article to understand the best practices in detail: Ruby on Rails - Best Practices Every Developer Should Know

Prerequisites

  • Ruby - v3.1.2
  • Docker - (Optional, but good to have)

How to Run

1. Using Docker

docker compose up -d

Rails application will be running at localhost:8085

2. Non-Docker method

Configure your local Postgres instance and make changes accordingly in the .env.development file

DB_HOST=...
DB_USER=...
DB_PASSWORD=...
DB_PORT=...

Then run the following command:

rails s

Rails application will be running at localhost:8080