Unclassified
IntegrateWise - Complete Integration Manifest
Tier C — Historical. This document is a point-in-time snapshot preserved for reference. For current architecture, see CANONICAL_PLATFORM_ARCHITECTURE.md.
Status: ✅ FULLY BOUND AND INTEGRATED
Date: February 27, 2026
Architecture: L3 → L2 → L1
Integration Overview
┌─────────────────────────────────────────────────────────────────────────┐
│ L1: UI LAYER │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Dashboard│ │ Accounts │ │ Tasks │ │ Calendar │ │ Settings │ │
│ │ (12) │ │ │ │ │ │ │ │ │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │ │
│ └────────────┴────────────┴────────────┴────────────┘ │
│ │ │
│ ┌─────────┴──────────┐ │
│ │ React Hooks (8) │ │
│ └─────────┬──────────┘ │
└──────────────────────────────┼──────────────────────────────────────────┘
│
┌──────────────────────────────┼──────────────────────────────────────────┐
│ L2: API LAYER │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Auth │ │ Entities │ │ Insights │ │ Actions │ │ Tasks │ │
│ │ │ │ API │ │ API │ │ API │ │ API │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │ │
│ ┌────┴─────┐ ┌────┴─────┐ ┌──────────┐ ┌──────────┐ │
│ │ Calendar │ │Dashboard │ │ Settings │ │ Supabase │ │
│ │ API │ │ API │ │ API │ │ Client │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ └────────────┴────────────┴────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
│
┌──────────────────────────────┼──────────────────────────────────────────┐
│ L3: BACKEND │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Supabase PostgreSQL │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
│ │ │ spine_ │ │ knowledge_ │ │ actions │ │ profiles │ │ │
│ │ │ entities │ │ insights │ │ │ │ │ │ │
│ │ └────────────┘ └────────────┘ └────────────┘ └────────────┘ │ │
│ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │
│ │ │ spine_tasks│ │spine_events│ │ settings │ │ RLS │ │ │
│ │ │ │ │ │ │ │ │ policies │ │ │
│ │ └────────────┘ └────────────┘ └────────────┘ └────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
Complete Binding Matrix
L3 → L2 Binding (API Layer)
| Backend Table | API Module | Status |
|---|---|---|
profiles | auth.ts | ✅ Full CRUD + OAuth |
spine_entities | entities.ts | ✅ Full CRUD + 360 view |
knowledge_insights | insights.ts | ✅ Query + Filter |
actions | actions.ts | ✅ HITL Workflow |
spine_tasks | tasks.ts | ✅ Full CRUD |
spine_events | calendar.ts | ✅ Full CRUD |
user_settings | settings.ts | ✅ CRUD |
workspace_settings | settings.ts | ✅ CRUD |
integrations | settings.ts | ✅ Read + Disconnect |
audit_logs | settings.ts | ✅ Read-only |
L2 → L1 Binding (Hook Layer)
| API Module | React Hook | UI Components Using It |
|---|---|---|
auth.ts | useAuth | All protected pages, AppHeader, AppSidebar |
entities.ts | useEntities, useEntityStats | AccountsPage, DashboardPage |
insights.ts | useInsights, useInsightStats | IntelligencePage |
actions.ts | useActions | IntelligencePage, DashboardPage |
tasks.ts | useTasks | TasksPage |
calendar.ts | useCalendar | CalendarPage |
dashboard.ts | useDashboardStats, useDomainEntities, useDomainSignals, useConnectors | DashboardPage, AppHeader, AppSidebar |
settings.ts | useSettings, useUserSettings, useWorkspaceSettings, useIntegrations, useAuditLog | SettingsPage |
Domain View Integration (12 Domains)
| Domain | Entity Types | Hook | Table Columns |
|---|---|---|---|
| Customer Success | account, contact, subscription | useDomainEntities('customer-success') | Account, Health, Stage, ARR, Risk |
| Sales | opportunity, deal, lead, quote | useDomainEntities('sales') | Deal, Value, Stage, Close Date, Confidence |
| RevOps | metric, forecast, territory | useDomainEntities('revops') | Metric, Current, Target, Variance, Trend |
| Marketing | campaign, lead, content | useDomainEntities('marketing') | Campaign, Status, Leads, MQLs, ROI |
| Product & Eng | feature, bug, story, epic | useDomainEntities('product-eng') | Item, Type, Priority, Status, Owner |
| Finance | invoice, transaction, expense | useDomainEntities('finance') | Item, Amount, Status, Due Date, Category |
| Service | ticket, case, article | useDomainEntities('service') | Ticket, Priority, Status, Assignee, SLA |
| Procurement | vendor, purchase_order, contract | useDomainEntities('procurement') | PO, Vendor, Amount, Status, Delivery |
| IT Admin | asset, user, license | useDomainEntities('it-admin') | Asset, Type, User, Status, Expiry |
| Education | student, course, enrollment | useDomainEntities('education') | Student, Course, Progress, Attendance, Grade |
| Personal | task, goal, habit | useDomainEntities('personal') | Item, Type, Due, Priority, Status |
| BizOps | project, process, kpi | useDomainEntities('bizops') | Initiative, Owner, Status, Progress, Impact |
Route Integration
Marketing Routes (Public)
/ → HomePage
/platform → PlatformPage
/who-its-for → WhoItsForPage
/pricing → PricingPage
/security → SecurityPage
/story → StoryPage
/integrations → IntegrationsPage
/login → LoginPage (with useAuth)
* → NotFound
App Routes (Protected)
/app → DashboardPage (12 domain views)
/app/dashboard → DashboardPage
/app/accounts → AccountsPage (useEntities)
/app/tasks → TasksPage (useTasks)
/app/calendar → CalendarPage (useCalendar)
/app/intelligence → IntelligencePage (useInsights, useActions)
/app/settings → SettingsPage (useSettings)
All app routes wrapped in:
ProtectedRoute(auth check)AppLayout(sidebar + header)AppHeader(useAuth + useDomainSignals)AppSidebar(useAuth + useDashboardStats + useConnectors)
Authentication Flow Integration
LoginPage
↓ (email/password or OAuth)
useAuth.login() / useAuth.loginWithOAuth()
↓
api/auth.ts → supabase.auth.signInWithPassword()
↓
getCurrentUser() → profiles table
↓
AuthContext.user = user
↓
ProtectedRoute allows access
↓
AppLayout renders with user data
↓
All child pages have access to auth
Data Flow Examples
Example 1: Loading Accounts
AccountsPage mounts
↓
useEntities() hook called
↓
getEntities() API call
↓
supabase.from('entity_360').select('*')
↓
RLS policy checks tenant_id
↓
Data returns → hook sets state
↓
AccountsPage renders entity table
Example 2: Creating a Task
TasksPage → handleAddTask()
↓
useTasks.addTask() with tenant_id from useAuth
↓
api/tasks.ts createTask()
↓
supabase.from('spine_tasks').insert()
↓
RLS checks tenant_id matches workspace
↓
Real-time subscription updates list
↓
TasksPage shows new task
Example 3: Switching Domain View
DashboardPage → setActiveDomain('sales')
↓
useDomainEntities('sales') re-fetches
↓
getDomainEntities() with entityTypes=['opportunity', 'deal', 'lead']
↓
spine_entities filtered by type
↓
Data transforms to sales columns
↓
Table re-renders with sales data
File Integration Tree
apps/web/src/
├── main.tsx → Entry, ErrorBoundary, AuthProvider
├── App.tsx → RouterProvider
├── routes.tsx → All routes with ProtectedRoute
│
├── components/
│ ├── app/
│ │ ├── AppLayout.tsx → AppHeader + AppSidebar + Outlet
│ │ ├── AppHeader.tsx → useAuth, useDomainSignals
│ │ ├── AppSidebar.tsx → useAuth, useDashboardStats, useConnectors
│ │ ├── ProtectedRoute.tsx → useAuth guard
│ │ │
│ │ ├── DashboardPage.tsx → useDashboardStats, useDomainEntities
│ │ │ (12 domain views)
│ │ ├── AccountsPage.tsx → useEntities, useEntityStats
│ │ ├── TasksPage.tsx → useTasks, useAuth
│ │ ├── CalendarPage.tsx → useCalendar
│ │ ├── IntelligencePage.tsx → useInsights, useActions
│ │ └── SettingsPage.tsx → useSettings
│ │
│ ├── pages/ → Marketing pages (no hooks)
│ │ ├── HomePage.tsx
│ │ ├── LoginPage.tsx → useAuth
│ │ ├── PlatformPage.tsx
│ │ ├── PricingPage.tsx
│ │ ├── SecurityPage.tsx
│ │ ├── StoryPage.tsx
│ │ ├── IntegrationsPage.tsx
│ │ └── NotFound.tsx
│ │
│ ├── ui/ → 45 shadcn components (presentational)
│ └── workspace/
│ └── WorkspaceScreen.tsx → Visual component (not used)
│
├── hooks/
│ ├── useAuth.tsx → AuthProvider + useAuth
│ ├── useEntities.ts → getEntities, getEntityStats
│ ├── useInsights.ts → getInsights, getInsightStats
│ ├── useActions.ts → getPendingActions, approveAction, etc.
│ ├── useTasks.ts → getTasks, createTask, completeTask
│ ├── useCalendar.ts → getEvents, createEvent
│ ├── useDashboard.ts → getDashboardStats, getDomainEntities, etc.
│ ├── useSettings.ts → getUserSettings, getWorkspaceSettings, etc.
│ └── index.ts → Barrel export
│
├── lib/
│ └── api/
│ ├── supabase.ts → Supabase client
│ ├── auth.ts → Auth API
│ ├── entities.ts → Entities API
│ ├── insights.ts → Insights API
│ ├── actions.ts → Actions API
│ ├── tasks.ts → Tasks API
│ ├── calendar.ts → Calendar API
│ ├── dashboard.ts → Dashboard API (12 domains)
│ ├── settings.ts → Settings API
│ └── index.ts → Barrel export
│
└── test/
├── setup.ts → Test mocks
├── smoke.test.tsx → Basic smoke tests
└── integration.test.tsx → Full integration tests
Import Resolution
Short Imports (via index.ts)
// All work:
Direct Imports
// Also work:
Build Verification
cd integratewise-complete/apps/web
npm run build
✓ Build succeeds
✓ 3,016 modules transformed
✓ JS: 1,040 KB (305 KB gzipped)
✓ CSS: 68 KB (10 KB gzipped)
✓ All imports resolved
✓ No TypeScript errors
✓ No missing exports
Testing Integration
npm test
✓ Smoke tests pass
✓ API layer imports work
✓ Hook layer imports work
✓ Component imports work
✓ Data flow integration verified
What's Bound
| Layer | Component | Bound To | Status |
|---|---|---|---|
| L1 | DashboardPage | useDashboardStats, useDomainEntities, useDomainSignals | ✅ |
| L1 | AccountsPage | useEntities, useEntityStats | ✅ |
| L1 | TasksPage | useTasks, useAuth | ✅ |
| L1 | CalendarPage | useCalendar | ✅ |
| L1 | IntelligencePage | useInsights, useActions | ✅ |
| L1 | SettingsPage | useSettings (user, workspace, integrations) | ✅ |
| L1 | LoginPage | useAuth | ✅ |
| L1 | AppHeader | useAuth, useDomainSignals | ✅ |
| L1 | AppSidebar | useAuth, useDashboardStats, useConnectors | ✅ |
| L1 | ProtectedRoute | useAuth | ✅ |
| L2 | All hooks | Corresponding API modules | ✅ |
| L2 | All APIs | Supabase client | ✅ |
| L3 | Supabase | PostgreSQL database | ✅ |
| L3 | Database | 49 migrations + RLS policies | ✅ |
Conclusion
All layers are fully bound and integrated:
- ✅ L3 Backend (Supabase) - Complete
- ✅ L2 API Layer (8 modules) - Complete
- ✅ L2 Hook Layer (8 hooks) - Complete
- ✅ L1 UI Layer (all pages) - Complete
- ✅ Auth Flow - Complete
- ✅ 12 Domain Views - Complete
- ✅ Build System - Complete
- ✅ Test System - Complete
Ready for production deployment.