Architecture

Crate layout, the application container, service provider DAG, and milestone plan.

Design principles

PrincipleMeaning
Convention over configurationSensible defaults with explicit opt-out
Type safety as a featureGenerics, lifetimes, and traits replace runtime any blobs
Zero-cost ergonomicsExpressive APIs that compile away where possible
Incremental adoptionUse one crate or the full stack

Workspace layout

One crate per milestone domain; application code lives in app/:

The canonical crate inventory records 42 crates under crates/ + xtask (43 workspace packages). Cargo.toml with members = ["crates/*", "xtask"] is the mechanical source of truth.

Crate map by milestone

MilestoneCrates
M0 Bootstrap & Corerustasea, rustasea-foundation, rustasea-config
M1 Routing & HTTPrustasea-router, rustasea-http, rustasea-openapi
M2 ORM & Databaserustasea-orm, rustasea-macros, rustasea-activitylog, rustasea-mongo
M3 Auth & Validationrustasea-auth, rustasea-validation, rustasea-i18n, rustasea-authlog, rustasea-timezone
M4 Queue, Cache & Eventsrustasea-queue, rustasea-cache, rustasea-events, rustasea-schedule, rustasea-queue-dashboard, rustasea-debugbar
M5 DX, CLI & Testingrustasea-cli, rustasea-testing, rustasea-logging, rustasea-action, rustasea-modules, rustasea-scaffold
M6 Advancedrustasea-broadcast, rustasea-storage, rustasea-search, rustasea-ai, rustasea-jsonapi, rustasea-mail, rustasea-excel, rustasea-image, rustasea-google, rustasea-view, rustasea-inertia*, rustasea-livewire

The container and service providers

Providers follow an explicit register → boot lifecycle with DAG ordering. The framework runs a real topological sort with typed cycle detection (BootError::DependencyCycle), and xtask check-cycles validates the workspace DAG in CI.

rust
// bootstrap/app.rs (shape)
Application::configure()
    .with_providers([AppServiceProvider, RouteServiceProvider])
    .with_routes(routes::web::register)
    .run()
    .await

Unlike Goravel's global facades, state is passed explicitly: AppState reaches handlers through axum::extract::State backed by Arc/OnceLock — no global mutable statics.

Feature gates

The rustasea umbrella crate re-exports the whole framework, but several crates stay behind opt-in features so a core build never links their dependency trees (pay-for-what-you-use).

FeatureExposes
modulesModular application registry, make:module, module:* commands
actionAction pattern adapters for HTTP/queue/CLI/events
googleService-account auth with cached OAuth2 tokens
storage-sftpPure-Rust russh SFTP disk
excelExcel/CSV import-export with queued jobs
imageImage transform pipeline with EXIF auto-orient
debugbarDev request profiler
queue-dashboardQueue metrics history + failed-job surface
mongoMongoDB document store
ai / ai-search / ai-storage / ai-mcpAI SDK, Agent/Tool contracts, MCP server
view / view-runtime-templatesaskama (default) and minijinja (runtime)
inertia / inertia-clientInertia server + WASM client protocol
livewireLivewire analogue (askama components, HTMX swaps)
browserWebDriver e2e harness
integrationDocker-backed Postgres integration tests
fullEvery server-side presentation layer + scaffolder

Always compiled (no feature gate): rustasea-i18n, rustasea-activitylog, rustasea-authlog, and rustasea-search (only its pgvector backend stays opt-in).

Milestones

Milestones are dependency-ordered — each builds only on predecessors, with no cycles.

MilestoneFocus
M0Bootstrap & Core
M1Routing & HTTP
M2ORM & Database
M3Auth, Middleware & Validation
M4Queue, Cache, Scheduling & Events
M5DX, CLI & Testing
M6Advanced (Broadcasting, Search, Filesystem, AI SDK, Real-time)

Last updated Sep 22, 2026