Mobile-first web app to track game scores, per-sport stats, and head-to-head history with friends. Built with Next.js (App Router), Tailwind CSS, and Supabase (PostgreSQL).
- Node.js 20+
- A Supabase project
-
Clone and install
npm install
-
Environment variables
Copy
.env.exampleto.env.localand fill in values from the Supabase dashboard (Project Settings → API):NEXT_PUBLIC_SUPABASE_URL— project URLNEXT_PUBLIC_SUPABASE_ANON_KEY—anonpublic key (used for anon reads where applicable)SUPABASE_SERVICE_ROLE_KEY— service role key (server-only; never commit or expose to the client)SESSION_SECRET— long random string used to sign the session cookie (e.g.openssl rand -hex 32)
-
Database
Apply the SQL migration in Supabase:
- SQL Editor: paste and run the contents of
supabase/migrations/20260329000000_initial_schema.sql, - or use the Supabase CLI:
supabase db push/supabase migration upafter linking the project.
- SQL Editor: paste and run the contents of
-
Run locally
npm run dev
Open http://localhost:3000.
- Push the repo to GitHub (or GitLab / Bitbucket) and import the project in Vercel.
- Add the same environment variables in Project → Settings → Environment Variables.
- Deploy. Production builds require all variables above;
SUPABASE_SERVICE_ROLE_KEYandSESSION_SECRETmust be set for server actions and middleware.
Sign-in is passwordless: users pick a profile from a list. The app sets a signed HTTP-only cookie so only your server actions (using the service role) can write to the database. This is appropriate for casual tracking among friends but is not strong identity proof—treat it as a shared-device / honor-system model.
npm run dev— development servernpm run build— production buildnpm run start— run production servernpm run lint— ESLint