Deployment
Deploy your went application to production with Vercel and other platforms.
Vercel Deployment (Recommended)
Deploy your went application to Vercel in minutes:
1. Connect Your Repository
# Push your code to GitHub git add . git commit -m "Initial commit" git push origin main # Visit vercel.com and import your repository
2. Configure Environment Variables
Add these environment variables in your Vercel dashboard:
DATABASE_URL=your-production-database-url DIRECT_URL=your-production-database-direct-url AUTH_SECRET=your-production-auth-secret NEXTAUTH_URL=https://your-domain.vercel.app RESEND_API_KEY=your-resend-api-key
3. Deploy
Vercel will automatically build and deploy your application. Future pushes to main will trigger automatic deployments.
Zero Configuration: Went applications are optimized for Vercel deployment with no additional configuration required.
Production Database
Set up a production PostgreSQL database with Supabase:
1. Create Supabase Project
- • Visit supabase.com and create a new project
- • Choose a region close to your users
- • Set a strong database password
2. Get Database Connection Strings
In your Supabase dashboard:
- • Click "Connect" button
- • Go to the "ORMs" tab
- • Select "Prisma" as the tool
- • Under ".env.local" tab, copy both connection strings:
# From Supabase ORMs page - .env.local tab DATABASE_URL='your-pooled-connection-string' DIRECT_URL='your-direct-connection-string'
Replace [YOUR-PASSWORD]
with your actual database password.
3. Update Prisma Schema
For optimal performance with Supabase and Vercel, update your prisma/schema.prisma
file:
datasource db { provider = "postgresql" url = env("DATABASE_URL") directUrl = env("DIRECT_URL") }
The directUrl
provides better performance for migrations and introspection with Supabase.
4. Run Migrations
# Set production environment variables locally export DATABASE_URL='your-production-database-url' export DIRECT_URL='your-production-database-direct-url' # Run migrations went db migrate init
Pre-Deployment Checklist
✅ Environment Setup
- □ Production database configured
- □ All environment variables set
- □ AUTH_SECRET generated and secure
- □ NEXTAUTH_URL updated to production domain
✅ Database Migration
- □ Database migrations run successfully
- □ Database schema matches development
- □ Database connection tested
✅ Testing
- □ Application builds successfully
- □ All pages load correctly
- □ API endpoints responding
- □ Authentication flows working
Next Steps
Continue your journey with Went: