Getting Started
Development Guide
Simple guide to deploy your app on Vercel, Supabase and Paddle payments
Prerequisites
- GitHub repository ready
- Production Supabase project
- Vercel account
- Paddle account (for payments)
1. Deploy on Vercel
Connect Your Repo
- Go to vercel.com β New Project
- Import your GitHub repository
- Click Deploy
Add Environment Variables
In your Vercel project β Settings β Environment Variables, add:
# App
APP_URL=https://your-app.vercel.app
# Supabase
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_KEY=your-service-key
# Resend (for invite members)
RESEND_API_KEY=your-resend-api-key
# JWT (for invitation access tokens)
JWT_SECRET_KEY=your-random-jwt-secret
# Paddle
NEXT_PUBLIC_PADDLE_ENV=production or sandbox
NEXT_PUBLIC_PADDLE_CLIENT_TOKEN=your-paddle-client-token
PADDLE_API_KEY=your-paddle-api-key
PADDLE_NOTIFICATION_WEBHOOK_SECRET=your-webhook-secret
2. Setup Paddle
Get Paddle Keys
- Go to Paddle Dashboard
- Developer Tools β Authentication
- Copy:
- Vendor ID
- API Key
- Generate Webhook Secret
Configure Webhooks
- In Paddle Dashboard β Developer Tools β Notifications
- Add new destination URL:
https://your-app.vercel.app/api/paddle/webhook
- Select events:
subscription.created
subscription.updated
customer.created
customer.updated
3. Update Supabase Settings
Auth Configuration
- Go to your Supabase project β Authentication β URL Configuration
- Set Site URL:
https://your-app.vercel.app
- Add Redirect URLs:
https://your-app.vercel.app/api/auth/callback https://your-app.vercel.app/api/auth/confirm
Copy Email Templates
Copy templates from /supabase/templates/
to Authentication β Emails β Templates in your Supabase dashboard.
4. GitHub Actions
Your repository already has a workflow for database deployments. Add these secrets in GitHub β Settings β Secrets:
Database Deployment Secrets
SUPABASE_ACCESS_TOKEN=your-supabase-access-token
SUPABASE_DB_HOST=transaction-pooler-url
Your workflow (.github/workflows/supabase.yml
) will:
- Deploy database migrations on every push to
main
Seed Production Database
After GitHub Actions runs successfully, you need to create initial data:
- Go to SQL Editor in your production Supabase dashboard
- Copy content from
/supabase/seed.sql
in your local project - Run the SQL in production
- Check that the
permissions
table has data
5. Custom Domain (Optional)
- In Vercel project β Settings β Domains
- Add your domain:
yourdomain.com
- Update DNS with your provider:
- Update Supabase Site URL to your custom domain
Test Everything
- Visit your app - Sign up/login works
- Test payments - Create a subscription
- Check webhooks - Paddle events received
- Email auth - Confirmation emails sent
That's it! π
Your app is live on Vercel with Paddle payments integrated.