From the repository root:
npm install
npm run devThis runs a single Next.js app that serves both UI pages and API routes.
Copy .env.example to .env.local and set:
DATABASE_URLfor PostgresSUPABASE_URLandSUPABASE_ANON_KEYfor server-side Supabase accessNEXT_PUBLIC_SUPABASE_URLandNEXT_PUBLIC_SUPABASE_ANON_KEYfor browser authS3_BUCKET_NAME,S3_REGION,S3_ACCESS_KEY_ID,S3_SECRET_ACCESS_KEYfor evidence image uploadsS3_PUBLIC_BASE_URL(optional) if you use a custom/public CDN domain for uploaded files
NEXT_PUBLIC_API_URL is optional and usually left blank to use same-origin /api/*.
npm run dev— start full-stack app locallynpm run build— production buildnpm run start— run production servernpm run migrate— apply every SQL migration insupabase/migrations/in order, with a fallback toserver/migrations/for local compatibilitynpm test— resolve flow test
POST /api/waitlistPOST /api/markets/:id/resolveGET /api/health