0%
Vibe44 Logo

Deployment

Deploy to Vercel (recommended) or Railway. Covers repo connection, env vars, build settings, domains, and post-deploy verification.

1. Connect

  1. Push to GitHub / GitLab / Bitbucket
  2. vercel.com → Import → Select repo
  3. Framework: Next.js (auto-detected)

2. Environment Variables

Add all from .env.example to Vercel → Settings → Environment Variables.

Required

VariableSource
NEXT_PUBLIC_APP_URLYour production domain
NEXT_PUBLIC_SUPABASE_URLSupabase → Settings → API
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEYSupabase → Settings → API
SUPABASE_SECRET_KEYSupabase → Settings → API
DATABASE_URLSupabase → Database → Pooler (port 6543)
NEXT_AUTH_SECRETopenssl rand -base64 32 (Required for Production)
CSRF_SECRETopenssl rand -base64 32 (Required for Production)
PAYMENT_PROVIDERstripe / polar / lemon-squeezy / dodo / creem
Payment provider keysProvider dashboard
EMAIL_PROVIDERsendgrid / resend / postmark / brevo
Email API keyProvider dashboard
GEMINI_API_KEYaistudio.google.com
UPSTASH_REDIS_REST_URL + TOKENUpstash Redis for fail-closed edge rate limiting
VariablePurpose
ELEVENLABS_API_KEYVoice (TTS/STT)
SENTRY_DSN + SENTRY_AUTH_TOKENError monitoring
NEXT_EXTERNAL_ANALYTICS_PROVIDERAnalytics
NEXT_PUBLIC_DATAFAST_DOMAINDataFast analytics
NEXT_PUBLIC_SENTRY_REPLAY_ENABLEDSentry Session Replay opt-in
NEXT_PUBLIC_USE_MOCK_DATADemo dashboard data; keep false for production
TRUST_PROXY_HEADERSOptional. Set true only when your ingress strips untrusted forwarding headers before requests reach Next.js. Vercel deployments do not need it.

Production health checks report Redis as unhealthy when Upstash credentials are missing. Do not launch public support, voice, checkout, or authenticated routes without a working Redis limiter.

3. Build Settings

SettingValue
FrameworkNext.js
Buildnpm run build
Output.next
Installnpm install
Node20.x

4. Deploy

git push origin main

Auto-deploys on push. PR previews automatic.

5. Custom Domain

  1. Vercel → Settings → Domains → Add
  2. CNAME: cname.vercel-dns.com
  3. Update NEXT_PUBLIC_APP_URL

Railway (Alternative)

1. Create

railway.app → New Project → Deploy from GitHub.

2. Config

Same env vars as above.

SettingValue
Buildnpm run build
Startnpm start
Port3000

Supabase Production Checklist

StepAction
RLSRun supabase/schema.sql in SQL Editor
Billing indexesApply the latest migration so provider subscription/payment unique indexes exist before enabling paid traffic
Auth providersEnable OAuth in Auth → Providers
Redirect URLsAdd https://yourdomain.com/auth/callback
Email templatesCustomize confirmation, reset, invite
pgvectorEnable in Database → Extensions (for RAG)
PoolerUse pooled connection (port 6543, transaction mode)

Post-Deploy Verification

CheckAction
HomepageVisit production URL
AuthSignup → verify → login → dashboard
DashboardNavigate /dashboard
PaymentsTest checkout (provider test mode)
RedirectsConfirm checkout and portal returns stay on your configured domain
Billing idempotencyReplay duplicate sandbox webhooks and confirm duplicate provider subscription/payment IDs do not create duplicate rows
Account deletionForce provider cancellation failure in test mode and confirm local profile/auth/storage deletion stops
Proxy identityConfirm spoofed x-forwarded-for does not bypass rate limits unless a trusted ingress overwrites it
Voice securityExercise Murf TTS and confirm invalid/private audioFile URLs are rejected server-side
AI chatSend test message
WebhooksConfigure URLs in provider dashboard
EmailContact form → verify delivery
HealthVisit /system for dependency detail; confirm GET /api/health returns only public liveness metadata

Webhook URLs

Stripe:        https://yourdomain.com/api/webhooks/stripe
Polar:         https://yourdomain.com/api/webhooks/polar
Lemon Squeezy: https://yourdomain.com/api/webhooks/lemon-squeezy
Dodo:          https://yourdomain.com/api/webhooks/dodo
Creem:         https://yourdomain.com/api/webhooks/creem

Copyright © 2026 Vibe44. Built with ❤️ by Scale with Alap.