Overview
Administrators need an analytics dashboard to understand platform usage trends and the health of the document pipeline. This page visualises the aggregate stats from GET /api/admin/stats (BE-72) as charts and KPI cards.
Background
File to create: frontend/app/(protected)/admin/stats/page.tsx
Access: Admin role only
Charts:
- Document submissions over time — line chart (last 30 days, one data point per day)
- Risk flag distribution — horizontal bar chart showing how often each flag is triggered
- Document status distribution — donut chart (PENDING / VERIFIED / FLAGGED / REJECTED)
- Verification success rate — gauge showing % of anchor jobs that succeeded
KPI cards (top row):
- Total documents, Total users, Avg risk score, Verification success rate
Date range filter: Apply to all charts simultaneously
Acceptance Criteria
Overview
Administrators need an analytics dashboard to understand platform usage trends and the health of the document pipeline. This page visualises the aggregate stats from
GET /api/admin/stats(BE-72) as charts and KPI cards.Background
File to create:
frontend/app/(protected)/admin/stats/page.tsxAccess: Admin role only
Charts:
KPI cards (top row):
Date range filter: Apply to all charts simultaneously
Acceptance Criteria
GET /api/admin/stats