Skip to content

[FE-20] Build /documents/:id/verify page — Stellar anchoring trigger with tx hash and QR code #832

Description

@mftee

Overview

After a document is uploaded and analyzed, the user needs to explicitly trigger Stellar blockchain anchoring. This page explains what blockchain verification means, lets the user initiate it, and displays the result (transaction hash, explorer link, QR code) after anchoring completes.

Background

File to create: frontend/app/(protected)/documents/[id]/verify/page.tsx

Pre-verification state:

  • Explanation: "Anchoring your document on the Stellar blockchain creates a permanent, tamper-proof record of its existence."
  • Document hash preview (SHA-256)
  • Estimated cost note (Stellar transaction fee)
  • "Anchor on Stellar" button → calls POST /api/documents/:id/verify

Processing state:

  • Progress bar that updates via WebSocket (FE-06)
  • Status: "Submitting to Stellar network..."

Post-verification state:

  • Large green checkmark
  • Stellar tx hash (copyable, links to Stellar explorer)
  • Anchor timestamp and ledger number
  • QR code (from BE-85)
  • "Download Verification Certificate" button → prints a PDF of this page

Acceptance Criteria

  • Pre-verification state shows the document hash
  • Button calls POST /api/documents/:id/verify and transitions to processing state immediately
  • Processing state shows real-time progress via WebSocket
  • Post-verification state shows all Stellar details from GET /api/documents/:id/verification
  • Returns to detail page if the document is already verified

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions