Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 2.2 KB

File metadata and controls

50 lines (36 loc) · 2.2 KB

Deployment

Vercel

The app deploys to Vercel with zero configuration — Next.js is detected automatically.

Steps

  1. Push to GitHub (or GitLab/Bitbucket).
  2. Import the repo in vercel.com/new.
  3. Add all environment variables (see below).
  4. Deploy.

Vercel auto-deploys on push to main. Preview deployments are created for every pull request.

Environment variables

Set these in Vercel → Project → Settings → Environment Variables:

Variable Value
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME Your Cloudinary cloud name
NEXT_PUBLIC_CLOUDINARY_API_KEY Your Cloudinary API key
CLOUDINARY_API_SECRET Your Cloudinary API secret
CLOUDINARY_WEBHOOK_URL Your Vercel deployment URL + /api/cloudinary/webhook
NEXT_PUBLIC_SUPABASE_URL Your Supabase project URL
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY Your Supabase publishable key
SUPABASE_SECRET_KEY Your Supabase secret key

For CLOUDINARY_WEBHOOK_URL use your production domain:

https://your-app.vercel.app/api/cloudinary/webhook

Set this in Cloudinary too: dashboard → Settings → Upload → Upload notifications URL (optional — we pass it per-upload in the signed params, so Cloudinary already knows the URL).

Supabase production setup

  1. Run supabase/schema.sql in your Supabase SQL editor (see Data model).
  2. Enable anonymous sign-ins: Dashboard → Authentication → Sign In / Providers → toggle "Allow anonymous sign-ins".
  3. Enable Realtime replication for cards and battles tables:
    Database → Replication → Tables → toggle cards and battles.
  4. Enable the required add-on in Cloudinary:
    • AWS Rekognition (content moderation)

Cost notes

  • Cloudinary free tier includes transformation credits and a free quota for AWS Rekognition moderation. e_background_removal and moderation consume more credits than basic delivery — monitor usage in the Cloudinary dashboard.
  • Supabase free tier has 500 MB database, 1 GB file storage, and 50k MAUs. Realtime connections are included.
  • Vercel free tier (Hobby) supports personal projects. Edge Function invocations and bandwidth are generous for a demo app.