Data Model Overview
Last reviewed: 2026-06-30
The backend stores operational Product OS data in Postgres through Cloudflare Hyperdrive. D1 remains a legacy/test fallback. Runtime hot-path configuration can come from the bundled config or KV, depending on RUNTIME_CONFIG_SOURCE.
Ownership
Section titled “Ownership”Most records are scoped by tenantId. Platform implementation records also include appId. Customer and operational data should always preserve tenant/app isolation.
Core Groups
Section titled “Core Groups”| Group | Purpose | Representative schemas |
|---|---|---|
| Control plane | Tenant and platform app ownership. | TenantSchema, IosAppSchema |
| Commerce catalog | Store products, billing products, provider mappings and entitlements. | ProductSchema, BillingProductDefinitionSchema, BillingProviderProductSchema |
| Growth runtime | Placements, experiences, experiments and entry flows. | PlacementSchema, ExperienceSchema, ExperimentSchema, EntryFlowSchema |
| Identity and customers | Customer records, identities, auth experiences and migration state. | CustomerSchema, CustomerIdentitySchema, IdentitySettingsSchema |
| Operations | Legal documents, support tickets, refund requests, messaging and review prompts. | LegalDocumentSchema, TicketSchema, RefundRequestSchema, PermissionPlacement |
| Analytics | Usage events, analytics batches, attribution updates and SKAN postbacks. | UsageEventSchema, AnalyticsEventsBatchSchema, AttributionUpdateSchema, SkanPostbackSchema |
Runtime Data Sources
Section titled “Runtime Data Sources”/v1/paywall-entry is latency-sensitive. Production first-open placements should prefer bundle or another compiled asset path. KV is useful for dynamic runtime config but has a colder edge read profile.