Skip to content

Print Escrow Viewer to PDF – “Export Escrow Report” #39

@techrebelgit

Description

@techrebelgit

📄 OSS Task: Print Escrow Viewer to PDF – “Export Escrow Report”

Product: Escrow Viewer (Astro-based dApp)
Type: Feature · Reporting / Export
Difficulty: Medium
Track: Transparency · UX · Reporting
Repo: Escrow Viewer repository


Overview

Add a “Print to PDF” / “Export to PDF” feature to the Escrow Viewer.

Once an escrow is loaded and visible on screen, users should be able to export the current escrow view into a clean, well-structured PDF report.

This feature is essential for:

  • Audits
  • Compliance
  • Sharing with non-technical stakeholders
  • Offline review and record keeping

Context

The Escrow Viewer already presents a rich, structured view of escrow data, including:

  • Escrow metadata
  • Status
  • Assigned roles
  • Milestones
  • Progress indicators

However, there is currently no way to export this information.

This task bridges on-chain transparency with real-world documentation needs.


Goal

Allow users to:

“Export the escrow I’m viewing into a professional PDF report.”

The PDF should reflect what the user sees on screen, but in a print-friendly, organized format.


Button Requirements

  • Label: Export to PDF or Print to PDF

  • Placement:

    • Near other action buttons (View Transaction History)
  • Behavior:

    • Generates a PDF of the currently loaded escrow
    • Downloads the PDF locally
  • Scope:

    • View-only (no signing, no mutation)

PDF Content Requirements

The exported PDF should include, at minimum:

1️⃣ Header Section

  • Trustless Work branding
  • Report title (e.g. Escrow Report)
  • Network (Testnet / Mainnet)
  • Export timestamp

2️⃣ Escrow Summary

  • Escrow ID (contract ID)
  • Description / engagement name
  • Escrow type (Single Release / Multi-Release)
  • Asset / trustline
  • Total amount
  • Platform fee
  • Trustless Work fee (0.3%)

3️⃣ Escrow Status

  • Current escrow status
  • Dispute flag
  • Release flag
  • Resolved flag

4️⃣ Assigned Roles

For each role:

  • Role name
  • Wallet address

5️⃣ Milestones

For each milestone:

  • Milestone name / index
  • Description
  • Amount
  • Status (Pending / Approved / Released / Disputed)

6️⃣ Optional Footer

  • “Generated by Trustless Work Escrow Viewer”
  • Link to Trustless Work website

Important Design Constraint

🚨 The PDF should not be a raw browser screenshot.

Instead:

  • Use a print-friendly layout
  • White or light background (even if Viewer is in dark mode)
  • Clear typography
  • Logical section separation

This is a report, not a screenshot.


Technical Expectations (Flexible)

You may choose the implementation approach, for example:

  • window.print() with print-specific styles
  • Client-side PDF generation (e.g. via a PDF library)
  • Render a hidden “print view” component

What matters:

  • Output quality
  • Correct data
  • Maintainability

Functional Requirements

  • Button only appears when an escrow is loaded
  • PDF reflects the current escrow in the Viewer
  • Export works on both testnet and mainnet
  • No blockchain or API changes
  • No escrow mutation
  • Viewer functionality remains unchanged

Developer Workflow (required)

  • Create a new branch:
feature/escrow-pdf-export
  • Open a PR into main

  • Include:

    • Screenshot of the export button
    • Screenshot or sample of the generated PDF
    • Short explanation of the approach used

Acceptance Criteria

  • PDF is generated successfully
  • Data matches what is shown in the Viewer
  • Layout is readable and professional
  • No dark-mode artifacts in PDF
  • No regressions in Viewer UI

Nice-to-haves (optional)

  • Filename includes escrow ID and date
  • Page numbers in PDF
  • Section anchors / table of contents
  • “Export summary only” vs “full report”

Learning Outcomes (why this task exists)

By completing this task, contributors will learn:

  • How to translate on-chain data into human-readable reports
  • How blockchain transparency maps to real-world documentation
  • How to design print-friendly UX
  • How Web3 apps support audits and compliance workflows

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions