Overview
The document detail page is the most information-dense page in the app. It shows everything about a single document: its current status, its risk analysis results broken down by flag, and the verification history. It is the page users return to after receiving a risk alert email.
Background
File to create: frontend/app/(protected)/documents/[id]/page.tsx
Sections:
Header:
- Document name, upload date, file hash (truncated), status badge
Risk panel:
- Circular gauge showing the overall risk score (0–100) — colour-coded (see FE-19)
- Flag breakdown: for each of the 6 risk flags, show name, weight, whether it was detected (✓/✗), and its contribution to the total score
Status timeline:
- Vertical timeline: PENDING → ANALYZING → VERIFIED/FLAGGED/REJECTED
- Current step highlighted; completed steps checked
Actions:
- "Verify on Stellar" button (only if status is PENDING or FLAGGED)
- "Download Report" button →
/documents/:id/report
- "File Dispute" button
- "Share" button → opens share modal
Acceptance Criteria
Overview
The document detail page is the most information-dense page in the app. It shows everything about a single document: its current status, its risk analysis results broken down by flag, and the verification history. It is the page users return to after receiving a risk alert email.
Background
File to create:
frontend/app/(protected)/documents/[id]/page.tsxSections:
Header:
Risk panel:
Status timeline:
Actions:
/documents/:id/reportAcceptance Criteria
GET /api/documents/:idandGET /api/documents/:id/riskPOST /api/documents/:id/verifyand updates the UI on success