corvix.web.app

Litestar app serving Corvix dashboard data and UI.

This module is the thin assembly layer: it imports the route handlers from the focused corvix.web.* modules, wires them into a single Litestar app with middleware and OpenAPI config, and exposes run() for corvix serve / corvix-web. The route handlers and their business logic live in:

  • routes_pages — SPA/index serving, login/logout, session cookies

  • routes_api/api/v1/* JSON handlers and /metrics

  • sse — the Server-Sent Events snapshot stream

  • health/api/v1/health and the /api/health container alias

  • snapshot / rule_snippets / actions — API implementation helpers

  • storage_provider / runtime_config / assets — shared state and assets

Attributes

app

Functions

_configure_observability(→ None)

Configure structured logging and optional tracing at app startup.

_validate_secret_config(→ None)

Refuse to start when the secret token env vars are misconfigured.

run(→ None)

Run app with uvicorn.

Module Contents

corvix.web.app._configure_observability() None[source][source]

Configure structured logging and optional tracing at app startup.

Runs as a Litestar startup hook so it applies whether the app is launched via corvix serve or directly through uvicorn corvix.web.app:app.

corvix.web.app._validate_secret_config() None[source][source]

Refuse to start when the secret token env vars are misconfigured.

get_env_value cannot tell which of CORVIX_SECRET_TOKEN and CORVIX_SECRET_TOKEN_FILE should win when both are set. Failing fast here — rather than silently disabling auth at request time — is the preferred fix for the fail-open anti-pattern described in issue #128.

corvix.web.app.app[source][source]
corvix.web.app.run() None[source][source]

Run app with uvicorn.