05. Source of Truth Entities

Matrix

Entity Primary source of truth Secondary copies/usages State
User account (platform) IDK users app + activation flow Stripe customer metadata references Implemented
Customer/client organization IDK clients + companies domain Checkout metadata input values Implemented
Subscription plan catalog IDK subscriptions (SubscriptionPlan) with Stripe sync linkage Public platform page consumes via API Implemented
Purchase/checkout session Stripe session + IDK checkout APIs Public confirmation page polls status Implemented
Active subscription state IDK Subscription synced from Stripe Stripe as external billing authority Implemented
Payment history IDK PaymentHistory + Stripe event data N/A Implemented
Lead Public backend leads API (/api/leads) Used by prototype trigger Implemented
Prototype artifact/session Public backend generation API Potentially external generation services Partial
Customer site/project IDK Site model (sites app) External editor/repo links stored on site Implemented
Ticket/support conversation IDK services ticket models/views FrontApp/ClickUp/GitHub linked workflows Implemented

Key finding

The strongest source-of-truth chain is purchase/subscription/account in IDK. The weakest chain is prototype-to-site linkage, where cross-system identity continuity is not fully explicit in inspected code.