crates/monetize-ui-server/src/lib.rs
//! The operator console's backend-for-frontend — gunnar-ui-server's shape, for
//! monetize.
//!
//! ```text
//! browser ── REST + SSE, same origin, session cookie ──▶ monetize-ui-server ──▶ monetize-server :50061
//! passkey login holds the bearer native gRPC, six services
//! ```
//!
//! The browser cannot speak monetize's control plane (native gRPC, a bearer it
//! must not hold), so this process does: it terminates passkey sessions for
//! humans, presents the suite bearer to monetize-server on every call, and
//! re-publishes the answers as same-origin JSON and server-sent events. What
//! it adds is the JOIN the console needs and monetize does not do: usage and
//! entitlement per tenant in one row, and the live feed — ONE `Events.Watch`
//! stream off monetize, fanned out to every open browser as SSE, with the old
//! five-second poll kept as the fallback and the switch announced on the feed
//! itself (see [`sse`]).
pub mod accounts;
pub mod api;
pub mod app;
pub mod auth;
pub mod bounded;
/// CODE RED on every console page (2026-10-18).
pub mod code_red;
/// `GET /api/counters`: the guest op and vendor call counts (v2.0 P5).
pub mod counters;
pub mod estates;
pub mod grpc;
pub mod guardian;
/// The ONE box's identity host on edda's core (owner 2026-11-03).
pub mod identity;
/// Whose iron is whose: one estate's part of the account (MAP-SEG, 2026-10-26).
pub mod iron;
pub mod lifecycle;
pub mod money;
pub mod narrate;
pub mod plugins;
/// "Update this box": the ONE box's own update (owner 2026-10-18).
pub mod self_box;
pub mod serve;
pub mod site_order;
pub mod sse;
pub mod state;
pub mod test_purchase;
/// `monetize-ui-server/<version>`.
pub const VERSION_LINE: &str = concat!("monetize-ui-server ", env!("CARGO_PKG_VERSION"));
/// The default listener. gunnar-ui is 8090; this console sits one above it.
pub const DEFAULT_BIND: &str = "127.0.0.1:8091";