Modern Rails Starter is an opinionated, fully configured template for developing modern web applications using Rails 6. Pre-Configured with Hotwire (Turbo & StimulusJS), TailwindCSS, ViewComponent, Devise, Pundit, Sidekiq, Pagy and many other great tools, you can use this template to kickstart your own reactive web applications.
This template is based almost exclusively on the amazing contributions of Andy Leverenz & Chris Oliver. Please consider supporting their work.
- rbenv (recommended) / RVM / chruby *(optional)
- Ruby (>= 2.5)
- Rails (>= 6.0) -
gem install rails
- Bundler -
gem install bundler
- Yarn -
brew install yarn
or Install Yarn - Redis -
brew install redis
or Install Redis - Hivemind / Foreman *(optional) -
gem install hivemind
General:
- TailwindCSS
- Hotwire
- ViewComponent
- devise
- devise_masquerade
- friendly_id
- Sidekiq
- Pundit
- mini_magick
- name_of_person
- Pagy
- whenever
- ActiveStorage
Development:
The easiest way to get started is to clone the repository, create a new rails app and pass the template file through:
# Get the latest snapshot from GitHub
git clone https://github.com/noamsun/modern_rails_starter.git modern_rails_starter
# Navigate to your projects directory and create a new app
rails new my_app -d <postgresql, mysql, sqlite3> -m /path/to/modern_rails_starter/template.rb
# Change directory
cd my_app
# Run your Rails application
# In Development:
hivemind Procfile.dev
# In Production:
hivemind Procfile
TailwindCSS
Support (usingWebpack
), configured forInter
font.- Flexible authentication with
Devise
& user impersonation withdevise_masquerade
(a newname
field already migrated in, which maps to thefirst_name
andlast_name
fields in the database (thanks to thename_of_person
gem). - Pre-baked, devise-compatible Turbo & StimulusJS (
Hotwire
)support. ViewComponent
Support. This template installs the gem and generates a test component (and a preview).- Simple, efficient background processing with
Sidekiq
andwhenever
. - Object oriented authorization with
Pundit
. Friendly ID
s out-of-the-box. This template installs the gem and runs the associated generator. check friendly_id's documentation for more information about integrating it with your own models.- Faster pagination with
Pagy
. This template installs the gem and creates a default config file. - Ready-to-use
ActiveStorage
andmini_magick
. - Developer happiness guaranteed with great tools like
pry-rails
,faker
andannotate
. - Enhanced boilerplate views using
TailwindCSS
(thanks to Andy Leverenz). Hivemind/Foreman
Support (environment-basedProfciles
)Git
initialization out-of-the-box.PurgeCSS
configuration.- Custom defaults for button and form elements (by Andy Leverenz).