Skip to content

chore: generate typed Supabase client and burn down the TypeScript error baseline #9

Description

@MaxBrych

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

  1. 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
  2. Type the client instances: createClient<Database>(...) in apps/expo/lib/ and apps/web/src/lib/
  3. Fix the fallout incrementally — this can be split across several PRs (per-app, per-feature-area). Partial progress is welcome.

Acceptance criteria

  • Supabase clients are constructed with a generated Database type
  • pnpm typecheck error count drops meaningfully (report before/after in the PR)
  • A documented command or script to regenerate types when the schema changes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions