{"slug": "rust-off-rails-the-opinionated-web-stack-for-the-ai-era", "title": "Rust off Rails: The opinionated web stack for the AI era", "summary": "Rust off Rails launched as a set of roughly 60 Markdown files that instruct coding agents to build full-stack Rust web apps from a single prescribed stack, with the project's founding rule stating that all code — Rust, SQL, HTML, CSS, TypeScript and Dockerfiles — is written by an AI agent while humans supply intent through specs in product/ and an interview. The project ships eight agent skills, including /offrails:new and /offrails:feature, and defines completion as passing cargo clippy, pnpm typecheck with svelte-check, and cargo nextest suites on both SQLite and Postgres 18, with the sample run reporting 142 tests passed on each database. Installation is offered via a curl script at rustoffrails.org/install.sh or the Claude Code command /plugin marketplace add rust-off-rails/rustoffrails.", "body_md": "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.\n\n```\ncurl -fsSL https://rustoffrails.org/install.sh | sh\n```\n\nor in Claude Code: /plugin marketplace add rust-off-rails/rustoffrails\n\n? Accounts? a) magic link (Recommended)b) email + passwordc) invite-onlyd) none\n\n› a\n\n? Who owns data? a) each user (Recommended)b) teamsc) shared\n\n› you decide\n\n? Frontend? a) htmx (Recommended)b) inertiac) spad) api\n\n› b\n\n? UI library? a) React (Recommended)b) Svelte\n\n› b\n\n? API for other programs? a) noneb) REST + OpenAPIc) GraphQLd) both\n\n› b\n\n◆ Plan: inertia + Svelte · API rest · Postgres in prod (SQLite locally)\n\nBook title, author, rating 1–5 · belongs to User\n\nReview body, stars 1–5 · belongs to Book\n\nAPI /api/v1/books, /api/v1/reviews · bearer tokens\n\n› yes\n\n+ migration/src/m20261013_120000_create_books.rs\n\n+ src/models/book.rs · src/controllers/books.rs\n\n+ web/src/pages/Books/Index.svelte (+ 71 more)\n\n✓ cargo clippy --all-targets -- -D warnings\n\n✓ pnpm --dir web typecheck · svelte-check\n\n✓ cargo nextest run · SQLite · 142 passed\n\n✓ cargo nextest run · Postgres 18 · 142 passed\n\nDefinition of Done: green. Run bin/setup && bin/dev\n\nWhat it is\n\nA framework made of decisions, not code.\n\nOther frameworks ship a library. Rust off Rails gives your agent the judgment: every choice it would otherwise improvise, already made and written down.\n\n0\n\nThe founding rule\n\nAll code is written by AI\n\nEvery 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.\n\n#\n\nMarkdown is the framework\n\nWhere 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.\n\n!\n\nStrong opinions, aimed at agents\n\nCrate choice, file layout, naming, errors, tests: decided once. The agent never debates the ORM. Inconsistency is the enemy, not imperfection.\n\n+\n\nBatteries included\n\nAuth, 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.\n\nHow it works\n\nInterview. Plan. Generate. Green.\n\nThe 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.\n\n01\n\nInterview\n\nProduct questions only, each with a recommended default. \"Who can see this?\" yes; \"which ORM?\" never. Say \"you decide\" and it takes the defaults.\n\n02\n\nPlan\n\nA compact plan (resources, pages, jobs, assumptions) written into product/ specs with acceptance criteria. The spec is the durable record; chat is not.\n\n03\n\nGenerate\n\nGenerator recipes, run by the agent: migration → model → failing tests → controller → views, one vertical slice at a time.\n\n04\n\nGreen\n\nfmt, clippy, tests on SQLite and Postgres, every acceptance criterion traced to a test, coverage gates. Green or it didn't happen.\n\nEight skills, one per job\n\nSkill\n\nWhat it does\n\n/offrails:new\n\nInterview → plan → app skeleton → planned features, green\n\n/offrails:feature\n\nSpec first, then code. With no argument: build what changed in product/\n\nTraces, 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.\n\nWhen typing was the bottleneck…When typing is free…\n\nA library with hundreds of thousands of lines\n\n60 Markdown files\n\nA code generator binary\n\ngenerators/scaffold.md: a recipe the agent runs\n\nConvention over configuration\n\nConvention over deliberation: the agent never debates which crate to use\n\nOptimized for programmer happiness\n\nOptimized for agent correctness: compiler-checked everything\n\nMagic, to save keystrokes\n\nNo magic. Explicit code is cheap when you don't type it.\n\nThe stack in one breath\n\nOne crate per job. Substitutions are not taken at the table.\n\nAxum·Tokio·SeaORMSQLite locally, Postgres in production, same code·Askama·Tailwind·lettre·tracing·one binary, one Docker image\n\nFRONTEND_MODE, chosen once in the interview\n\nhtmxdefault\n\nAskama templates, checked at compile time, plus htmx. No Node. For CRUD apps, dashboards, content sites (like this one).\n\ninertia\n\nReact or Svelte pages with server-side routing and controllers, through a generated Inertia adapter. The pick when you want a JS UI.\n\nspa\n\nA separate single-page app plus a JSON API, for when the UI must be a standalone app. Types flow from Rust via ts-rs.\n\napiin progress\n\nNo UI at all: a backend and a versioned API for mobile apps, partners and scripts.\n\nUI_LIBRARY\n\nreact (default) or svelte, for inertia, spa and htmx islands\n\nAPI\n\nnone, rest (OpenAPI + tokens), graphql or both: a public, versioned API, independent of the UI\n\nAnd in the database: a job queue, a cache and pub/sub. The database is the only infrastructure.\n\nStanding on giants\n\nThe best of Rails and Phoenix, together.\n\nNone 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.", "url": "https://wpnews.pro/news/rust-off-rails-the-opinionated-web-stack-for-the-ai-era", "canonical_source": "https://rustoffrails.org/", "published_at": "2026-10-21 16:34:16+00:00", "updated_at": "2026-10-21 16:42:28.770318+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools", "ai-products"], "entities": ["Rust off Rails", "Claude Code", "Svelte", "Inertia", "htmx", "React", "Postgres", "SQLite"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/rust-off-rails-the-opinionated-web-stack-for-the-ai-era", "markdown": "https://wpnews.pro/news/rust-off-rails-the-opinionated-web-stack-for-the-ai-era.md", "text": "https://wpnews.pro/news/rust-off-rails-the-opinionated-web-stack-for-the-ai-era.txt", "jsonld": "https://wpnews.pro/news/rust-off-rails-the-opinionated-web-stack-for-the-ai-era.jsonld"}}