The stars of the show — the Hotwire stack (Stimulus and Turbo), CableReady, StimulusReflex — are now part of every new Rails application I build.
Writing Ruby code and building cool stuff is fun. Reading setup docs, fiddling with tooling, and remembering how to tie everything together each time you create a new application is a bummer.
So, to spend more time on the fun stuff and less time in setup land, I built a small Rails application template that let's me jump right into building.
This new template is now available on Github for anyone interested in building reactive Rails applications to use.
The template comes with the following tools configured and ready to start using:
Vite fits in well alongside the modern, reactive stack we're using, with HMR-enabled updates for every change, including for server-side views.
In addition to being fast, simple and effective, Vite is a well-supported project with a very active community working to improve it.
To create a new Ruby on Rails application from this template, simply run this command from your terminal:
rails new your_new_application -m https://raw.githubusercontent.com/davidcolby/vite_starter_template//main/template.rb
I've intentionally left the template light and plan to keep it that way.
This template's goal is to provide the basic tools to build modern applications, not provide a ready-to-deploy starter application. If you want a more full-featured starter, consider Jumpstart.
I'd love for you to try out the stack included in this template — building Rails apps with this stack is a joy — and I hope that this template makes it a little easier to get started.
Have feedback or questions about the template? Get in touch with me here, or open an issue on the Github repo.
As always, thanks for reading!