{
  "schemaVersion": 1,
  "generatedAt": "2026-08-17T18:34:28.173Z",
  "generationKey": "7930b79f5ff78f06805ad66856ec763b2f403dfd1d4c25e041c8cc424c276ebf",
  "metadataPayloadSha256": "70781767ea9e8b27d99f3b0cc832bcfc8411a9f1e1f3997405255eca404ee1b0",
  "diagram": {
    "id": "intake-system-architecture-08a0d58c",
    "title": "Intake — system architecture",
    "description": "The HTTP surface writes connector_sources and enqueues; everything else happens in the worker, which holds the per-source advisory lock while adapters crawl, normalization produces markdown, and the keyed upsert lands documents, chunks, revisions, and audit rows.",
    "status": "current",
    "canonicalAppearanceKey": "tsx:src/app/(docs)/docs/modules/intake/page.tsx:intakeArchitectureChart#1"
  },
  "aliases": [],
  "concepts": [
    "Intake architecture",
    "Sync execution",
    "Normalization pipeline",
    "External systems",
    "REST surface — src/app/api/v1/connectors",
    "Modules",
    "Intake"
  ],
  "keywords": [
    "Connector CRUD routes (API)",
    "Sync trigger route (API)",
    "store: queue",
    "normalize.ts — binary and HTML to markdown (service)",
    "store: table",
    "enqueue extract + embed",
    "Worker dispatcher — (service)",
    "chunkMarkdown + persistChunks (service)",
    "SharePoint / Microsoft Graph",
    "withConnectorSourceLock — per-source advisory lock (service)",
    "persistConnectorDocument — keyed upsert (service)",
    "src/worker/index.ts",
    "runConnectorSync / runConnectorPrune / runConnectorPermissions (service)",
    "Confluence",
    "Slack"
  ],
  "mermaid": {
    "type": "flowchart",
    "direction": "TB",
    "sourceSha256": "08a0d58c95196f25a99720e1ef6c0c6e697d179154b06415942faa7a1332ca6a"
  },
  "provenance": [
    {
      "appearanceKey": "tsx:src/app/(docs)/docs/modules/intake/page.tsx:intakeArchitectureChart#1",
      "surface": "route",
      "sourcePath": "src/app/(docs)/docs/modules/intake/page.tsx",
      "line": 68,
      "route": "/docs/modules/intake",
      "symbol": "intakeArchitectureChart",
      "caption": "The HTTP surface writes connector_sources and enqueues; everything else happens in the worker, which holds the per-source advisory lock while adapters crawl, normalization produces markdown, and the keyed upsert lands documents, chunks, revisions, and audit rows."
    }
  ],
  "embeddedMetadata": [
    {
      "sourcePath": "src/app/(docs)/docs/modules/intake/page.tsx",
      "caption": "The HTTP surface writes connector_sources and enqueues; everything else happens in the worker, which holds the per-source advisory lock while adapters crawl, normalization produces markdown, and the keyed upsert lands documents, chunks, revisions, and audit rows."
    }
  ],
  "generation": {
    "application": {
      "name": "eli-ai",
      "version": "0.1.0"
    },
    "environment": {
      "node": "v26.3.1",
      "yarn": "4.17.1",
      "platform": "linux",
      "architecture": "x64",
      "containerImage": "playwright:v1.62.1-noble@sha256:c091b21d9fae78c76e85cd4356431e9b018402f172a214fc7d7a5e9a7e29d8ac+node:26.3.1-bookworm-slim@sha256:209558c3e5e40e8adff68959d3c2ba7cd73723e716d89196878a0c362fa1e109"
    },
    "packages": {
      "mermaid": "11.16.0",
      "mermaidCli": "11.16.0",
      "playwright": "1.62.1",
      "playwrightCore": "1.62.1",
      "puppeteer": "25.6.0",
      "puppeteerCore": "25.6.0"
    },
    "renderer": {
      "mermaidConfigSha256": "68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101",
      "themeCssSha256": "c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033",
      "browser": {
        "name": "chromium",
        "revision": "1234",
        "version": "151.0.7922.34",
        "executableSha256": "0b20b130e7edd9dd51873be867761295fe0cfad490c2b9a64f95bd3cfc08fa71"
      },
      "font": {
        "family": "Eli Diagram Inter Variable",
        "fileSha256": "3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62",
        "licenseSha256": "3b0a5fca3d17942cde889069889dedbbbd075e9b599968c82a95f4d944e9b345"
      }
    },
    "adapterVersions": {
      "diagramGenerator": "2",
      "drawioFlowchart": "1",
      "drawioSequence": "1",
      "drawioState": "1",
      "drawioGantt": "1"
    }
  },
  "artifacts": {
    "mmd": "/diagrams/intake-system-architecture-08a0d58c/intake-system-architecture-08a0d58c.mmd",
    "svg": "/diagrams/intake-system-architecture-08a0d58c/intake-system-architecture-08a0d58c.svg",
    "png": "/diagrams/intake-system-architecture-08a0d58c/intake-system-architecture-08a0d58c.png",
    "drawio": "/diagrams/intake-system-architecture-08a0d58c/intake-system-architecture-08a0d58c.drawio",
    "json": "/diagrams/intake-system-architecture-08a0d58c/intake-system-architecture-08a0d58c.json"
  },
  "artifactSha256": {
    "mmd": "77f8772ee4c6644f430ba5fb915b724be03b4017b3c9cf8dc930e6fc2e16ba2d",
    "svg": "0ae0f57f3adf09a88f89a96f418cd725dcc794895d695dd79caeafa66ee384da",
    "png": "99ea37053e1a4e71ec93772e8e6a28f743efe2a7bd4aeffd4318e7420ae3383c",
    "drawio": "2b51f218988b977a67fb0ebc35019b400ba070e05f0ae352b35ce5dfa3bb8589"
  }
}
