A highly opinionated, LLM-friendly, Rails 8 application template with the Solid Stack.
- Rails 8 Solid Stack - Database-backed Queue, Cache, and Cable (no Redis!)
- Kamal 2 Deployment - Docker-native deployment with PostgreSQL
- Authentication - Devise + Petergate for auth and roles
- Soft Deletes - Discard gem pre-configured
- Audit Trail - PaperTrail for versioning
- UUID Primary Keys - Secure, distributed-friendly IDs
- Service Objects - ApplicationService base class with Result pattern
- Registry Pattern - RegistryBase for configuration entities
- Slim Templates - Clean, readable views
- Tailwind CSS - Utility-first styling
- Stimulus Controllers - Generic toggle and modal controllers
- VCR Testing - HTTP request recording for tests
- Bullet - N+1 query detection
- RuboCop - Rails Omakase linting
- Brakeman - Security static analysis
- CLAUDE.md - AI assistant conventions
Fork this repo to your GitHub account and replace YOUR_USERNAME below, or use my username.
rails new myapp \
--database=postgresql \
--template=https://raw.githubusercontent.com/YOUR_USERNAME/rails-rocket-sheep/main/template.rbOr clone and use locally:
git clone https://github.com/YOUR_USERNAME/rails-rocket-sheep.git
rails new myapp --database=postgresql --template=rails-rocket-sheep/template.rbcd myapp
# Create your User model
rails g devise User
# Start development
bin/dev- Edit
config/deploy.ymlwith your server details - Set up secrets in
.kamal/secrets - Deploy:
kamal setup # First time only
kamal deploy # Deploy updates- Configures Gems - Adds Solid Stack, Devise, Petergate, Discard, PaperTrail, Pagy, Slim, VCR, Bullet, RuboCop, Brakeman
- Sets Up Multi-Database - Separate databases for queue, cable, cache
- Configures UUIDs - All models use UUID primary keys
- Creates Base Classes - ApplicationService, RegistryBase, AppConfig
- Adds Stimulus Controllers - toggle_controller.js, modal_controller.js
- Sets Up Deployment - Dockerfile, docker-entrypoint, Kamal config
- Creates Documentation - CLAUDE.md, docs/models.md, docs/design-patterns.md, docs/architecture.md
- Configures Development - Bullet for N+1 detection, letter_opener for emails
The template will ask for:
- Deploy host (server IP/hostname)
- Docker registry username
After running the template, you may want to:
- Customize CLAUDE.md - Add project-specific conventions
- Update deploy.yml - Configure your actual server and registry
- Add environment variables - Set up
.kamal/secrets - Create models - Start with
rails g devise User
myapp/
├── app/
│ ├── lib/ # Registries and config (AppConfig, etc.)
│ ├── services/ # Service objects (inherit ApplicationService)
│ ├── models/ # ActiveRecord models
│ ├── controllers/ # RESTful controllers
│ ├── views/ # Slim templates
│ └── javascript/controllers/ # Stimulus controllers
├── config/
│ ├── deploy.yml # Kamal deployment config
│ ├── database.yml # Multi-database config
│ ├── queue.yml # Solid Queue config
│ ├── cable.yml # Solid Cable config
│ └── cache.yml # Solid Cache config
├── docs/
│ ├── models.md # Model documentation
│ ├── design-patterns.md # UI/UX patterns + Slim/Tailwind gotchas
│ ├── architecture.md # Architecture Decision Records
│ └── how-tos/ # Step-by-step guides
├── bin/
│ ├── docker-entrypoint # Production DB setup script
│ └── test # macOS-friendly test runner
├── CLAUDE.md # AI assistant conventions
└── Dockerfile # Production Docker image
- Ruby 3.4+
- Rails 8.0+
- PostgreSQL 14+
MIT