StudyStudio
Production Environment

Environment Variables

Production environment variables

Add these to two places for production:

  1. Vercel - Project → Settings → Environment Variables (for the Next.js app)
  2. Convex - npx convex dashboard → Settings → Environment Variables (for anything your Convex functions read)
# ── Convex ─────────────────────────────────────────────
NEXT_PUBLIC_CONVEX_URL=https://<your-project>.convex.cloud
NEXT_PUBLIC_CONVEX_SITE_URL=https://<your-project>.convex.site

# ── Better Auth ────────────────────────────────────────
BETTER_AUTH_SECRET=<random 32+ char secret>

# ── Google Gemini ──────────────────────────────────────
NEXT_PUBLIC_GOOGLE_GEMINI_API_KEY=your-gemini-api-key
GOOGLE_GENERATIVE_AI_API_KEY=your-gemini-api-key

# ── Stripe ─────────────────────────────────────────────
# Only the secret key is required. No product/price ID is needed -
# checkout prices are created dynamically from the plan amount.
STRIPE_SECRET_KEY=sk_live_...

# ── PayPal ─────────────────────────────────────────────
PAYPAL_API_URL=https://api-m.paypal.com
NEXT_PUBLIC_PAYPAL_CLIENT_ID=your-client-id
PAYPAL_CLIENT_SECRET=your-secret

# ── Razorpay ───────────────────────────────────────────
NEXT_PUBLIC_RAZORPAY_KEY_ID=rzp_live_...
RAZORPAY_KEY_SECRET=your-secret

# ── Flutterwave ────────────────────────────────────────
NEXT_PUBLIC_FLUTTERWAVE_PUBLIC_KEY=FLWPUBK-...
FLUTTERWAVE_SECRET_KEY=FLWSECK-...

# ── App ────────────────────────────────────────────────
NEXT_PUBLIC_APP_URL=https://yourdomain.com

# ── Resend ─────────────────────────────────────────────
RESEND_API_KEY=your-resend-api-key
RESEND_SENDER_EMAIL=StudyStudio <noreply@yourdomain.com>

Always use live payment keys in production, and set PAYPAL_API_URL to the live endpoint. Never commit secrets to Git.