This repository is a starter template for Ruby on Rails 7 applications using ESBuild, Hotwire (Turbo & Stimulus), and TailwindCSS. The setup is streamlined for modern frontend development while leveraging the power of Rails.
- Rails 7 with ESBuild for JavaScript bundling.
- Hotwire for reactive apps using Turbo and Stimulus.
- TailwindCSS for utility-first CSS design.
- PostgreSQL setup via Docker.
-
Clone the repository:
git clone [https://github.com/your_username/your_repo_name.git](https://github.com/voidzenn/rails_7_esbuild_hotwire_tailwindcss_starter/edit/main/README.md) cd rails_7_esbuild_hotwire_tailwindcss_starter
-
Copy the example environment file and update any necessary values:
cp .env.example .env
-
Install dependencies:
bundle install yarn install
-
Set up the database (using Docker for PostgreSQL):
docker-compose up -d
-
Run database migrations:
rails db:setup
-
Build JavaScript, CSS, and start watching for changes (includes Stimulus updates):
yarn build
Start the Rails server:
bin/dev