Unclassified

Developer Onboarding

Repository Structure

integratewise-live/
├── apps/web/          # React SPA (Vite + TailwindCSS)
├── apps/desktop/      # Electron app
├── apps/mobile/       # React Native (Expo)
├── packages/          # Shared packages
│   ├── types/         # TypeScript types (schema, entity360, sync)
│   ├── lib/           # Shared utilities
│   ├── connectors/    # 70+ connector implementations
│   ├── accelerators/  # Domain accelerator sync scopes
│   ├── config/        # Shared config
│   ├── rbac/          # Role-based access control
│   └── spineDb/      # Spine DB client wrappers
├── services/          # Cloudflare Workers (21 services)
│   ├── gateway/       # API gateway + routing
│   ├── spine-v2/      # SSOT + Entity 360 API
│   ├── normalizer/    # 8-stage pipeline + identity resolution
│   ├── pipeline/      # Pipeline orchestration
│   ├── knowledge/     # Context + memory + triage
│   ├── think/         # AI reasoning + Twin triggers
│   ├── act/           # Action execution
│   ├── govern/        # Policy + approval gate
│   ├── workflow/      # Real-time signals + Durable Objects
│   ├── connector/     # Connector management
│   ├── tenants/       # Tenant + OAuth management
│   └── ...            # billing, admin, agents, etc.
└── docs/              # Documentation

Key Concepts

  1. Schema as Backend IP: Frontend never sees entity_type names. BFF transforms to organic labels.
  2. Four Flows: D resolves authority/bindings; A carries structured truth;
    B carries context/evidence; C carries cognitive candidates.
  3. Entity 360: Single unified view. Twin reads only from here.
  4. 8-Stage Pipeline: Every record passes through all 8 stages. No shortcuts.
  5. Govern Gate: Every autonomous action requires approval.

Surface Boundaries

  • The User Workbench is one projection-native work surface.
  • Twin is a silent contextual capability, not a sidebar, destination or separate
    Workbench. It surfaces only through material context or the Four Buttons.
  • Governance is both a shared platform module and the hard execution gate.
  • Neon owns canonical tenant truth; D1/KV hold bounded reconstructable
    operational state; R2 holds evidence bytes.
  • Department, industry and role select RBAC projections, KPIs, fields,
    connectors and capabilities. They do not create physical schemas.
  • L1/L2/L4/L7 remain engineering genealogy and never appear in product UI.
  • The Twin is Cloudflare-native (iw-agent-runtime); there is no OpenWebUI in the product.
  • Twin runtime surfaces use Forest + Paper.

First Steps

# 1. Clone and install
git clone git@github.com:NirmalPrinceJ/integratewise-live.git
cd integratewise-live
pnpm install

# 2. Verify build
pnpm typecheck  # 31/31

# 3. Run tests
pnpm test

# 4. Start dev
pnpm dev

# 5. Open web app
open http://localhost:3000

Making Changes

  1. Create feature branch from main
  2. Make changes
  3. Run pnpm typecheck (must pass 31/31)
  4. Run pnpm test
  5. Push and create PR
  6. OpenClaw triage reviews
  7. Merge to main → auto-deploy

Important Files

FilePurpose
packages/types/src/schema.ts12 domain spine configs, entity types
packages/types/src/entity360.tsEntity 360 type definitions
services/spine-v2/src/index.tsEntity type → table routing (150+ types)
services/think/src/twin-triggers.ts10 Twin trigger definitions
services/normalizer/src/index.ts8-stage pipeline + S7.5 identity resolution
apps/web/src/components/l1/workspace/content-router.tsxAll UI module routing