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

Hacker News Top Tools

Summary

Rust off Rails introduces an opinionated, AI-first web stack that ships as Markdown conventions rather than code, instructing coding agents (like Claude Code) to generate full-stack Rust applications following a single blessed set of decisions. The project emphasizes that all code is written by AI, with humans only providing intent, specs, and interview answers.

No content available
Original Article
View Cached Full Text

Cached at: 10/21/26, 06:23 PM

# Rust off Rails: the opinionated web stack for the AI era Source: [https://rustoffrails.org/](https://rustoffrails.org/) A web framework that ships zero lines of code 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` Read before you pipe:[the install script](https://rustoffrails.org/install.sh)·[INSTALL\.md](https://github.com/rust-off-rails/rustoffrails/blob/main/INSTALL.md) ![](https://rustoffrails.org/static/video/railboard-launch-1280.png?v=8f00fb62) Railboard: a live Kanban built by AI in 7 prompts3:06 ·[Watch on YouTube](https://www.youtube.com/watch?v=k65vA28_JT8)- **0**lines of framework code - **60**Markdown files - **2**databases, same code ~/code/bookshelf, claude An illustrated agent session: the /offrails:new command, the interview, the plan, the generated files and the tests passing on SQLite and Postgres\.1. \>/offrails:new bookshelf: people track and review books, with an API for a mobile app later 2. ● Reading AGENTS\.md → interview · doctrine · structure · stack · workflow 3. ? Accounts?a\) magic link \(Recommended\)b\) email \+ passwordc\) invite\-onlyd\) none 4. › a 5. ? Who owns data?a\) each user \(Recommended\)b\) teamsc\) shared 6. › you decide 7. ? Frontend?a\) htmx \(Recommended\)b\) inertiac\) spad\) api 8. › b 9. ? UI library?a\) React \(Recommended\)b\) Svelte 10. › b 11. ? API for other programs?a\) noneb\) REST \+ OpenAPIc\) GraphQLd\) both 12. › b 13. ◆ Plan: inertia \+ Svelte · API rest · Postgres in prod \(SQLite locally\) 14. Book title, author, rating 1–5 · belongs to User 15. Review body, stars 1–5 · belongs to Book 16. API /api/v1/books, /api/v1/reviews · bearer tokens 17. › yes 18. \+migration/src/m20261013\_120000\_create\_books\.rs 19. \+src/models/book\.rs · src/controllers/books\.rs 20. \+web/src/pages/Books/Index\.svelte\(\+ 71 more\) 21. ✓cargo clippy \-\-all\-targets \-\- \-D warnings 22. ✓pnpm \-\-dir web typecheck · svelte\-check 23. ✓cargo nextest run ·**SQLite**· 142 passed 24. ✓cargo nextest run ·**Postgres 18**· 142 passed 25. 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\. 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](https://rustoffrails.org/philosophy#pillar-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](https://rustoffrails.org/docs)\. 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\. 1. 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\. 2. 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\. 3. 03### Generate Generator recipes, run by the agent: migration → model → failing tests → controller → views, one vertical slice at a time\. 4. 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 SkillWhat 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 ## You write intent\. The agent writes*everything else*\. 1. 1**Say what you want**, or write it in`product/features/\*\.md`\. Plain English\. 2. 2**The agent writes the spec, then the code:**migrations, models, views, tests\. 3. 3**Done means green**on SQLite and Postgres, every acceptance criterion tested\. [Read the guide](https://rustoffrails.org/guide) The deal ## What changes when typing is free\. A library with hundreds of thousands of lines60 Markdown filesA code generator binary`generators/scaffold\.md`: a recipe the agent runsConvention over configurationConvention over*deliberation*: the agent never debates which crate to useOptimized for programmer happinessOptimized for agent correctness: compiler\-checked everythingMagic, to save keystrokesNo 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 `htmx`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\_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 UIAnd 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\. ### From Ruby on Rails - [Convention over configuration](https://rustoffrails.org/philosophy), sharpened into convention over deliberation - [Generators](https://rustoffrails.org/docs/generators/scaffold):`rails new`and scaffold, as recipes the agent runs - [Active Record](https://rustoffrails.org/docs/guides/models)→ models and[migrations](https://rustoffrails.org/docs/guides/migrations) - [Rails 8 authentication](https://rustoffrails.org/docs/guides/auth): database\-backed sessions, generated and owned - [Solid Queue](https://rustoffrails.org/docs/guides/jobs),[Cache](https://rustoffrails.org/docs/guides/caching)and[Cable](https://rustoffrails.org/docs/guides/realtime): the database is the infrastructure, no Redis - [Turbo 8 page\-refresh broadcasts](https://rustoffrails.org/docs/guides/realtime)→ signals over SSE - [Action Mailer previews](https://rustoffrails.org/docs/guides/mailers) - [Kamal,`/up`and Docker](https://rustoffrails.org/docs/guides/deployment)by default - [`bin/rails`tasks](https://rustoffrails.org/docs/cli)→ one`app`binary - [Credentials and env discipline](https://rustoffrails.org/docs/guides/config) ### From Elixir and Phoenix - [Oban](https://rustoffrails.org/docs/guides/jobs): persistent jobs with states, unique jobs, cron, snooze - [Oban Web](https://rustoffrails.org/docs/guides/jobs-dashboard)→ the live`/admin/jobs`dashboard - [Swoosh's local mailbox](https://rustoffrails.org/docs/guides/mailers)→`/dev/mailbox` - [phx\.gen\.auth](https://rustoffrails.org/docs/guides/auth): magic links and the "check your mailbox" dev hint - [LiveDashboard](https://rustoffrails.org/docs/guides/dev-tools)→ the`/dev`toolbox - [The pending\-migrations page](https://rustoffrails.org/docs/guides/dev-tools), with its "Run migrations" button - [Ecto's explicit data layer](https://rustoffrails.org/docs/guides/models): changesets, no callbacks - [Channels, Presence and PubSub](https://rustoffrails.org/docs/guides/realtime)in progress - [Distributed nodes and "let it crash" supervision](https://rustoffrails.org/docs/guides/deployment)in progress And also - [htmx](https://rustoffrails.org/docs/guides/frontend-htmx) - [Inertia\.js](https://rustoffrails.org/docs/guides/frontend-inertia) - [Tailwind](https://rustoffrails.org/docs/guides/views) - [shadcn\-style owned components](https://rustoffrails.org/docs/stack) - [ts\-rs end\-to\-end types](https://rustoffrails.org/docs/guides/frontend-react) - [Svelte](https://rustoffrails.org/docs/guides/frontend-svelte) - [Playwright](https://rustoffrails.org/docs/guides/testing) Field tests ## Real apps,*ported by agents*\. Agents port well\-loved open\-source apps to Rust off Rails\. Every rough edge they hit goes back into the framework\. - from FizzyIn progress ### [fizzyer](https://rustoffrails.org/field-tests#fizzyer) Fizzy's boards and cards, rebuilt in Rust by agents\. - from FreeScoutIn progress ### [A FreeScout port](https://rustoffrails.org/field-tests#freescout) A shared\-inbox help desk, built by agents on another machine\. - from Uptime KumaBuilt ### [uptime\-offrails](https://rustoffrails.org/field-tests#uptime-offrails) 1530 of 1530 tests green on SQLite and Postgres\. Get started ## Install the plugin\. Describe the app\.*Watch\.* ### 1With Claude Code \(recommended\) ``` /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…"\)\. ### 2With Codex, Cursor, or any agent that reads`AGENTS\.md` ``` Read /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\. ### 3Then 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](https://rustoffrails.org/start)[How you'll use it](https://rustoffrails.org/guide)[Read the docs](https://rustoffrails.org/docs)[Star on GitHub](https://github.com/rust-off-rails/rustoffrails)

Similar Articles

From Rust to Ruby

Hacker News Top

Developer describes converting a 15,000-line Rust web application to Ruby on Rails using an LLM, finding the Ruby version significantly shorter and evaluating trade-offs in development speed, safety, and testability.

Learnings from 100K lines of Rust with AI (2025)

Hacker News Top

A developer shares learnings from building a 100K-line Rust-based multi-Paxos consensus engine using AI coding agents, achieving dramatic productivity gains and performance improvements.