Rok
v0.2.0 — Phase 42–43 in progress

Full-Stack Rust. Laravel ergonomics.

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.

50+
Crates
3
SQL backends
0
Framework lock-in
MIT
License

Everything production needs

One workspace. Zero glue code.

DX

Powerful CLI

50+ commands: scaffold projects, generate code, run migrations, manage queues, launch TUI dashboards, and integrate AI agents.

Fluent ORM

Eloquent-inspired query builder with relationships, pagination, soft deletes, scopes, factories, and PostgreSQL / MySQL / SQLite support.

Auth Suite

JWT, session, social OAuth (Google, GitHub, Discord), magic-link, RBAC, ACL, policies — all wired with proc-macro guards.

Zero-Cost Performance

Built on Axum 0.8 with async throughout, compile-time checked SQL via SQLx, and single-binary deployment.

Mail & Notifications

SMTP, Postmark, Resend drivers. Multi-channel notifications (email, Slack, webhook) with an elegant Mailable trait.

Background Jobs

PostgreSQL and Redis-backed queue with retries, delays, dead-letter queues, and cron scheduling.

File Storage

Driver-swappable storage (Local, S3) with model-attached media, streaming uploads, and signed URLs.

WebSockets

Real-time pub/sub with built-in presence channels and room management on top of Axum WebSocket.

Full-Text Search

Unified search API for PostgreSQL FTS, Meilisearch, and Typesense with derive-based indexing.

Security

AES-256-GCM encryption, Argon2/Bcrypt/Scrypt hashing, CORS, CSP/HSTS headers, rate limiting, and distributed locks.

Observability

OpenTelemetry traces, metrics, and structured logs with OTLP exporter and Prometheus scrape endpoint.

New

Feature Flags

Database-backed flags with percentage rollout, user targeting, and segment rules — flip features without deploys.

Expressive APIs,
Rust's guarantees.

Rok's proc-macros and fluent builders give you Rails-/Laravel-style developer happiness without sacrificing type safety, memory safety, or performance.

  • Compile-time SQL checking via SQLx macros
  • Proc-macro auth guards (#[require_auth], #[require_role])
  • Derive-based validation and serialization
  • Single-binary, zero-dependency deployment
rust
// 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?;

Why Rok?

Compared to rolling your own Axum stack.

FeatureRokBare 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

Up and running in 60 seconds.

One CLI, one command, a production-ready application.

bash
# 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

Framework progress

Phases 1–10
Core MVC, Auth, ORM
✓ Complete
Phases 11–24
Queue, Storage, WebSockets, Telemetry
✓ Complete
Phases 25–41
ORM v4/5, Audit, ACL, Media, TUI
✓ Complete
Phases 42–43
Redis/MySQL/Typesense drivers
⟳ In progress