Data Model
Cronozen manages 200+ tables across its hub-and-spoke ecosystem. This page documents the core entities that define the platform’s multi-tenant architecture.Entity Relationship
Core Entities
unified_actors
The identity layer. Every person in the system is aunified_actor.
One person can have multiple actors (e.g., parent at Center A and instructor at Center B). These are linked via actor family —
findActorFamilyIds() groups actors by shared email or phone.centers
The tenant entity. Each center is an isolated organization.
Tenant types:
center_memberships
The access control layer. Actors access centers through memberships.
Lifecycle:
- No center access without active membership
- No center_id fallback — always explicit membership check
- All transitions are audited
center_tenant_mapping
Cross-service linking between OPS hub and spoke services.whitelabel_agreements
Partner/white-label contract and branding configuration.partner_memberships
Partner organization access control.Partner Admin ≠ Tenant Admin. Partner admins manage centers (create, configure, monitor). Tenant admins manage data within a specific center.
DPU Entities
dpu_records
Decision Proof Unit — tamper-evident audit trail.
Hash computation:
LMS Entities (learn.cronozen.com)
Key Models
Tenant Configuration (JSON)
Data Isolation Pattern
Scoped Prisma
All center-specific queries go through scoped Prisma, which automatically filters bycenter_id:
Row-Level Isolation
Every data table includescenter_id as a foreign key. The scoped Prisma middleware injects WHERE center_id = ? on every query automatically.