Cursorhero Docs

Deployment

Deploy your Cursorhero app to production.

Prerequisites

Before deploying, ensure you have:

  • PostgreSQL database (Supabase, Neon, or Vercel Postgres)
  • GRS AI API key (for the cursor-generator pipeline)
  • Creem account and API key
  • Resend API key
  • (Optional) Volcano Engine API key — only if you ship the /demo pages
  • (Optional) Google OAuth credentials
  • (Optional) S3-compatible storage (Cloudflare R2 recommended)

Deploy to Vercel

1. Push to GitHub

git push origin main

2. Import in Vercel

  1. Go to vercel.com
  2. Import your GitHub repository
  3. Set all environment variables (see Environment Variables)
  4. Deploy

3. Database Migration

After first deploy:

pnpm db:push

4. Configure Webhook

In Creem Dashboard, set webhook URL:

https://your-domain.com/api/payments/creem/webhook

5. Set Up Cron Job

For annual subscription credit grants, configure a cron job to call hourly:

curl -H "Authorization: Bearer YOUR_CRON_SECRET" \
  https://your-domain.com/api/cron/subscription-grants

On Vercel, add to vercel.json:

{
  "crons": [{
    "path": "/api/cron/subscription-grants",
    "schedule": "0 * * * *"
  }]
}

6. Create Admin Account

ADMIN_EMAIL=[email protected] pnpm admin:setup

7. Verify Environment

Make sure production .env has correct values for:

  • BETTER_AUTH_URL — Your actual domain
  • NEXT_PUBLIC_APP_URL — Your actual domain
  • RESEND_FROM_EMAIL — Verified domain sender

Post-Deploy Checklist

  • Database migrated
  • Webhook URL configured in Creem
  • Cron job set up for credit grants
  • Admin account created
  • Email sender domain verified in Resend
  • OAuth redirect URIs updated for production domain
  • Analytics keys configured (PostHog, GA, Clarity)

On this page