Overview
The dashboard is the central landing page after login. It should give users an at-a-glance view of their document portfolio health, recent activity, and any outstanding actions (documents needing verification, documents with high risk scores).
Background
File to create: frontend/app/(protected)/dashboard/page.tsx
Content sections:
Stats row (top):
- Total documents uploaded
- Average risk score (colour-coded: green ≤ 30, yellow 31–60, red > 60)
- Documents pending verification
- Verified documents count
Risk distribution chart:
- A horizontal bar chart showing distribution of documents across PENDING / VERIFIED / FLAGGED / REJECTED statuses
- Use a lightweight charting library (Recharts, already installed, or Chart.js)
Recent documents table:
- Latest 5–10 documents with: name, status badge, risk score, uploaded date, quick-action link to detail page
- "View all" link to
/documents
Action items card:
- List of documents with
FLAGGED status that have not been reviewed (link to their detail page)
Acceptance Criteria
Overview
The dashboard is the central landing page after login. It should give users an at-a-glance view of their document portfolio health, recent activity, and any outstanding actions (documents needing verification, documents with high risk scores).
Background
File to create:
frontend/app/(protected)/dashboard/page.tsxContent sections:
Stats row (top):
Risk distribution chart:
Recent documents table:
/documentsAction items card:
FLAGGEDstatus that have not been reviewed (link to their detail page)Acceptance Criteria
GET /api/documents(calculate counts/averages client-side or useGET /api/admin/statsif available)documentStatusevent is received (FE-06)