What problem does this solve?
The dashboard shows only the outcome of the most recent sync. There is no visibility into trends — whether errors are increasing, how many documents are being synced per week, or whether the scheduler is running reliably over time.
Proposed solution
Add a statistics section to the dashboard with a 14-day activity chart and aggregate counters. Data is served from a new /api/stats endpoint and rendered with Chart.js via CDN.
- Bar chart: daily upload count for the last 14 days
- Stat cards: total uploaded (all-time), total skipped, total errors, permanently failed
/api/stats returns JSON, derived from existing sync_log data — no new tables
- Chart updates without full reload via HTMX (depends on
feat/htmx-ui)
Acceptance criteria:
Alternatives considered
Server-side SVG chart generation (without Chart.js) was considered to avoid any JS dependency, but Chart.js via CDN is a single script tag with no build step and produces much better output.
Architecture fit
What problem does this solve?
The dashboard shows only the outcome of the most recent sync. There is no visibility into trends — whether errors are increasing, how many documents are being synced per week, or whether the scheduler is running reliably over time.
Proposed solution
Add a statistics section to the dashboard with a 14-day activity chart and aggregate counters. Data is served from a new
/api/statsendpoint and rendered with Chart.js via CDN./api/statsreturns JSON, derived from existingsync_logdata — no new tablesfeat/htmx-ui)Acceptance criteria:
/api/statsendpoint returns daily counts for the last 14 daysAlternatives considered
Server-side SVG chart generation (without Chart.js) was considered to avoid any JS dependency, but Chart.js via CDN is a single script tag with no build step and produces much better output.
Architecture fit