-
Notifications
You must be signed in to change notification settings - Fork 21
Description
📄 Feature: Escrow Viewer – Export Escrow Report (PDF)
Product: Escrow Viewer (Astro-based dApp)
Type: Feature · Reporting
Difficulty: Medium
Track: Transparency · Compliance · UX
Repository: Escrow Viewer
📌 Overview
Add a PDF export feature to the Escrow Viewer.
When a user is viewing an escrow, they should be able to generate a structured, professional report representing the current escrow state.
This feature transforms on-chain transparency into an auditable, shareable document.
🎯 Objective
Allow users to:
Export the escrow currently displayed into a structured PDF report suitable for audits, compliance, or stakeholder sharing.
This feature must:
- Preserve data accuracy
- Preserve clarity
- Preserve neutrality
- Not alter escrow state
- Not require wallet interaction
🧭 Why This Matters
The Viewer is a transparency surface.
But enterprises and financial actors often require:
- Printable documentation
- Shareable compliance artifacts
- Offline records
- Attachments for contracts or legal processes
This feature bridges:
On-chain state → Real-world documentation.
🧩 Scope
User Flow
- User loads an escrow in the Viewer
- “Export to PDF” button is visible
- User clicks
- PDF is generated and downloaded locally
No blockchain interaction.
No mutation.
No API changes required.
🔘 Button Requirements
Label: Export to PDF
Visibility:
Only when a valid escrow is loaded.
Placement:
Within the primary action zone of the escrow view.
📑 PDF Content Requirements (Minimum)
The PDF must reflect the current escrow view in structured format.
1️⃣ Report Header
- Trustless Work branding
- Report title (e.g. Escrow Report)
- Network (Testnet / Mainnet)
- Export timestamp
2️⃣ Escrow Summary
- Escrow ID (contract address)
- Description / engagement reference
- Escrow type (Single / Multi-release)
- Asset information
- Total escrowed amount
- Platform fee (if applicable)
- Trustless Work fee (0.3%)
3️⃣ Escrow Status
- Current lifecycle status
- Dispute state (if applicable)
- Release state
- Resolution state (if applicable)
4️⃣ Assigned Roles
For each configured role:
- Role name
- Wallet address
5️⃣ Milestones (if multi-release)
For each milestone:
- Name or index
- Description
- Allocated amount
- Status
6️⃣ Footer (Required)
- “Generated by Trustless Work Escrow Viewer”
- Trustless Work URL
🚨 Important Design Constraint
This must not be a browser screenshot.
The PDF must:
- Use a structured layout
- Use a print-friendly light background
- Maintain typographic clarity
- Separate sections logically
- Avoid dark mode artifacts
Think: compliance document, not UI capture.
🏗 Technical Approach (Flexible)
Implementation method is up to the contributor.
Examples of acceptable approaches:
- Dedicated print layout +
window.print() - Client-side PDF generation
- Dedicated export rendering component
Evaluation will prioritize:
- Output quality
- Data correctness
- Maintainability
- Clean architecture
⚙ Functional Requirements
- Export works for both testnet and mainnet escrows
- PDF reflects currently loaded escrow only
- Viewer behavior remains unchanged
- No regression in existing UI
- No dependency on wallet signing
🧪 Acceptance Criteria
- PDF downloads successfully
- All displayed escrow data is correctly represented
- Layout is readable and professional
- No dark mode artifacts
- No UI regressions
- No mutation of escrow state
- Works in modern browsers
📂 Developer Workflow
- Create branch:
feature/escrow-pdf-export
- Open PR into
main
PR must include:
- Screenshot of Export button
- Sample generated PDF (attached)
- Short explanation of implementation approach
⭐ Nice-to-Haves (Optional)
- Filename includes escrow ID + date
- Page numbers
- Structured multi-page handling for long milestone lists
- Clear section hierarchy
- Export consistency across screen sizes
🧠 Evaluation Criteria
Submissions will be evaluated on:
- Data integrity
- Structural clarity
- Print-readiness
- Implementation cleanliness
- Enterprise usability
- Minimal impact on existing Viewer architecture
🌍 Strategic Context
Escrow transparency is only valuable if it can be:
- Verified
- Shared
- Archived
- Understood outside the Web3 context
This feature makes escrow infrastructure legible to:
- Auditors
- Legal teams
- CFOs
- Investors
- Non-technical stakeholders