tokenburn_web/lib.rs
1//! TokenBurn web — a server-rendered dashboard built with
2//! [Topcoat](https://github.com/tokio-rs/topcoat).
3//!
4//! One flat crate, one module per concern:
5//!
6//! | module | what |
7//! |---|---|
8//! | [`app`] | [`ServerOptions`], router construction, [`serve`] |
9//! | [`pages`] | the document shell, the home page and the live shard |
10//! | [`charts`] | clickable, animated SVG charts (stacked bars, donut) |
11//! | [`api`] | JSON + static routes (`/api/report`, `/api/health`, `/style.css`) |
12//! | [`components`] | reusable view components (cards, tables, filters) |
13//! | [`params`] | query-string / signal values → core `Query` |
14//! | [`data`] | loading and shaping the dashboard data |
15//! | [`style`] | the stylesheet |
16//! | [`theme`] | the core's colour themes as CSS custom properties |
17//!
18//! Routes use absolute paths and are registered through `.discover()`, so the
19//! file layout never influences URLs.
20//!
21//! **Live mode** (asset bundle present): filters are signals and the data
22//! refreshes itself over a WebSocket. **Static mode** (no bundle): GET-form
23//! filters and a `<meta refresh>`.
24
25// The live shard takes one plain argument per signal it starts with (Topcoat's shard
26// API has no struct form), and the lint fires inside the generated function.
27#![allow(clippy::too_many_arguments)]
28
29pub mod api;
30pub mod app;
31pub mod charts;
32pub mod components;
33pub mod data;
34pub mod pages;
35pub mod params;
36pub mod style;
37pub mod theme;
38
39mod lifecycle;
40pub use app::{ServerOptions, router, serve};