Aimabel Platform docs
The handbook for working on this codebase. Start here if you're new; come back when you forget how something works.
Index
- Architecture — tech stack, route layout, multi-tenancy model
- Data model — high-level overview of the three Postgres schemas and how they relate
- Schema reference — auto-generated per-schema reference (tables, columns, views, functions, RLS policies)
- Query catalog — index of named SQL files under
sql/ - Runbooks
- Local setup — clone → running app on
localhost:3000 - Feature workflow — branch → develop → PR → staging → production
- Deploy — environments, CI workflows, secrets, rollback
- Local setup — clone → running app on
What's automated, what's hand-written
| Doc | Source | Refresh trigger |
|---|---|---|
schema/*.md | npm run gendocs (introspects pg_catalog) | every npm run precommit, every push to staging/production via CI |
app/types/supabase/index.d.ts | npm run gentypes | every npm run precommit; CI fails PRs where it's stale |
data-model.md, architecture.md, runbooks | Human | When you change something they describe |
If you add a new top-level concept (a new schema, a new external service, a new deployment target), update the hand-written docs in the same PR.