Skip to content

Add PDF Export Feature to Trustless Work Escrow Viewer #28

@techrebelgit

Description

@techrebelgit

🧾 Task: Add PDF Export Feature to the Trustless Work Escrow Viewer

🎯 Objective

Enable users to export escrow details into a PDF audit report directly from the Trustless Work Viewer.
This feature will allow auditors, platforms, and participants to generate and download verifiable audit reports for any escrow created on the Stellar Testnet or Mainnet.


🧠 Context

Trustless Work provides open-source dApps for escrow transparency and compliance.
The Escrow Viewer allows users to explore live escrow data on-chain — including roles, milestones, fees, and metadata.

In this task, you will:

  • Create an escrow on Testnet using the Trustless Work BackOffice.
  • View it on the Viewer.
  • Add a new feature that lets users export that escrow’s information into a PDF report.

This marks the first iteration toward a full Escrow Audit Report Generator that will later include transaction history and lifecycle events.


🧩 Deliverable

A new “Export to PDF” feature inside the Escrow Viewer that generates a downloadable PDF audit report with the escrow’s configuration and details.


🧰 Steps to Complete

  1. Create a Test Escrow

  2. Fork the Escrow Viewer Repository

    • Fork the public repo.

    • Create a new branch:

      git checkout -b feature/pdf-export
  3. Implement the Feature

    • Add an “Export to PDF” button to the escrow detail page.

    • On click, generate a PDF report with the following data:

      • Escrow ID
      • Engagement ID
      • Description
      • Roles (marker, approver, receiver, release signer, platform, dispute resolver)
      • Asset information (code, issuer)
      • Platform fee
      • Milestones (titles, amounts, and statuses)
      • Network (Testnet/Mainnet)
      • Timestamp of report generation
    • Include a header (Trustless Work logo, report title) and footer (website + source URL).

    • Recommended libraries: jspdf, pdfmake, or pdf-lib.
      No backend dependency should be required — this must run fully client-side.

  4. Test the Feature

    • Generate and download the PDF using your test escrow.
    • Verify that all escrow information is displayed correctly and that layout adapts for single- and multi-release escrows.
  5. Document Your Work

    • In your Pull Request, include:

      • A short summary of your implementation.
      • A screenshot of the generated PDF.
      • A brief note on any obstacles or improvements you suggest for future iterations.

✅ Acceptance Criteria

  • Viewer displays an “Export to PDF” button on the escrow detail view.
  • The generated PDF includes all visible escrow information (roles, milestones, metadata, and fees).
  • Works for both single-release and multi-release escrows.
  • PDF includes header, footer, date, and network tag (Testnet/Mainnet).
  • The export function runs fully on the client side with no backend dependency.
  • Contributor provides documentation, screenshots, and sample PDF in PR.

🧩 Future Enhancements (Next Iterations)

  • Add transaction history from Soroban Hooks.
  • Include signature hashes or verification QR codes.
  • Add pagination and dynamic styling for long milestone lists.
  • Offer JSON export alongside PDF.

📚 References


💬 Notes for Contributors

  • This is an open-source onboarding task — perfect for first-time contributors to Trustless Work.

  • Focus on delivering a clean, reusable implementation with clear comments and minimal dependencies.

  • Please share your experience, obstacles, and learnings in the GitHub discussion.

  • Tag your PR with:

    Feature: PDF Export
    Product: Escrow Viewer
    

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions