Deployment Guide
How to deploy SavvySolve to Vercel
Deployment Guide
SavvySolve deploys to Vercel, the platform built by the creators of Next.js. This guide covers the complete deployment process from local development to production.
Architecture Overview
The deployment architecture uses:
- Vercel for serverless compute and hosting
- Neon for serverless Postgres database
- Clerk for authentication
- Telnyx for SMS/voice
Code flows through GitHub, while configuration is managed via Vercel CLI.
Prerequisites
Before deploying, ensure you have:
- Vercel Account - Sign up
- Environment variables ready (from
.env.local) - GitHub repository (optional, for CI/CD)
Initial Setup
1. Login to Vercel
bunx vercel loginThis opens a browser for authentication.
2. Verify Authentication
bunx vercel whoamiEnvironment Variables
Set each environment variable for production:
# Database
bunx vercel env add DATABASE_URL production
bunx vercel env add DATABASE_URL_UNPOOLED production
# Authentication (Clerk)
bunx vercel env add CLERK_SECRET_KEY production
bunx vercel env add NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY production
# SMS/Voice (Telnyx)
bunx vercel env add TELNYX_API_KEY production
bunx vercel env add TELNYX_PHONE_NUMBER production
bunx vercel env add TELNYX_APP_ID production
bunx vercel env add TELNYX_SIP_USERNAME production
bunx vercel env add TELNYX_SIP_PASSWORD productionEach command will prompt for the value. Paste from your .env.local.
Listing Environment Variables
bunx vercel env lsRemoving Environment Variables
bunx vercel env rm VARIABLE_NAME production --yesDeployment
Preview Deploy
Deploy a preview version (for testing):
bunx vercelProduction Deploy
Deploy to production:
bunx vercel --prod
# or
bun run deployView Deployments
bunx vercel lsGitHub Integration (CI/CD)
For automatic deployments on push:
- Go to Vercel Dashboard
- Select your project → Settings → Git
- Connect your GitHub repository
- Configure:
- Production Branch:
master - Preview Branches: All other branches
- Production Branch:
Now every push to master auto-deploys to production.
Custom Domain
To add a custom domain:
- Go to Vercel Dashboard → Project → Settings → Domains
- Add your domain (e.g.,
savvysolve.io) - Update DNS records as instructed
Or via CLI:
bunx vercel domains add savvysolve.ioUseful Commands
# Authentication
bunx vercel login # Login to Vercel
bunx vercel logout # Logout
bunx vercel whoami # Check current account
# Deployment
bunx vercel # Preview deploy
bunx vercel --prod # Production deploy
bunx vercel ls # List deployments
# Environment Variables
bunx vercel env ls # List env vars
bunx vercel env add NAME # Add env var
bunx vercel env rm NAME # Remove env var
# Domains
bunx vercel domains ls # List domains
bunx vercel domains add DOMAIN # Add domain
# Logs
bunx vercel logs # View logs
bunx vercel logs --follow # Tail logsVercel Limits (Free Tier)
| Resource | Limit |
|---|---|
| Function size | 250 MB uncompressed |
| Bandwidth | 100 GB/month |
| Function invocations | 150,000/month |
| Function memory | 2 GB RAM |
| Projects | Unlimited |
| Deployments | Unlimited |
Troubleshooting
Build Fails with Database Error
Ensure DATABASE_URL is set correctly:
bunx vercel env lsIf the value looks wrong, remove and re-add it:
bunx vercel env rm DATABASE_URL production --yes
bunx vercel env add DATABASE_URL productionGit Author Permission Error
If you see "Git author must have access to the team":
- Go to Vercel Dashboard → Team Settings → Members
- Add your Git email address as a team member
Environment Variables Not Available
Environment variables set after a deployment require a redeploy:
bunx vercel --prod