A full-stack subscription platform that blends golf performance, real rewards, and meaningful impact.
Built to simulate a real-world SaaS product, this system combines:
- 📊 Score tracking
- 🎁 Monthly reward draws
- ❤️ Charity contributions
- 💳 Subscription billing
👉 https://golf-charity-platform-woad-gamma.vercel.app
Most golf apps track performance.
Some platforms offer rewards.
Very few connect personal improvement → incentives → impact.
This platform does all three.
You play better → you stay consistent → you contribute → you get rewarded.
graph TD
A[User signs up] --> B[Subscribe via Stripe]
B --> C[Subscription stored via webhook]
C --> D[User adds golf scores]
D --> E[Latest 5 scores stored]
E --> F[Admin creates monthly draw]
F --> G[Draw simulated + published]
G --> H[Winners generated]
H --> I[User uploads proof]
I --> J[Admin verifies]
J --> K[Payout completed]
- Supabase Auth (email/password)
- Role-based system (admin vs subscriber)
- Secure session handling (server-side)
- Monthly & yearly plans
- Stripe Checkout integration
- Webhook-driven state sync
- Access gating based on subscription status
- Stores only latest 5 scores
- Automatic rolling replacement
- Stableford scoring format
- Reverse chronological ordering
- Admin-controlled draw lifecycle:
- Draft → Simulate → Publish
- Score snapshot-based entry system
- Match tiers:
- 3-match
- 4-match
- 5-match (jackpot)
- Prize pool distribution
- Jackpot rollover logic
- Users upload proof (image/PDF)
- Stored securely via Supabase Storage
- Admin review system:
- Approve / Reject
- Payment tracking:
pending → paid
- Create & manage draws
- Simulate outcomes before publishing
- Review winner claims
- Platform analytics overview
- Select a charity
- Choose contribution %
- Track user preference
- Designed for future impact reporting
| Layer | Tech |
|---|---|
| Frontend | Next.js (App Router, Server Components) |
| Backend | Server Actions (no REST bloat) |
| Database | Supabase (PostgreSQL + RLS) |
| Auth | Supabase Auth |
| Payments | Stripe |
| Storage | Supabase Storage |
| Deployment | Vercel |
- All user data is protected at the database level
- No reliance on frontend trust
- Direct DB + Stripe interaction
- Eliminates API layer complexity
- Cleaner, more maintainable architecture
- Stripe events → Supabase state
- Ensures source of truth = Stripe
Handles:
- subscription activation
- renewal
- cancellation
- Prevents Vercel build failures
- Ensures runtime-only secret usage
git clone https://github.com/YOUR_USERNAME/golf-charity-platform.git
cd golf-charity-platformnpm installNEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
NEXT_PUBLIC_APP_URL=http://localhost:3000
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=npm run dev- Create Supabase project
- Run
init.sql
- RLS
- Storage bucket:
winner-proofs
- Monthly
- Yearly
https://your-domain.vercel.app/api/stripe/webhookcheckout.session.completedcustomer.subscription.updatedcustomer.subscription.deleted
vercel --prod- Signup / login
- Subscription checkout
- Webhook updates DB
- Dashboard unlocks
- Add scores (max 5)
- Create + publish draw
- Upload proof
- Admin approves
- Mark payout as paid
- End-to-end SaaS architecture
- Payment systems + webhooks
- Secure database design (RLS)
- Admin workflows
- Real-world product thinking
- Production deployment
- Handling Stripe webhooks across environments
- Avoiding build-time secret crashes (lazy init pattern)
- Designing clean server-action architecture
- Maintaining data integrity with rolling score logic
- Syncing multiple systems (Stripe ↔ Supabase)
- Email notifications (wins, renewals)
- Leaderboards
- Charity impact analytics
- Mobile app (React Native)
- Fraud detection for proof uploads