Skip to content

[Feature] Build a pool member invitation system with QR code generation and deep link handling #187

Description

@Sendi0011

Getting Started

  1. Fork the repository: https://github.com/JointSave-org/Joint_Save
  2. Clone your fork:
git clone https://github.com/<your-username>/Joint_Save.git
cd Joint_Save
  1. Create a new branch:
git checkout -b feat/pool-invite-qr-codes

Overview

Pool creators currently share invite links by manually copying the pool contract address and sending it over messaging apps. The existing /join/[contractId] route and join_requests table already support the invite flow, but the sharing experience is manual and error-prone — users must copy-paste a long Stellar address string, and there's no visual confirmation of which pool they're joining.

This issue adds QR code generation for pool invite links and deep link handling so pool creators can share a scannable QR code and members can join with a single scan.

Requirements

QR Code Generation

  • Install qrcode.react (or qrcode if React-specific wrapper not needed) as a new dependency
  • New component: PoolInviteQR on the group detail page (admin-only):
    • Renders a QR code encoding the full invite URL: https://[domain]/join/[contractAddress]
    • Below the QR code: pool name, pool type, and member count for confirmation
    • "Download QR" button that exports the QR code as a PNG file (use qrcode library's server-side rendering or canvas-to-blob approach)
    • "Copy Link" button that copies the invite URL to clipboard with a toast confirmation

Share Sheet Integration

  • Add a "Share Invite" button on the group detail page that triggers the Web Share API (navigator.share()) with:
    • Title: "Join [pool name] on JointSave"
    • Text: "Join my [pool type] savings pool on JointSave. [description if set]"
    • URL: the invite link
  • Fall back to a share modal with platform-specific buttons (copy link, download QR, email) if Web Share API is unavailable

Deep Link Handling

  • Update the /join/[contractId] page to:
    • Read the from query parameter (optional) to track where the user came from (e.g., ?from=qr_scan)
    • Log the join method in the pool_activity table (activity_type: join_link_clicked, with metadata containing the referral source)
    • Display the pool preview (name, type, member count, total saved) before the user commits to joining — this already exists in the join page but should be verified to work correctly

Mobile Optimization

  • The QR code should be large enough to scan from a phone screen (minimum 200x200px)
  • The "Share Invite" button should be prominently placed (not hidden in a dropdown) on mobile

Acceptance Criteria

  • QR code renders correctly on the group detail page for pool admins
  • QR code encodes a valid URL that loads the /join/[contractId] page
  • "Download QR" exports a readable PNG image
  • "Copy Link" copies the invite URL and shows a confirmation toast
  • "Share Invite" triggers the native share sheet on supported browsers
  • Deep link from QR scan correctly loads the pool preview on the join page
  • Join method (qr_scan, direct_link, share) is logged in pool_activity
  • QR code is scannable from a phone screen at typical reading distance

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignThird CampaignCampaign: Third CampaignfeatureNew functionality to addmedium-complexityNot too complex, Few files and some planning needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions