Rust off Rails: the opinionated web stack for the AI era
The opinionated web stack for the AI era. Markdown conventions, a tested app template and checks that tell coding agents how to build a Rust web app.
The opinionated web stack for the AI era. Markdown conventions, a tested app template and checks that tell coding agents how to build a Rust web app.

Rails' conventions, without Rails. Your agent writes the code, and the checks keep it on the tracks.
You describe a web app in plain words. Your coding agent (Claude Code, Codex, opencode, Muse or any other) builds it in Rust from our conventions, a tested app template and optional parts, and it isn't done until the tests pass on SQLite and Postgres. The convention lives in the prose. The agent writes the code.
curl -fsSL https://rustoffrails.org/install.sh | sh
or in Claude Code: /plugin marketplace add rust-off-rails/rustoffrails
Read before you pipe: the install script · INSTALL.md
AGENTS.md and the guides tell the agent how to do each thing: the stack, the layout, naming, security and tests. Your agent reads them, so you don't have to. Browse the guides.
A complete app that compiles and passes its tests on SQLite and Postgres on day one: sessions, security headers, CSRF, Docker and CI. The template.
Mail and a dev mailbox, a job queue and its dashboard, sign-in, realtime and a dev dashboard: tested code to copy, one command each. Read them first in the samples repo or on the parts page.
offrails-check and one command, cargo offrails verify, decide when the agent is done: tests on both databases, every acceptance criterion tested. The checks.
The rule behind it: agents write the code. You say what you want, in plain words or in specs; the agent writes the rest. Read §0.
from Fizzy In progress
Fizzy's boards and cards, rebuilt in Rust by agents.
About 20x less memory than the original Fizzy, measured by the maintainer.
from FreeScout In progress
A shared-inbox help desk, built by agents on another machine.
from Uptime Kuma Built
1,556 tests green on SQLite and Postgres.
About 7x less memory than Uptime Kuma on one machine.
Built with GPT-6 Luna Claude Sonnet 5.5 Meta's Muse Wonder 1 GLM 5.3 Flash via opencode The goal: small, cheap agents that get real work done too.
The dashboard costs about 1 µs per request in a release build, and is development only by default.
header The AGENTS.md header is complete and consistent with the vendored framework version.ac Every acceptance criterion in the specs is cited by a test.security Every feature has a security table, and every test it names exists.env Every environment variable the app reads is listed in .env.example.ids No id column is a 32-bit integer. One of them once made every Postgres write a 500 behind a green SQLite suite.postgres The test suite can run on Postgres, not only SQLite.bind Development listens on this machine only, and foreign Host names are refused.routes docs/routes.md lists every route.Then the test suites must pass on both databases before anything counts as done. The Definition of Done
Measured by the agents that ran them. How upgrades work
HttpOnly session cookies, only hashed tokens in the database, and rate limits on sign-in.offrails-check verifies exists.The boxes show an example app, a bookshelf, in the formats the framework really uses.
Product questions only, each with a recommended default. "Who can see this?" yes; "which ORM?" never. Say "you decide" and it takes the defaults.
? Accounts? a) magic link (Recommended) b) email + password c) invite-only d) none
A compact plan (resources, pages, jobs, assumptions) written into product/ specs with acceptance criteria. The spec is the durable record; chat is not.
product/features/books.md
- [ ] AC-books-1: a signed-in user can add a book
Generator recipes, run by the agent: migration, model, failing tests, controller, views, one vertical slice at a time.
tests/app/books_test.rs cites AC-books-1
src/controllers/books.rs
fmt, clippy, tests on SQLite and Postgres, every acceptance criterion traced to a test, coverage gates. Green or it didn't happen.
ok [ac] 12 criteria, all cited
offrails-check: 0 error(s), 0 warning(s)
nextest: SQLite pass, Postgres pass
Red at any station? The failure goes back to the agent, and nothing counts as done until it is green on both databases.
| Skill | What it does |
|---|---|
/offrails:new | Interview → plan → app skeleton → planned features, green |
/offrails:feature | Spec first, then code. With no argument: build what changed in product/ |
/offrails:scaffold | A full resource in the app's frontend mode |
/offrails:generate | Jobs, mailers, channels, authentication, models, migrations, tasks |
/offrails:check | The Definition of Done: fmt, clippy, tests on SQLite and Postgres |
/offrails:doctor | Audits the app against every convention in the docs |
/offrails:deploy | Deploy config and a verified image; confirms before anything outward-facing |
/offrails:upgrade | Moves the app's vendored framework forward and migrates conventions |
How you'll use it
Say what you want, or write it in product/features/*.md. Plain English.
The agent writes the spec, then the code: migrations, models, views, tests.
Done means green on SQLite and Postgres, every acceptance criterion tested.
A library with hundreds of thousands of lines60 Markdown files
A code generator binarygenerators/scaffold.md: a recipe the agent runs
Convention over configurationConvention over deliberation: the agent never debates which crate to use
Optimized for programmer happinessOptimized for agent correctness: compiler-checked everything
Magic, to save keystrokesNo magic. Explicit code is cheap when you don't type it.
Axum·Tokio·SeaORM SQLite locally, Postgres in production, same code·Askama·Tailwind·lettre·tracing·one binary, one Docker image
FRONTEND_MODE, chosen once in the interviewhtmx default
Askama templates, checked at compile time, plus htmx. No Node. For CRUD apps, dashboards, content sites (like this one).
inertia
React or Svelte pages with server-side routing and controllers, through a generated Inertia adapter. The pick when you want a JS UI.
spa
A separate single-page app plus a JSON API, for when the UI must be a standalone app. Types flow from Rust via ts-rs.
api in progress
No UI at all: a backend and a versioned API for mobile apps, partners and scripts.
UI_LIBRARYreact (default) or svelte, for inertia, spa and htmx islands
APInone, rest (OpenAPI + tokens), graphql or both: a public, versioned API, independent of the UI
And in the database: a job queue, a cache and pub/sub. The database is the only infrastructure.
rails new and scaffold, as recipes the agent runs/up and Docker by defaultbin/rails tasks → one app binary/admin/jobs dashboard/dev/mailbox/dev toolboxAnd also
/plugin marketplace add rust-off-rails/rustoffrails
/plugin install offrails@offrails
Then, in an empty directory:
/offrails:new bookshelf: people track the books they've read and review them
The agent interviews you, confirms a plan, then builds. Skills also trigger on plain requests ("make me a new Rust web app…").
AGENTS.mdRead /path/to/rustoffrails/AGENTS.md and make me a new app called "bookshelf".
Generated apps carry AGENTS.md and a vendored .offrails/, so later sessions need no setup.
Describe features in plain language, or write them as specs in product/:
Scaffold Book with title:string, author:string, published_on:date, rating:integer.
Users must be logged in to create books.
The full walkthrough How you'll use it Read the docs Star on GitHub
Texto de rustoffrails.org tal como lo publicó, leído de su página y mostrado aquí con el formato de El Autómata. El original, en rustoffrails.org · Volver a la noticia de El Autómata