Overview
This guide covers deploying Pipeline to production using Vercel for the Next.js application and Supabase for the database.Recommended Stack: Vercel (frontend) + Supabase Pro (database)
Pre-Deployment Checklist
Code Quality
Database
- ✅ All migrations applied (
supabase db push) - ✅ Rollback migrations tested
- ✅ Database types generated and committed
- ✅ RLS enabled on all tables
Security
- ✅ No secrets in code (check
.envis in.gitignore) - ✅ Environment variables configured
- ✅ Service role key secured (server-only)
- ✅ Rate limiting enabled
Step 1: Deploy Supabase Database
1.1 Create Supabase Project
Sign up for Supabase
Go to supabase.com and create an account
Create new project
- Name:
pipeline-production - Database Password: Generate strong password (save securely)
- Region: Choose closest to your users (e.g.,
us-east-1) - Plan: Pro (recommended for production)
1.2 Get Project Credentials
Copy these values from Supabase Dashboard
Copy these values from Supabase Dashboard
Go to Settings → API:
- Project URL:
https://xxxxx.supabase.co - anon/public key:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... - service_role key:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...⚠️ Keep secret!
- Connection string: For direct access (optional)
- Project Ref: 20-character ID (e.g.,
abcdefghijklmnopqrst)
1.3 Link Local Project
1.4 Apply Migrations
1.5 Verify Database
Verify RLS is enabled
Verify RLS is enabled
Step 2: Deploy to Vercel
2.1 Prepare Repository
2.2 Create Vercel Project
Sign up for Vercel
Go to vercel.com and sign up with GitHub
Import repository
- Click “New Project”
- Select your GitHub repository
- Vercel auto-detects Next.js configuration
2.3 Configure Environment Variables
Add these environment variables in Vercel
Add these environment variables in Vercel
Go to Settings → Environment Variables:
2.4 Deploy
Step 3: Post-Deployment Verification
3.1 Health Checks
3.2 Database Connection
Test RLS enforcement
- Create a test user account
- Login and create a job
- Verify job appears in dashboard
- Logout and login as different user
- Verify first user’s job is NOT visible
3.3 Performance Metrics
Monitor these metrics in Vercel Analytics:Core Web Vitals
- LCP: < 2.5s
- FID: < 100ms
- CLS: < 0.1
API Latency
- p95: < 500ms
- p99: < 1000ms
Step 4: Configure Supabase Production Settings
4.1 Authentication Settings
Email Templates
Email Templates
Go to Authentication → Email Templates in Supabase:
- Customize confirmation email
- Customize password reset email
- Add your branding/logo
Site URL & Redirect URLs
Site URL & Redirect URLs
Go to Authentication → URL Configuration:
4.2 Database Settings
Connection Pooling
Connection Pooling
Go to Settings → Database:
- Enable Connection Pooling: ✅
- Mode: Transaction (recommended)
- Pool Size: Based on your plan (Pro: 100)
Backups
Backups
Supabase Pro includes automated daily backups:
- Retention: 7 days
- Point-in-time Recovery: Available
4.3 API Settings
CORS & Rate Limiting
CORS & Rate Limiting
Go to Settings → API:
- CORS Origins: Add your production domain
- Rate Limiting: Configure based on your plan
- JWT Expiry: Default (1 hour) or custom
Monitoring & Observability
Vercel Analytics
Web Analytics
Real-time visitor analytics and Core Web Vitals
Runtime Logs
Function logs, errors, and performance metrics
Supabase Dashboard
Database Health
Monitor connection pool, query performance, table sizes
API Usage
Track API requests, bandwidth, and storage
Set Up Alerts
Vercel Integrations
Vercel Integrations
Go to Integrations in Vercel:
- Slack: Deploy notifications
- Discord: Error alerts
- Sentry: Error tracking (optional)
Rollback Procedures
Quick Rollback (Vercel)
Database Rollback
Rollback single migration
Rollback single migration
Full database restore
Full database restore
Environment Variables Reference
Your Supabase project URL (e.g.,
https://xxxxx.supabase.co)Supabase anonymous/public key (safe to expose to client)
Supabase service role key (bypasses RLS - keep secret!)
Your production app URL (e.g.,
https://your-app.vercel.app)OpenAI API key for AI job matching (optional)
Discord webhook for notifications (optional)
Deployment Checklist
Code & Tests
- ✅ All tests passing (345/345)
- ✅ No TypeScript errors
- ✅ No ESLint warnings
- ✅ Code committed and pushed
Database
- ✅ Supabase project created
- ✅ All migrations applied
- ✅ RLS enabled on all tables
- ✅ Database types generated
- ✅ Backups enabled
Vercel
- ✅ Project created and linked to GitHub
- ✅ Environment variables configured
- ✅ Build successful
- ✅ Domain configured (if custom)
Troubleshooting
Build fails on Vercel
Build fails on Vercel
Common causes:
- Missing environment variables
- TypeScript errors not caught locally
- Node version mismatch
Database connection fails
Database connection fails
Symptoms:
- 500 errors on API calls
- “connection refused” in logs
- Verify
NEXT_PUBLIC_SUPABASE_URLis correct - Check
SUPABASE_SERVICE_ROLE_KEYis set - Test connection from Vercel function logs
RLS blocks all queries
RLS blocks all queries
Symptoms:
- Users can’t see their own data
- Empty results for all queries
Type drift detected
Type drift detected
Solution:
Next Steps After Deployment
Monitor Performance
Watch Vercel Analytics for Core Web Vitals and API latency
Set Up Monitoring
Configure error tracking (Sentry) and uptime monitoring
Enable Analytics
Integrate analytics (Plausible, PostHog) for user insights
Plan Scaling
Review database query performance and optimize indexes
Additional Resources
Vercel Docs
Official Vercel documentation
Supabase Docs
Official Supabase documentation
Next.js Deployment
Next.js deployment guide
Production Checklist
Comprehensive production checklist