SmartFall Docs

Vercel Deployment

Deploy SmartFall to Vercel with zero configuration.

Prerequisites

  • GitHub account and repository
  • Vercel account (free or pro)
  • PostgreSQL database (or Convex)

Deployment Steps

1. Connect Repository

  1. Go to https://vercel.com
  2. Click "New Project"
  3. Select your GitHub repository
  4. Authorize Vercel

2. Configure Environment Variables

In Vercel dashboard:

  1. Go to Settings → Environment Variables
  2. Add each variable:
NODE_ENV=production
DATABASE_PROVIDER=prisma
DATABASE_URL=postgresql://...
JWT_SECRET=<strong_secret>
ALLOWED_ORIGINS=https://your-domain.com

3. Deploy

Click "Deploy" button or:

vercel deploy

4. Verify Deployment

curl https://your-project.vercel.app/api/health

Custom Domain

  1. Go to Vercel dashboard
  2. Settings → Domains
  3. Add your domain
  4. Update DNS records as directed

Database Hosting Options

Option 1: PostgreSQL (External)

Use Supabase, Railway, or similar:

DATABASE_URL=postgresql://user:pass@db.example.com:5432/smartfall

Serverless-first approach:

DATABASE_PROVIDER=convex
CONVEX_DEPLOYMENT=prod:deployment-id

Automatic Deployments

Vercel automatically deploys when:

  • Push to main branch
  • Create pull request (preview)
  • Redeploy from dashboard

Monitoring

In Vercel dashboard:

  • Analytics: Usage and performance metrics
  • Logs: Deployment and runtime logs
  • Deployments: History and rollback

Troubleshooting

Build Fails

Check build logs in Vercel dashboard.

Common issues:

  • Missing environment variables
  • TypeScript errors
  • Missing dependencies

Database Connection Fails

Verify:

  • DATABASE_URL is correct
  • Database is accessible from Vercel
  • Firewall allows Vercel IPs

Function Timeout

Increase timeout in vercel.json:

{
  "functions": {
    "api/**/*.ts": {
      "maxDuration": 60
    }
  }
}