Unclassified

IntegrateWise Repository Layer Mapping (REPOSITIONMAP)

Tier C β€” Historical. This document is a point-in-time snapshot preserved for reference. For current architecture, see CANONICAL_PLATFORM_ARCHITECTURE.md.

This file maps the active codebase directories to the 9 logical architecture layers. To maintain codebase integrity and comply with the AGENTS.md safety protocol, physical directories are kept in their canonical locations, and this schema serves as the authoritative map.


πŸ—ΊοΈ Layer Mapping Schema

{
  "project": "integratewise-live",
  "version": "3.8.0",
  "layers": {
    "auth": {
      "description": "Authentication, JWT verification, and credential handling",
      "paths": ["services/gateway/src/auth.ts", "services/tenants/"]
    },
    "ingress": {
      "description": "Webhook receivers, delta monitors, and file event listeners",
      "paths": ["services/webhook-ingress/", "services/folder-watcher/", "services/connector-sync/"]
    },
    "userworkbench": {
      "description": "Dashboard interface workbench and read projections",
      "paths": ["apps/web/", "services/gateway/src/workspace-spine.ts"]
    },
    "intelligent_layer": {
      "description": "Cognitive reasoning engines, AI gateway, and sandbox agents",
      "paths": ["services/intelligence/"]
    },
    "twin_workbench": {
      "description": "Stateful user twin conversational runtime and sessions",
      "paths": ["services/iw-agent-runtime/"]
    },
    "memory": {
      "description": "KB ingestion, semantic D1 chunks, and Vectorize indexes",
      "paths": ["services/knowledge/", "/Users/nirmal/.iw-memory/"]
    },
    "notification": {
      "description": "Governance approvals, workflows, and billing escalations",
      "paths": ["services/workflow/", "services/billing/", "services/intelligence/src/handoff/"]
    },
    "spine": {
      "description": "Canonical database partitions and normalization pipeline",
      "paths": ["services/pipeline/"]
    },
    "backend": {
      "description": "Shared configurations, connectors, and admin utilities",
      "paths": ["packages/types/", "packages/connectors/", "services/admin/"]
    }
  }
}

πŸ“‚ Physical Directory Structure

integratewise-live/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/                        <-- [userworkbench] React/Next.js Workbench UI
β”‚   └── web-frontend-reference/     <-- Reference Layout Components
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ gateway/                    <-- [auth] JWT resolution & D1 projections
β”‚   β”œβ”€β”€ webhook-ingress/            <-- [ingress] Webhook membrane
β”‚   β”œβ”€β”€ folder-watcher/             <-- [ingress] DO file monitor
β”‚   β”œβ”€β”€ connector-sync/             <-- [ingress] Delta pollers
β”‚   β”œβ”€β”€ intelligence/               <-- [intelligent_layer] Cognitive Think/Act/Govern agents
β”‚   β”œβ”€β”€ iw-agent-runtime/           <-- [twin_workbench] Stateful TwinAgent DO
β”‚   β”œβ”€β”€ knowledge/                  <-- [memory] KB indexing (D1/R2/Vectorize)
β”‚   β”œβ”€β”€ workflow/                   <-- [notification] Workflow scheduler
β”‚   β”œβ”€β”€ billing/                    <-- [notification] Stripe subscriptions
β”‚   └── pipeline/                   <-- [spine] Stage 1-8 Normalizer
└── packages/
    β”œβ”€β”€ types/                      <-- [backend] Shared schemas
    └── connectors/                 <-- [backend] Connector integrations