Tenancy spine
tenants + tenant_members, current_tenant() resolution, row-level isolation on every table.
Phase P0 · engine foundation
Nexus is built engine-first. Tenancy, identity, hierarchy, access, labs and the event bus exist as enforced database contracts before a single product screen ships — so every module that follows inherits isolation and auditability for free.
Platform engines
tenants + tenant_members, current_tenant() resolution, row-level isolation on every table.
One person record, many composable roles: student, lead, employee, teacher, partner, affiliate.
Self-referencing org units with per-tenant unit types and a configurable maximum depth.
Roles live only in user_roles. has_role(), role scopes bound to org-unit subtrees, can_access_org_unit().
Per-tenant feature flags with a global kill switch that overrides every enable.
Append-only events table plus emit_event(): lead.created, payment.received, ai.agent.executed.
No seeded or mock records. Every table enforces row-level security scoped through current_tenant().