Rok gives you everything for production web apps: a fluent ORM, JWT auth, background jobs, caching, mail, WebSockets, search, i18n, feature flags, telemetry, and an interactive CLI — all on Axum 0.8 and SQLx 0.8.
One workspace. Zero glue code.
50+ commands: scaffold projects, generate code, run migrations, manage queues, launch TUI dashboards, and integrate AI agents.
Eloquent-inspired query builder with relationships, pagination, soft deletes, scopes, factories, and PostgreSQL / MySQL / SQLite support.
JWT, session, social OAuth (Google, GitHub, Discord), magic-link, RBAC, ACL, policies — all wired with proc-macro guards.
Built on Axum 0.8 with async throughout, compile-time checked SQL via SQLx, and single-binary deployment.
SMTP, Postmark, Resend drivers. Multi-channel notifications (email, Slack, webhook) with an elegant Mailable trait.
PostgreSQL and Redis-backed queue with retries, delays, dead-letter queues, and cron scheduling.
Driver-swappable storage (Local, S3) with model-attached media, streaming uploads, and signed URLs.
Real-time pub/sub with built-in presence channels and room management on top of Axum WebSocket.
Unified search API for PostgreSQL FTS, Meilisearch, and Typesense with derive-based indexing.
AES-256-GCM encryption, Argon2/Bcrypt/Scrypt hashing, CORS, CSP/HSTS headers, rate limiting, and distributed locks.
OpenTelemetry traces, metrics, and structured logs with OTLP exporter and Prometheus scrape endpoint.
Database-backed flags with percentage rollout, user targeting, and segment rules — flip features without deploys.
Rok's proc-macros and fluent builders give you Rails-/Laravel-style developer happiness without sacrificing type safety, memory safety, or performance.
// Eloquent-style query builder
let users = User::filter("active", true)
.order_by_desc("created_at")
.limit(20)
.get()
.await?;
// Relationships
let posts = User::has_many::<Post>("user_id")
.get().await?;
// Soft deletes, scopes, pagination
let page = Post::filter("published", true)
.with_trashed()
.paginate(20, page)
.await?;Compared to rolling your own Axum stack.
| Feature | Rok | Bare Axum |
|---|---|---|
| Fluent ORM with relationships | — | |
| JWT + Session + Social auth | — | |
| Proc-macro route guards | — | |
| Background job queue | — | |
| Cron task scheduler | — | |
| Derive-based validation | — | |
| Multi-driver file storage | — | |
| Interactive CLI scaffold | — | |
| OpenTelemetry built-in | — | |
| Zero framework lock-in | ||
| MIT licensed |
One CLI, one command, a production-ready application.
# Install the CLI
cargo install rok-cli
# Scaffold a new project
rok new my-app && cd my-app
# Configure & run
cp .env.example .env && rok secrets:generate
rok db:migrate
rok dev