This walks through installing Seams in a fresh Rails app and generating your first canonical engine.
- Ruby 3.2+
- Rails 7.1+ (8.x recommended)
- A new or existing Rails application
# Gemfile
gem "seams"bundle install
bin/rails generate seams:installThe install generator scaffolds:
config/initializers/seams.rbconfig/seams_engines.rb— registers each engine on the host's load path;require_relative "seams_engines"is injected intoconfig/application.rbso engines load beforeRails.application.initialize!engines/.keeplib/tasks/seams.rake.github/workflows/ci.yml— lint + brakeman + per-engine test matrixbin/seams— short CLI wrapperscript/run_affected_tests.sh,script/collate_coverage.rb— host-local helpersdoc/ARCHITECTURE.md— per-host architecture template
bin/seams authLook at what it created:
$ tree engines/auth -L 2
engines/auth
├── LICENSE
├── README.md
├── auth.gemspec
├── app/
│ ├── controllers/
│ ├── models/
│ └── views/
├── config/
│ └── routes.rb
├── db/
│ └── migrate/
├── lib/
└── spec/Add the engine's mount line to your host routes:
# config/routes.rb
Rails.application.routes.draw do
mount Auth::Engine, at: "/auth"
endAdd the authentication concern to your ApplicationController:
class ApplicationController < ActionController::Base
include Auth::Authentication
endRun migrations:
bin/rails db:migratebin/seams core # shared primitives (Current, AuditLog, concerns)
bin/seams accounts # tenant boundary + Membership + system actor
bin/seams notifications # outbound email/SMS, swappable adapters
bin/seams notifications --channels in_app,email # or pick a subset (default: all)
bin/seams billing # Stripe subscriptions + webhooks
bin/seams teams # multi-tenant teams + invitations
bin/seams teams --with roles # or pick a subset of team features (default: all)
bin/seams permissions # host-editable role → ability grant map
bin/seams admin # Administrate dashboards (opt-in; see ARCHITECTURE_WAVE_11.md)
bin/seams design --shell # design system + app layout + starter dashboardEvery time you generate a new engine the existing engines'
.rubocop.yml files are auto-updated so the boundary cops cover
the new engine without manual edits.
The recommended order is core → auth → accounts → notifications → billing → teams. Some engines depend on each other (accounts on
auth, billing on accounts) — see each engine's README for the
"Requires:" line. permissions, admin, and design are opt-in and
can be added at any time. Run bin/seams design --shell to also get a
ready-to-boot application layout and signed-in dashboard, which makes
the other engines visible in a real, styled UI.
bin/seams listLists every engine and the events it emits.
bundle exec rubocopPer-engine .rubocop.yml already loads seams/cops. CI runs the
same lint job in .github/workflows/ci.yml.
bin/seams test authEach engine has its own spec/ directory. The CI workflow runs all
of them in parallel (one job per engine).
- ADDING_AN_ENGINE.md — Build your own engine on top of the generic generator.
- WRITING_AN_ADAPTER.md — Swap in Mailgun, Twilio, Paddle, etc.
- ENGINE_CATALOGUE.md — The canonical engines in detail.
- PERMISSIONS.md — Role → ability grant map and
authorize_permission!. - DESIGN_SYSTEM.md — The design engine: components, tokens, theming.
- ARCHITECTURE_WAVE_11.md — The admin engine.
- CURRENT_ATTRIBUTES.md — Per-request namespaces (Auth::Current, Accounts::Current, Teams::Current).
- ARCHITECTURE.md — Why Seams is built this way.
- UPGRADING_FROM_WAVE_8.md — If you adopted seams pre-Wave-9.