Convex setup
Until apex / real launch, FoodTruckNerdz uses a shared-dev Convex deployment (opulent-cobra-206) for data and functions.
If you’re signing up for Convex for the first time, you can optionally use a referral link: https://convex.dev/referral/RYANJO2858 (bonus rules can vary by plan).
Shared-dev data plane (current)
-
Who reads/writes it: local
next dev, Vercel Preview, Vercel Development, and Production (test.foodtrucknerdz.com). -
How the app finds it:
NEXT_PUBLIC_CONVEX_URL=https://opulent-cobra-206.convex.cloud(or the current shared-dev URL). -
Function deploy: Production Vercel builds run
pnpm convex deploywithCONVEX_DEPLOY_KEYfor that same shared-dev deployment. Preview builds skip function deploy and must already pointNEXT_PUBLIC_CONVEX_URLat shared-dev (not an empty unused deployment).
Directory seed / Memphis curated seed / listing media review run against that deployment (npx convex run with the shared-dev deploy key, or /dev/listings).
Local .env.local
Set NEXT_PUBLIC_CONVEX_URL (and, when seeding or pushing functions locally, CONVEX_DEPLOY_KEY / CONVEX_DEPLOYMENT) to the shared-dev deployment.
NEXT_PUBLIC_CONVEX_URL=https://opulent-cobra-206.convex.cloud
CONVEX_DEPLOYMENT=dev:opulent-cobra-206
# CONVEX_DEPLOY_KEY=… (from Bitwarden / Convex dashboard; never commit)
Restart next dev after changing it.
Schema parity (ref vs personal-dev)
When developers split off personal Convex deployments, compare declared schemas and/or table data against the canonical shared-dev/prod deployment:
-
CLI (agents): from
site-nextjs, runpnpm convex:schema-parity(add--datafor row counts,--contentfor body fingerprints,--jsonfor machines). Exit0= parity,1= drift. -
Browser: local
next dev→/dev/schema-parity(gated; same script via/api/dev/schema-parity).
Content fingerprints drop _id / _creationTime so seeded copies can still match across deployments. Cap scans with --max-docs (default 5000) and limit tables with --table NAME.
Credentials: prefer FTN_CONVEX_SCHEMA_REF_URL / FTN_CONVEX_SCHEMA_REF_KEY vs FTN_CONVEX_SCHEMA_DEV_URL / FTN_CONVEX_SCHEMA_DEV_KEY. If unset, both sides fall back to NEXT_PUBLIC_CONVEX_URL + CONVEX_DEPLOY_KEY (useful while everyone still shares one deployment). Never commit keys.