v0.5.0
slabs-framework
MIT License
Rust 1.85+
Zero Node
Everything you need to build and ship web apps in Rust.
Every HTTP endpoint in Slabs is one self-contained file with raw SQL, explicit transactions, and compile-time discovery. Humans and parallel AI agents can ship twenty endpoints at once with zero merge conflicts.
Install the CLI, generate a standalone application, and run the health check before writing your first endpoint:
cargo install slabs-cli
slabs new app my_app
cd my_app
slabs doctor
slabs dev
slabs new app creates a working project with slabs-framework 0.5, compile-time slab discovery, Tailwind CSS v4, a cargo-chef and Litestream Dockerfile, bundled .claude/skills/, and a GitHub Actions CI workflow. In Rust code, slabs-framework exposes the slabs crate name (use slabs::prelude::*;).
Start here if you want to build something real and see every piece run together.
Jump straight to a task when you know what you need to build, lock down, or deploy.
How-to
Atomic transactions and background jobs
Commit domain writes, queued jobs, audit entries, and signed webhooks together inside BEGIN IMMEDIATE, and guard shared edits with Optimistic Offline Lock.
How-to
Auth, CSRF, and rate limits
Use async Argon2id, __Host-slabs_session cookies, magic links, Bearer tokens, Fetch Metadata CSRF, and client IP limits.
How-to
Compile-time SQL and PostgreSQL
Generate offline .sqlx metadata with slabs db prepare, connect PgDb, and escape SQLite FTS5 search queries.
How-to
Deploy to production and roll back fast
Configure SLABS_ENV, run slabs doctor, generate Kamal, Fly.io, or VPS configs for SQLite or PostgreSQL, replicate with Litestream, and monitor /health/ready.
How-to
Format, scan, lint, and test in CI
Run slabs check --changed and --explain query-plan audits, diff PR route and auth contracts with slabs manifest --diff, and verify flows in slabs dev --ephemeral.
How-to
Use Slabs agent skills
Pair AGENTS.md with five focused skills covering slabs, migrations, code review, deploys, and incident fixes.
How-to
Track incidents, bug reports, and performance
Capture crashes, slow routes, and user bug reports in slabs_incidents, inspect /_slabs/metrics, and fix issues with the CLI and signed webhooks.
Real applications teach faster than isolated snippets. Three full-stack apps rebuilt from Ruby on Rails live in sogamoso/slabs-examples .
Group chat
Campfire
27 slabs and 2 jobs. Live SSE rooms, FTS5 message search, emoji boosts, file uploads, and webhook bots.
Kanban tracker
Fizzy
28 slabs and 2 jobs. Passwordless magic links, Bearer API tokens, native dialog modals with Idiomorph, and signed webhooks.
Publishing
Writebook
25 slabs and 1 job. Markdown pages, picture uploads, SHA-256 conflict checks, fractional ordering, and porter FTS5 search.
Understand why Slabs rejects MVC layers, hidden callbacks, and Node build chains, or look up exact APIs and system tables.
Doctrine
The Slabs doctrine
Eight architectural rules that keep endpoints local, transactions explicit, builds fast, and rollbacks predictable.
Reference
Crates, AppCtx, CLI, and system tables
Exact signatures for all 16 crates, Harness Engineering CLI tools (--changed, --explain, manifest --diff, dev --ephemeral), environment variables, built-in routes, and error codes.
Point your coding agent directly at the plain-text index, the single-file Markdown handbook, or any page’s raw Markdown source under raw/.
Static Markdown exports are generated on every build for direct context loading.