Speed up your new Rails 8.0 projects with a preconfigured set of tools !
Note
This template has been built to match as best as possible default changes I make on every new Rails project I work on. It is very opinionated for some configuration so feel free to fork it and adapt it according to your needs.
If you don't have yet the project cloned, fetch it from remote URL:
$ rails new myapp -m https://raw.githubusercontent.com/anthony-robin/hyperloop/master/template.rb
If you already have it cloned:
$ rails new myapp -m hyperloop/template.rb
Warning
Some arguments from the rails new
command might not be compatible with the template. Here are some flags that works well:
$ rails new myapp -m hyperloop/template.rb --css=tailwind --skip-ci --skip-test --skip-system-test --skip-brakeman --skip-active-storage --skip-action-text --skip-action-mailbox --skip-kamal --skip-git
Wait for the end of the installer, then start it with:
$ bin/dev
In production:
- turbo-rails and stimulus-rails for javascript related features
- slim-rails for views templates
- tailwindcss-rails as frontend framework (require
--css=tailwind
flag in the command line) - simple_form for handling forms inputs
- pagy for pagination
- meta-tags for SEO friendly
- action_policy as authorization actions verifier (only if authentication is
yes
) - dotenv-rails to handle
.env
files - activestorage and actiontext available by default
- ffaker to generate fake data (seed database)
- mission_control-jobs to manage processed jobs
In development:
- annotaterb to print model database structure (opinionated configuration)
- bullet to track N+1 queries
- chusaku to print routes URL above controller actions
- letter_opener_web to intercept emails and print them in browser
- rubocop and its extensions for coding conventions (very opinionated)
- ribbonit to display Ruby and Rails informations
- spark to reload browser page on HTML, CSS, JS modifications.
- TailwindCSS
- Flowbite for responsive navbar and sidebar
-
Rails authentication comes with
session
,registration
andreset password
features preconfigured as well as related mailers. -
SEO is preconfigured to work in any pages by default and title/description can be specified directly in
seo.{locale}.yml
file. -
Default browser confirm modal as been replaced with a pretty and friendly one following excellent gorails tutorial
-
Database is seed with default users corresponding to each access level
-
If using
postgres
adapter, database can be dockerized using:$ docker-compose up -d
-
Project is configured for french and english locales
See Github project for coming roadmap.
Hyperloop is inspired by:
- projects developed for La Voix du Chat Artiste
- excid3/jumpstart for its starter template
- bdavidxyz/tailstart for its starter instructions
Thank you :)