# Rust off Rails: The opinionated web stack for the AI era

> Source: <https://rustoffrails.org/>
> Published: 2026-10-21 16:34:16+00:00

Rust off Rails is a set of Markdown files that tell coding agents how to build a full-stack Rust web app: one blessed stack, one layout, one way to do each thing. 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

? Accounts? a) magic link (Recommended)b) email + passwordc) invite-onlyd) none

› a

? Who owns data? a) each user (Recommended)b) teamsc) shared

› you decide

? Frontend? a) htmx (Recommended)b) inertiac) spad) api

› b

? UI library? a) React (Recommended)b) Svelte

› b

? API for other programs? a) noneb) REST + OpenAPIc) GraphQLd) both

› b

◆ Plan: inertia + Svelte · API rest · Postgres in prod (SQLite locally)

Book title, author, rating 1–5 · belongs to User

Review body, stars 1–5 · belongs to Book

API /api/v1/books, /api/v1/reviews · bearer tokens

› yes

+ migration/src/m20261013_120000_create_books.rs

+ src/models/book.rs · src/controllers/books.rs

+ web/src/pages/Books/Index.svelte (+ 71 more)

✓ cargo clippy --all-targets -- -D warnings

✓ pnpm --dir web typecheck · svelte-check

✓ cargo nextest run · SQLite · 142 passed

✓ cargo nextest run · Postgres 18 · 142 passed

Definition of Done: green. Run bin/setup && bin/dev

What it is

A framework made of decisions, not code.

Other frameworks ship a library. Rust off Rails gives your agent the judgment: every choice it would otherwise improvise, already made and written down.

0

The founding rule

All code is written by AI

Every line of Rust, SQL, HTML, CSS, TypeScript and every Dockerfile is written by an agent. Humans write intent: specs in product/, answers in the interview, feedback in conversation. Never code. It's the rule the others rest on: boilerplate is free, conventions are enforced by the agent, and specs stay the source of truth. Read §0.

#

Markdown is the framework

Where a framework would ship a library, Off Rails ships a precise spec. The job queue, sessions and Inertia adapter are rendered into your app as code you own.

!

Strong opinions, aimed at agents

Crate choice, file layout, naming, errors, tests: decided once. The agent never debates the ORM. Inconsistency is the enemy, not imperfection.

+

Batteries included

Auth, jobs, email, caching, uploads, realtime, deploys: every layer has a guide and a recipe, so the agent never starts from a blank page. Browse the guides.

How it works

Interview. Plan. Generate. Green.

The agent asks only what a human can answer, writes the answers down, and is done only when the compiler and the test suite on both databases agree.

01

Interview

Product questions only, each with a recommended default. "Who can see this?" yes; "which ORM?" never. Say "you decide" and it takes the defaults.

02

Plan

A compact plan (resources, pages, jobs, assumptions) written into product/ specs with acceptance criteria. The spec is the durable record; chat is not.

03

Generate

Generator recipes, run by the agent: migration → model → failing tests → controller → views, one vertical slice at a time.

04

Green

fmt, clippy, tests on SQLite and Postgres, every acceptance criterion traced to a test, coverage gates. Green or it didn't happen.

Eight skills, one per job

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/

Traces, a profiler, a local mailbox, a jobs dashboard and live presence, built in. Your agent reads the same data as JSON, so it can check its own work.

When typing was the bottleneck…When typing is free…

A library with hundreds of thousands of lines

60 Markdown files

A code generator binary

generators/scaffold.md: a recipe the agent runs

Convention over configuration

Convention over deliberation: the agent never debates which crate to use

Optimized for programmer happiness

Optimized for agent correctness: compiler-checked everything

Magic, to save keystrokes

No magic. Explicit code is cheap when you don't type it.

The stack in one breath

One crate per job. Substitutions are not taken at the table.

Axum·Tokio·SeaORMSQLite locally, Postgres in production, same code·Askama·Tailwind·lettre·tracing·one binary, one Docker image

FRONTEND_MODE, chosen once in the interview

htmxdefault

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.

apiin progress

No UI at all: a backend and a versioned API for mobile apps, partners and scripts.

UI_LIBRARY

react (default) or svelte, for inertia, spa and htmx islands

API

none, 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.

Standing on giants

The best of Rails and Phoenix, together.

None of the good ideas here are new. We took the ones that aged best from two frameworks we love, gave each a Rust shape, and wrote them down for agents.
