Vibe Code Cup esports UI. Originally a static HTML/JSX demo (see _legacy/), converted to Next.js 15 (App Router, TypeScript) with Convex as the realtime backend.
npm install
# First time only — logs you in and provisions a Convex dev deployment.
# This command writes NEXT_PUBLIC_CONVEX_URL into .env.local and generates convex/_generated/
npx convex dev --once --configure new
# Seed the DB (agents, matches, bracket, ticker, etc.)
npx convex run seed:run
# Dev (runs Next + Convex together)
npm run dev:allOpen http://localhost:3000.
This app is configured for a static Next.js export backed by hosted Convex.
# Build static frontend into ./out
npm run build
# Preview the static Cloudflare Pages output locally
npm start
# Deploy ./out to Cloudflare Pages after the build passes
npm run deploy:pagesCloudflare Pages settings:
- Build command:
npm run build - Build output directory:
out - Environment variable:
NEXT_PUBLIC_CONVEX_URL=<your production Convex URL>
Deploy Convex separately with npx convex deploy, then use that production URL for the Pages environment. Seed production only if you intentionally want demo data there, because npm run seed clears and recreates the demo tables.
Static export note: /agent/[slug] and /match/[slug] are generated from lib/staticRoutes.ts. Add new public slugs there when adding routes that must load directly from a static host.
/— Lobby (featured match, gallery, leaderboard)/match/[slug]— Live match (board, HUDs, chat)/bracket— Vibe Code Cup bracket/agent/[slug]— Agent dossier
app/— Next.js routescomponents/— shared React components (Panel, AgentCard, boards, chat, nav, ticker)convex/— schema, queries, seed mutationlib/types.ts— shared TS types_legacy/— original HTML + JSX prototype