Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monolith Template

This repository serves as a default template for a monolithic Ruby on Rails (RoR) application. It includes a pre-configured setup with essential gems and tools to streamline development.

Table of Contents

Installation

Clone the repository

git clone https://github.com/Grigore-George-Mihai/default_template_r8

Setup

1. Rename the Application

This will update the app name everywhere it appears (module name, titles, DB names, cable prefixes, Docker volumes, etc.).

bin/rails setup:rename_app

2. Create Environment Files

Copy environment template files into .env.development and .env.test.

bin/rails setup:copy_env

Then open each file and update values as needed:

  • Database credentials (POSTGRES_USER, POSTGRES_PASSWORD)
  • Any other environment-specific variables

3. Set Up the Database

bin/rails db:prepare   # Creates and migrates the database
bin/rails db:seed      # Loads seed data

4. Optional Integrations

  • Devise — Adjust configuration in config/initializers/devise.rb if needed.
  • Scout APM — Add your SCOUT_KEY value in .env.development (or the appropriate .env file) to enable. If left blank, ScoutAPM stays disabled.
  • Rollbar — Add your ROLLBAR_ACCESS_TOKEN value in .env.development (or the appropriate .env file) to enable. If left blank, Rollbar stays disabled.
  • PgHero - Add shared_preload_libraries = 'pg_stat_statements' to postgresql.conf and restart the database. if left blank, PgHero stays disabled.

✅ You’re now ready to start development!


Gems

Database and Monitoring

  • Pg: PostgreSQL driver for Ruby, providing fast and efficient database connectivity.
  • PgHero: A tool for monitoring PostgreSQL database performance, including query insights, index suggestions, and table size analysis.
  • Pagy: Fast and lightweight pagination library. Use pagy(:offset, collection) in controllers; render with @pagy.series_nav in views.

Authentication

  • Devise: Flexible authentication solution for Rails based on Warden.

Background Processing

  • Sidekiq: Efficient background processing for Ruby applications.
  • Sidekiq-Scheduler: Extends Sidekiq to support scheduled and recurring jobs using a simple configuration.
  • Redis: In-memory data structure store used by Sidekiq for managing background job queues, scheduling, and retries.

Performance Monitoring

Error Tracking

  • Rollbar: Real-time error tracking and reporting.

Code Quality & Linting

  • Rubocop Rails Suite: A custom suite that bundles Rubocop with various plugins for Rails projects.

Testing

Security

  • Brakeman: Static analysis tool for finding security vulnerabilities in Rails applications.
  • Bundler Audit: Scans your Gemfile for known vulnerabilities.

Development Utilities

  • Letter Opener Web: Preview sent emails in the browser during development at /letter_opener.

Environment Management


Docker Setup

If you prefer to run the application inside a Docker container, follow these steps:

  1. Build the Docker image:
docker-compose build
  1. Start the Application and services:
docker-compose up
  1. Stop the Application:
docker-compose down
  1. Remove named Volumes:
docker-compose down --volumes

Contact

For questions or further information, feel free to reach out via LinkedIn.

About

Monolithic Ruby on Rails (RoR 8.1.3.1) application

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages