-
Notifications
You must be signed in to change notification settings - Fork 57
Feature: Add referral program — share SYNCRO and earn perks #185
Copy link
Copy link
Open
Labels
BackendStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestfrontendClient/frontend relatedClient/frontend related
Description
Description
Word-of-mouth is the most effective growth channel for tools like SYNCRO. A referral program lets existing users invite friends and earn rewards (extended free tier, premium features, credits), while giving referred users an incentive to join.
Feature Scope
Referral System
Each user gets a unique referral link
https://syncro.app/ref/abc123
Referral Tracking
CREATE TABLE referrals (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
referrer_user_id UUID REFERENCES profiles(id),
referred_user_id UUID REFERENCES profiles(id),
referral_code TEXT NOT NULL,
status TEXT DEFAULT 'pending', -- pending, signed_up, converted
signed_up_at TIMESTAMPTZ,
converted_at TIMESTAMPTZ,
reward_granted BOOLEAN DEFAULT FALSE,
created_at TIMESTAMPTZ DEFAULT NOW()
);
ALTER TABLE profiles ADD COLUMN referral_code TEXT UNIQUE;
ALTER TABLE profiles ADD COLUMN referred_by UUID REFERENCES profiles(id);Referral Flow
- User A shares their referral link
- User B opens the link → referral code saved in cookie/localStorage
- User B signs up →
referred_byset to User A's ID - When User B adds their first subscription ("converted") → trigger reward
Rewards (configurable)
- Referrer: 1 month free premium per successful referral
- Referred: 14-day free trial extended to 30 days
UI Components
Share Panel (in settings or dashboard)
Invite friends to SYNCRO
━━━━━━━━━━━━━━━━━━━━━━━
Your referral link:
https://syncro.app/ref/abc123 [Copy]
[Share on Twitter] [Share on WhatsApp] [Copy Link]
You've referred: 3 friends
Rewards earned: 2 months free premium
Backend Endpoints
GET /api/referrals/stats — referral count, conversions, rewards
POST /api/referrals/validate — validate referral code at signup
GET /api/referrals/code — get user's referral code (generate if missing)
Acceptance Criteria
- Unique referral code generated per user
- Referral tracked from signup through first conversion
- Rewards automatically granted on conversion
- Share panel in dashboard settings
- Social share buttons with pre-filled message
- Referral stats page showing earnings
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BackendStellar WaveIssues in the Stellar wave programIssues in the Stellar wave programenhancementNew feature or requestNew feature or requestfrontendClient/frontend relatedClient/frontend related