Skip to content

feat(collab): agent/lender deal sharing — shareable links and PDF exports #372

Description

@paruff

Problem

Pros share deal analysis with agents (for offer submission) and lenders (for loan pre-approval). No shareable link or PDF export exists.

Acceptance Criteria

  • Create `ShareLink` model: property, created_by, expires_at, access_token, permission_level (view/export)
  • Generate secure random token (UUID4) for shareable URL: `/share//`
  • Share page renders property analysis + underwriting KPIs + sensitivity + exit analysis
  • Add "Export PDF" button on share page (generate PDF via WeasyPrint or ReportLab)
  • PDF includes: property details, KPI table, sensitivity matrix, exit projections, financing comparison
  • Configurable expiry: 24h, 7d, 30d, never
  • Revoke access: owner can disable link at any time
  • E2E test: create share link, access via incognito, verify PDF download
  • Unit tests for token generation and expiry logic

Implementation Guide (for opencode/mimo v2.5)

  1. Create `ShareLink` model in `core/models/sharing.py`
  2. Create `share_view` in `core/views/init.py` with token lookup
  3. Add PDF generation utility using WeasyPrint (server-side)
  4. Create `templates/sharing/share.html` and `templates/sharing/pdf.html`
  5. Add `share_link` creation endpoint (AJAX from property detail)
  6. Add URL pattern `share/uuid:token/`
  7. Tests in `tests/test_share_link.py`

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5:mobilePhase 5: Mobile & CollaborationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions