chore(chore): plan step 3 Supabase foundation in TODO

This commit is contained in:
bchanot committed 2026-10-08 22:06:37 +02:00
1 parent d9a7bd70b8
commit 62c5a3ac86
1 file changed
+12 -1
+12 -1
View File
@@ -49,7 +49,18 @@ feat/findings-tree-v2 merged (FindingsTreePicker tracked in HEAD); all work belo
- [x] Step 0 — preparation docs in docs/development/ (2026-10-08, validated)
- [x] Step 1 — characterisation tests: 7 files / 91 cases, 2 golden fixtures, docs/development/CHARACTERIZATION_REPORT.md; 271/271, typecheck, lint, build green (2026-10-08, branch feature/step-01-characterisation-tests, awaiting validation)
- [x] Step 2 — monorepo workspace: apps/app via git mv (144 files), root scripts, Node 24 + pnpm 10.13.1 pins, Dockerfile node:24 + filtered build, CI .gitea/workflows/ci.yml, WORKSPACE.md; 271/271, typecheck, lint, build green from root (2026-10-08, branch feature/step-02-monorepo-workspace, uncommitted, awaiting validation)
- [ ] Step 3 — Supabase foundation (next, on validation)
- [ ] Step 3 — Supabase foundation (2026-10-08, branch feature/step-03-supabase-foundation)
- [x] 3.0 context: plan Step 3, BACKEND_ARCHITECTURE §2-§9, business §4.1/§17/§29; Docker socket denied to user → PGlite harness as executable proof, pgTAP kept for `supabase test db`
- [ ] 3.1 supabase/config.toml (CLI pinned as root devDependency) + `supabase/seed.sql` (local users only)
- [ ] 3.2 migration 0001 foundation: schemas private/audit, set_updated_at, audit.audit_logs append-only, private.log_event
- [ ] 3.3 migration 0002 profiles: table, auth.users trigger, protected columns trigger, RLS own row (+ staff read), grants
- [ ] 3.4 migration 0003 platform roles: enum platform_role (owner/admin/moderator/support), profile_roles, private.is_platform_* helpers, grant/revoke RPC with audit, RLS
- [ ] 3.5 pgTAP tests supabase/tests/*.sql (schema, profiles RLS allow+deny, roles allow+deny, audit append-only)
- [ ] 3.6 packages/supabase: PGlite harness (auth shim + migrations) + vitest RLS suite (allow+deny), database.types.ts (generator format) + schema↔types consistency test, browser client factory
- [ ] 3.7 app integration: env.ts supabaseUrl/anonKey, lib/supabase.ts lazy client (null when unconfigured), entrypoint.sh + .env.example + compose; no UI change; tests
- [ ] 3.8 CI: supabase job (start, db reset, test db, gen types diff); check job runs PGlite suite via pnpm -r
- [ ] 3.9 docs: docs/development/SUPABASE.md (start/reset/test/types/bootstrap owner), CLAUDE.md folder map + scopes, README pointer
- [ ] 3.10 verify: typecheck, test:run (271 + new), lint, build; registries + journal; report
---