Modern Rails Template

screenshot of Modern Rails Template

A modern Rails new template for modern developers

Overview

The Modern Rails Template is a Rails template developed by a freelance developer for Rails 5.2 projects. Its goal is to provide an easy way to start a new Rails application with modern and efficient configurations and defaults. While the project is still a work in progress, contributions, ideas, and help are welcome. The template is inspired by a template developed by Matt Brictson.

Features

  • Standard configuration: Changes the default generators config, sets up I18n for English and French, improves the main layout to include webpack in the asset pipeline, and creates a basic PagesController.
  • Linters: Adds Javascript (ESLint) and CSS (Stylelint) linters with webpack.
  • Gems: Adds and configures various gems such as friendly_id for slugging, annotate for adding useful comments in models, bullet to track N+1 queries, and rails_erd to generate a schema of database relationships. It also adds and configures sidekiq for background jobs and rubocop for style and brakeman for security with overcommit git hooks.
  • Development and debugging tools: Adds livereload for view and automatic bundle installs using guard, guard-livereload, and guard-bundler. Also includes better-errors for easier debugging and awesome-print for easier exploration in the terminal.
  • Additional options: Includes the ability to add and configure the devise gem for authentication and the pundit gem for authorization.

Summary

The Modern Rails Template is a Rails template designed to simplify the process of starting a new Rails 5.2 project. It provides a modern and efficient configuration with good defaults, including a range of useful gems and configurations for common tasks such as slugging, tracking N+1 queries, generating database relationship schemas, and background job management. It also includes development and debugging tools to enhance the development experience. With the ability to add authentication and authorization options, this template offers a comprehensive starting point for Rails projects.