Problem Statement
Currently, developers manually write TypeScript interfaces for database rows, leading to out-of-sync types when the schema changes.
Proposed Solution
Integrate the Supabase CLI into the project. Add a generate-types script to package.json that fetches the schema from the local/remote project and outputs database.types.ts. Update the codebase to use these strict types.
Alternatives Considered
Using Prisma, but we want to stick to the native Supabase client for edge compatibility.
Additional Context
Requires setting up a local Supabase environment in Docker or defining a clear workflow in CONTRIBUTING.md.
Problem Statement
Currently, developers manually write TypeScript interfaces for database rows, leading to out-of-sync types when the schema changes.
Proposed Solution
Integrate the Supabase CLI into the project. Add a
generate-typesscript topackage.jsonthat fetches the schema from the local/remote project and outputsdatabase.types.ts. Update the codebase to use these strict types.Alternatives Considered
Using Prisma, but we want to stick to the native Supabase client for edge compatibility.
Additional Context
Requires setting up a local Supabase environment in Docker or defining a clear workflow in
CONTRIBUTING.md.