database
backend
devops
integrations
Added database repository layer with DatabaseService, 16 repositories, and tests
- Database facade and repositories — Added a DatabaseService facade and a lazy `db` singleton that expose 16 fully typed repository classes covering every table in the SuprLogs schema (projects, commits, changelog entries, prompts, entitlements, subscribers, audit, etc.).
- Comprehensive tests and type safety — Added 136 Vitest unit tests (all passing) and hand-written TypeScript types for the full schema; TypeScript compiled with zero errors.
Repository layer
- Added DatabaseService and a lazy `db` singleton that instantiate and expose repository classes for every table.database
- Implemented 16 repositories with explicit input/output interfaces and business methods (entry publish/approve/reject, prompt versioning, entitlement resolution, subscriber workflows, audit logs, etc.).backend
Service client
- Added createDatabaseClient() factory to create a service-role Supabase client (server-only; requires SUPABASE_URL and SUPABASE_SERVICE_KEY).backend
Testing & quality
- Added 16 Vitest test files with 136 unit tests covering each repository; all tests passed and package TypeScript typecheck produced no errors.devops
- Updated packages/database/package.json with test scripts and devDependencies for vitest and @vitest/ui.devops
Types & schema
- Added a hand-written src/types.ts that defines the full Database type (Row/Insert/Update/Relationships) for all 19 tables and referenced the schema docs.database
- Updated changelog and documentation references to include the new repository layer and schema details.