Deployment
Last updated on 2026-08-30
This guide covers deploying the kit to production with Vercel (hosting), Supabase (database and auth), and Stripe (payments).
Prerequisites
Step 1 — Prepare Supabase for Production
Run Migrations
In your production Supabase project, run the migration files in order via the SQL Editor:
001_schema.sql— Tables002_rls.sql— Row-level security003_triggers.sql— Triggers004_storage.sql— Storage bucket
Configure Auth
-
Go to Auth > URL Configuration
-
Set Site URL to your production domain (e.g.,
https://your-store.com) -
Add redirect URLs:
https://your-store.com/auth/callbackhttps://your-store.com/auth/confirm
-
Enable OAuth providers (Google, GitHub) with production credentials
Create Admin User
- Sign up on your production site
- In Supabase Dashboard, find the user under Authentication > Users
- Edit
app_metadatato include{"role": "admin"}
Step 2 — Deploy to Vercel
Option A: Git Integration
# Push your code to GitHub
git push origin main
# Connect to Vercel
# 1. Go to vercel.com/new
# 2. Import your repository
# 3. Add environment variables (see below)
# 4. Deploy
Option B: Vercel CLI
npm i -g vercel
vercel --prod
Environment Variables
Set these in Vercel Dashboard > Project Settings > Environment Variables:
| Variable | Value | Notes |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
https://xxx.supabase.co |
Your project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
eyJ... |
Public anon key |
SUPABASE_SERVICE_ROLE_KEY |
eyJ... |
Private service role key |
STRIPE_SECRET_KEY |
sk_live_... |
Live Stripe secret key |
STRIPE_WEBHOOK_SECRET |
whsec_... |
Production webhook secret |
NEXT_PUBLIC_APP_URL |
https://your-store.com |
Your production URL |
Important: Use
sk_live_keys for production, notsk_test_. The webhook secret must match the production Stripe webhook endpoint.
Step 3 — Configure Stripe Webhook
- Go to Stripe Dashboard > Webhooks
- Click Add endpoint
- Enter URL:
https://your-store.com/api/webhooks/stripe - Select event:
checkout.session.completed - Copy the signing secret and add it as
STRIPE_WEBHOOK_SECRETin Vercel
Step 4 — Verify Production
After deployment, test the full flow:
- Browse products on the storefront
- Add items to cart
- Go through checkout
- Complete a test payment (use Stripe test mode first if needed)
- Verify the order appears in the admin dashboard
- Check that the order confirmation page loads correctly
Custom Domain
- In Vercel Dashboard > Project Settings > Domains
- Add your custom domain
- Update DNS records as directed by Vercel
- Update
NEXT_PUBLIC_APP_URLto your custom domain - Update Supabase Auth Site URL and redirect URLs
- Update Stripe webhook endpoint URL
Performance
The kit is optimized for production:
- Server Components for initial render (no client-side data fetching)
next/imagefor all product images with lazy loading- Route-level code splitting via the App Router
- Supabase connection pooling for database queries
Monitoring
- Supabase Dashboard — monitor database queries, auth events, and storage usage
- Stripe Dashboard — monitor payments, webhook deliveries, and failed charges
- Vercel Analytics — monitor page load times and Web Vitals
- Vercel Logs — check server-side errors and webhook handler logs