feat(backoffice): add dashboard statistics with charts

Add GET /stats API endpoint with collection overview, reading status,
format/library breakdowns, top series, and monthly additions.
Replace static home page with interactive dashboard featuring donut
charts, bar charts, and progress bars. Use distinct colors for series
(warning/yellow) across nav, page titles, and quick links.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-15 18:37:53 +01:00
parent 82444cda02
commit cf2e7a0be7
7 changed files with 714 additions and 75 deletions

View File

@@ -11,6 +11,7 @@ mod reading_progress;
mod search;
mod settings;
mod state;
mod stats;
mod thumbnails;
mod tokens;
@@ -114,6 +115,7 @@ async fn main() -> anyhow::Result<()> {
.route("/series", get(books::list_all_series))
.route("/series/ongoing", get(books::ongoing_series))
.route("/series/mark-read", axum::routing::post(reading_progress::mark_series_read))
.route("/stats", get(stats::get_stats))
.route("/search", get(search::search_books))
.route_layer(middleware::from_fn_with_state(state.clone(), api_middleware::read_rate_limit))
.route_layer(middleware::from_fn_with_state(