CRITICAL story-member-recruitment-peer-mentor-002 5 pts
5
Story Points
Critical
Priority
Member Recruitment
Feature

User Story

As a Peer Mentor (Likeperson)
I want to generate a unique referral link tied to my profile and local association
So that So that any new member who registers through my link is correctly attributed to me and pre-enrolled in my local association

Acceptance Criteria

  • Given the peer mentor opens the recruitment screen, when the referral link widget loads, then a unique short URL is displayed that encodes their user ID and organisation slug
  • Given the peer mentor's referral link has been generated, when they close and reopen the app, then the same link is shown (links are persistent, not regenerated each session)
  • Given the peer mentor's link is generated, when a new user navigates to the link, then the Referral Edge Function resolves it and the registration flow is pre-filled with the referring local association
  • Given the referral link is displayed, when the attribution window is 30 days (default), then sign-ups within 30 days of first clicking the link are attributed to the referrer

Business Value

Personalised referral links are the core mechanism of the feature. Encoding the user ID and organisation slug enables accurate attribution and removes the manual step of asking a new member to choose their local association — both of which are critical to adoption. Supabase Edge Function resolution supports both cold-start and warm-start deep-link scenarios on iOS and Android, ensuring the link works reliably regardless of app state.