Features

Declarative Models

Define your data model once with #[derive(DeclarativeModel)]. The framework generates REST API endpoints, validation, persistence, audit trail, replication, and RBAC checks automatically.

Event Sourcing

Every state change is captured as an immutable event. No UPDATE or DELETE — only event appends. This gives you a complete audit trail and time-travel debugging.

Built-in Security

  • RBAC — Declarative roles and permissions
  • MFA/TOTP — Auto-generated endpoints, compatible with Google Authenticator
  • Session Management — Event-sourced, persisted to disk
  • Route Guards — Declarative URL pattern protection

Schema Migration

Modify your struct, restart — Lithair detects changes automatically. Four modes: Auto, Manual, Warn, and Strict.

Raft Consensus

Embedded distributed consensus. Add nodes, they elect a leader, replicate state, and handle failover — no external coordinator needed.