Skip to main content

Crate arc_web

Crate arc_web 

Source
Expand description

Arc framework runtime.

Holds the reusable web/runtime machinery — Actix middleware, Tera helpers, the event-sourced stack wiring, the websocket transport, and the server bootstrap — behind a builder seam. Applications depend on this crate by version and plug their own aggregate, projectors, and routes in through ArcApp::builder. No concrete domain type lives here: the runtime is generic over arc_core::aggregate::Aggregate.

Modules§

commands
helpers
http
websocket

Structs§

AppState
Shared application state accessible by request handlers via web::Data.
ArcApp
Entry point to the framework. Applications register one or more aggregate types, their projectors, and routes, then drive the result with ArcAppBuilder::serve.
ArcAppBuilder
Application builder holding type-erased registrations for every aggregate served by the process. Each registration produces its own typed CommandBus<A> while sharing the configured storage backend.
ProjectorReg
A read-model projector plus the view (table) it maintains. Applications register these against their aggregate so the framework can drive synchronous, read-after-write projections in single-process mode.

Functions§

check_app_health
Copies .env.example to .env when no .env file is present.
check_database_health
Verifies database availability for the configured driver. For file-backed drivers (SQLite) this checks the DATABASE_URL file exists and exits with code 1 if missing. Connection-string drivers (Postgres) skip the check.
validate_environment
Fails fast if required environment variables are missing.