Problem
The repo carries a known baseline of a few hundred pre-existing tsc errors, almost all cascading from an untyped Supabase client (queries return never/any). This is the single biggest code-health debt in the repo, and it makes pnpm typecheck useless as a signal for contributors (see the note in CONTRIBUTING.md).
Approach
- Generate types from the live schema:
supabase gen types typescript (or via the Supabase MCP / dashboard) → check in as e.g. packages/config/supabase-types.ts or per-app types/supabase.ts
- Type the client instances:
createClient<Database>(...) in apps/expo/lib/ and apps/web/src/lib/
- Fix the fallout incrementally — this can be split across several PRs (per-app, per-feature-area). Partial progress is welcome.
Acceptance criteria
Problem
The repo carries a known baseline of a few hundred pre-existing
tscerrors, almost all cascading from an untyped Supabase client (queries returnnever/any). This is the single biggest code-health debt in the repo, and it makespnpm typecheckuseless as a signal for contributors (see the note in CONTRIBUTING.md).Approach
supabase gen types typescript(or via the Supabase MCP / dashboard) → check in as e.g.packages/config/supabase-types.tsor per-apptypes/supabase.tscreateClient<Database>(...)inapps/expo/lib/andapps/web/src/lib/Acceptance criteria
Databasetypepnpm typecheckerror count drops meaningfully (report before/after in the PR)