Skip to content
/ rails-starter Public template

Rails 8.1 starter optimized for AI-assisted development: StimulusJS/Tailwind CSS (#nobuild), ViewComponents, i18n, a11y/axe-core testing, and 95%+ coverage

Notifications You must be signed in to change notification settings

ericboehs/rails-starter

Repository files navigation

Rails Starter Template

A Rails 8.1.0 application template with modern tooling and best practices.

Features

  • User Authentication - Secure session-based authentication system
  • Modern Rails Stack - Built with Rails 8.1.0, SQLite3, and modern asset pipeline
  • Component-Based UI - ViewComponent architecture for maintainable UI components
  • Responsive Design - Tailwind CSS with dark mode support
  • Comprehensive Testing - 99%+ test coverage with SimpleCov

Tech Stack

  • Rails 8.1.0 with modern asset pipeline (Propshaft)
  • SQLite3 for all environments including production
  • ImportMap for JavaScript (no Node.js bundling required)
  • Hotwire (Turbo + Stimulus) for interactive features
  • Tailwind CSS via CDN for styling
  • ViewComponent for reusable UI components
  • Solid Libraries for database-backed cache, queue, and cable

Getting Started

Prerequisites

  • Ruby 3.4.7
  • Rails 8.1.0+
  • SQLite3

Using This Template

  1. Click "Use this template" button on GitHub to create a new repository
  2. Clone your new repository
  3. Install dependencies:
bin/setup
  1. Rename the application (this also regenerates credentials for security):
bin/rename-app YourAppName
  1. Set up your credentials:
bin/rails credentials:edit
  1. Customize for your project:
  • Update CLAUDE.md with your project details
  • Modify this README.md
  1. Start the development server:
bin/rails server
  1. Visit http://localhost:3000

Development

Code Quality

Run the full CI pipeline (formatting, linting, security scan, tests):

bin/ci

Auto-fix formatting issues:

bin/ci --fix

Watch CI status in real-time:

bin/watch-ci

Testing

Run tests:

bin/rails test

Generate coverage report:

bin/coverage

Code Standards

  • EditorConfig: UTF-8, LF line endings, 2-space indentation
  • RuboCop: Rails Omakase configuration
  • SimpleCov: 95% minimum coverage requirement
  • Conventional Commits: Structured commit messages

Architecture

Database Setup

Multi-database configuration with separate SQLite databases:

  • Primary database for application data
  • Cache database for Solid Cache
  • Queue database for Solid Queue
  • Cable database for Solid Cable

Component System

The application uses ViewComponent for UI components:

  • Auth::* components for authentication flows
  • AvatarComponent for user avatars
  • AlertComponent for flash messages and errors
  • UserPageComponent for profile page layouts

Contributing

  1. Follow the existing code style and conventions
  2. Ensure tests pass: bin/ci
  3. Maintain test coverage above 95%
  4. Use conventional commit messages

License

This project is licensed under the MIT License.

About

Rails 8.1 starter optimized for AI-assisted development: StimulusJS/Tailwind CSS (#nobuild), ViewComponents, i18n, a11y/axe-core testing, and 95%+ coverage

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •