This file is the working guide for contributors and coding agents making changes in this repo. Keep it aligned with the actual codebase, deployment model, and live Supabase shape.
- Frontend: React 19 + TypeScript + Vite
- Styling: Tailwind CSS via PostCSS
- Backend: Supabase Auth + Postgres
- Deployment: Vercel static deployment
- Runtime model: browser SPA talking directly to Supabase; no custom app server in this repo
Verified against Supabase on 2026-03-21:
profilessettingsmembersmarksinvite_codesaudit_logs
RLS is enabled on all of those tables.
Important database functions present in the live project:
claim_invite_codecleanup_old_invite_codescurrent_app_rolevalidate_invite_code
components/: UI and page componentshooks/: cross-cutting React hooksservices/: Supabase access, auth helpers, and settingsdocs/: active documentation and runbookstests/: Playwright smoke specs and manual E2E runbooks.github/workflows/: CI and operational workflows
npm install
npm run dev
npm run build
npm run preview
npm run typecheck
npm run test
npm run test:run
npm run test:coverage
npm run test:e2eClient-side variables:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYVITE_APP_URLfor auth redirect URLs in deployed environments
CI/browser smoke-test variables:
E2E_TEST_EMAILE2E_TEST_PASSWORD
Rules:
- Never put privileged secrets in
VITE_*variables. .envand.env.localmust stay untracked.- Keep
.env.examplelimited to variables that are actually used by the app or workflows.
- Production deploys go through Vercel.
- Keep
vercel.jsonaligned with SPA routing requirements. - Do not reintroduce local Express or Docker serving paths unless there is a real deployment need.
- Do all change work on a git branch, not directly on
main. - Create or switch to an appropriate branch before making repo changes.
- When the task is complete, open a pull request for that branch before asking for final operator action.
- After the pull request exists, ask the operator whether they want the PR merged to
mainand the branch deleted. - Do not merge to
mainor delete the branch without explicit operator approval.
- Treat the live Supabase project as the source of truth for schema and RLS.
- Prefer MCP Supabase migrations and inspection tools for schema work.
- Document any schema or permission change in the relevant docs.
- Keep app code and docs aligned with the live schema names (
profiles,members,marks), not legacy names.
ARCHITECTURE.mdis the canonical system overview.AGENTS.mdis the operational guide for contributors/agents.docs/contains subordinate runbooks and references.
When changing behavior:
- Update docs in the same pass if the change affects setup, deployment, schema, permissions, or user workflows.
- Remove stale references instead of leaving TODOs for already-decided systems.
- Prefer deleting dead files over documenting unused paths.
- Keep dependencies aligned with actual runtime usage.
- Remove legacy terminology when the underlying system has changed.