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. ArcApp::builder::<MyAggregate>() yields a builder the application configures with its aggregate, projectors, and routes, then drives with ArcAppBuilder::serve.
ArcAppBuilder
Application builder, generic over the domain aggregate A. The concrete A (e.g. an application’s UserAggregate) is supplied by the application crate; the framework never names it.
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.