Unclassified

Onboarding to Sync Specification

Tenant Onboarding Flow

Signup → Supabase Auth → Tenant Created → Domain Selection → Connector OAuth
    ↓
Schema Resolution (department × industry) → Tenant Spine Config
    ↓
Connector Connected → Flow Classification (A/B/C) → Initial Hydration
    ↓
Creamy Load (30 days) → Pipeline → Spine → Entity 360 → Twin Active

Step 1: Tenant Creation

  • Supabase auth creates user
  • provision_tenant_spine RPC creates tenant record
  • Tenant bucket computed: B0 (no data)

Step 2: Domain Selection

  • User selects department (CS, Sales, BizOps, etc.)
  • Optional: industry selection (SaaS, Healthcare, etc.)
  • Schema resolved: getSpineConfig(industry, department)
  • Entity types and priority fields determined

Step 3: Connector OAuth

  • User selects connector from IntegrationsHub (filtered by domain)
  • OAuth flow: /api/v1/connectors/:provider/authorize
  • Callback: tokens encrypted and stored
  • Flow classified: A (structured), B (context), C (AI)

Step 4: Initial Hydration

Flow A/B: Creamy Sync

triggerInitialConnectorHydration(env, tenantId, provider)
  → Loader extracts 30 days of data
  → Pipeline queue receives records
  → 8-stage normalizer processes each
  → Spine-v2 writes to schema-routed tables
  → Tenant bucket: B0 → B2 (creamy done)

Flow C: D1 Buffer

initializeD1Buffer(tenantId, provider, env)
  → D1 buffer created for AI source
  → Triage rules applied
  → Approved content → Knowledge UI
  → Tenant bucket stays at current level

Step 5: Progressive Hydration (B0 → B7)

BucketTriggerWhat Happens
B0→B1Domain selectedSchema resolved
B1→B2Creamy sync done30 days of data in Spine
B2→B3Full sync doneComplete historical data
B3→B4Flow B connectedContext (emails, docs) linked
B4→B5Signals activeTwin triggers start firing
B5→B6Flow C activeAI memory feeding Entity 360
B6→B7All layersFull cognitive capability

Sync Entitlements by Plan

PlanSync IntervalMax Records/SyncConnectorsDelta Sync
Free24h1,0001Yes
Starter4h5,0003Yes
Professional1h25,00010Yes
Enterprise15min100,000UnlimitedYes