<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="eli.ai" agent="eli.ai diagram exporter" version="1">
  <diagram id="application-process-topology-8143926b" name="Application process topology">
    <mxGraphModel dx="1600" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1200" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <object id="1" label="Application process topology" schemaVersion="1" diagramId="application-process-topology-8143926b" canonicalAppearanceKey="tsx:src/app/(docs)/docs/architecture/page.tsx:TOPOLOGY_CHART#1" sourceSha256="8143926b2d5ad8b4516e963c3801bcf78b00dcd744ab2799f5cdbb385e5efcc1" metadataPayloadSha256="f0506a80984eff6b1b06faea459a89004ce9c816c8d7d35779f19f6022ec97c1" generationKey="77361e46a9c9830fc4935e8485f4060dcff6826899e0f00187acc5ea177e6cad" concepts="[&quot;Process topology&quot;,&quot;Public overview diagrams&quot;,&quot;Topology&quot;,&quot;Single host — docker compose / VPS&quot;]" keywords="[&quot;UI + BFF · REST · MCP&quot;,&quot;pg-boss: queued&quot;,&quot;External system / MCP client&quot;,&quot;RLS on every tenant table&quot;,&quot;remote MCP · webhooks · mail&quot;,&quot;Browser (Next.js UI)&quot;,&quot;pgvector + pg_trgm&quot;,&quot;Bearer key&quot;,&quot;web process&quot;,&quot;worker process&quot;,&quot;APIs · live databases&quot;,&quot;validated egress&quot;,&quot;chat + run-reattach streams&quot;,&quot;connectors · enrichment · work&quot;,&quot;vault markdown · exports · report PDFs&quot;,&quot;Postgres&quot;,&quot;DATA_DIR&quot;,&quot;/api/mcp&quot;,&quot;starts/resumes&quot;,&quot;eval/report&quot;,&quot;17/18&quot;,&quot;AI/content&quot;,&quot;HTTPS&quot;]" application="{&quot;name&quot;:&quot;eli-ai&quot;,&quot;version&quot;:&quot;0.1.0&quot;}" packages="{&quot;mermaid&quot;:&quot;11.16.0&quot;,&quot;mermaidCli&quot;:&quot;11.16.0&quot;,&quot;playwright&quot;:&quot;1.62.1&quot;,&quot;playwrightCore&quot;:&quot;1.62.1&quot;,&quot;puppeteer&quot;:&quot;25.6.0&quot;,&quot;puppeteerCore&quot;:&quot;25.6.0&quot;}" environment="{&quot;architecture&quot;:&quot;x64&quot;,&quot;containerImage&quot;:&quot;playwright:v1.62.1-noble@sha256:c091b21d9fae78c76e85cd4356431e9b018402f172a214fc7d7a5e9a7e29d8ac+node:26.3.1-bookworm-slim@sha256:209558c3e5e40e8adff68959d3c2ba7cd73723e716d89196878a0c362fa1e109&quot;,&quot;node&quot;:&quot;v26.3.1&quot;,&quot;platform&quot;:&quot;linux&quot;,&quot;yarn&quot;:&quot;4.17.1&quot;}" renderer="{&quot;browser&quot;:{&quot;executableSha256&quot;:&quot;0b20b130e7edd9dd51873be867761295fe0cfad490c2b9a64f95bd3cfc08fa71&quot;,&quot;name&quot;:&quot;chromium&quot;,&quot;revision&quot;:&quot;1234&quot;,&quot;version&quot;:&quot;151.0.7922.34&quot;},&quot;font&quot;:{&quot;family&quot;:&quot;Eli Diagram Inter Variable&quot;,&quot;fileSha256&quot;:&quot;3100e775e8616cd2611beecfa23a4263d7037586789b43f035236a2e6fbd4c62&quot;,&quot;licenseSha256&quot;:&quot;3b0a5fca3d17942cde889069889dedbbbd075e9b599968c82a95f4d944e9b345&quot;},&quot;mermaidConfigSha256&quot;:&quot;68c10966fe84406ee626034d58bfabd555df9f65f691204b7c46db24038da101&quot;,&quot;themeCssSha256&quot;:&quot;c80287a78d80ad63d27bd5ca348b2ef9a7e2f44da289e436be6484ea28a1b033&quot;}" adapterVersions="{&quot;diagramGenerator&quot;:&quot;2&quot;,&quot;drawioFlowchart&quot;:&quot;1&quot;,&quot;drawioGantt&quot;:&quot;1&quot;,&quot;drawioSequence&quot;:&quot;1&quot;,&quot;drawioState&quot;:&quot;1&quot;}" mermaidType="flowchart" direction="LR" generatedAt="2026-08-12T23:36:44.885Z" mermaidSource="flowchart LR&#10;  Browser[&quot;Browser (Next.js UI)&quot;] --&gt;|HTTPS| Web&#10;  Client[&quot;External system / MCP client&quot;] --&gt;|&quot;/api/v1 or /api/mcp&lt;br/&gt;Bearer key&quot;| Web&#10;  subgraph Host[&quot;Single host — docker compose / VPS&quot;]&#10;    Web[&quot;web process&lt;br/&gt;UI + BFF · REST · MCP&lt;br/&gt;chat + run-reattach streams&quot;]&#10;    Worker[&quot;worker process&lt;br/&gt;pg-boss: queued starts/resumes&lt;br/&gt;connectors · enrichment · eval/report work&quot;]&#10;    PG[(&quot;Postgres 17/18&lt;br/&gt;pgvector + pg_trgm&lt;br/&gt;RLS on every tenant table&quot;)]&#10;    FS[[&quot;DATA_DIR&lt;br/&gt;vault markdown · exports · report PDFs&quot;]]&#10;    Web --- PG&#10;    Worker --- PG&#10;    Web --- FS&#10;    Worker --- FS&#10;  end&#10;  Web --&gt;|&quot;validated egress&quot;| External[&quot;AI/content APIs · live databases&lt;br/&gt;remote MCP · webhooks · mail&quot;]&#10;  Worker --&gt;|&quot;validated egress&quot;| External">
          <mxCell parent="0"/>
        </object>
        <object id="c:Host" label="Single host — docker compose / VPS" mermaidId="Host" mermaidShape="frame">
          <mxCell parent="1" vertex="1" style="collapsible=0;container=1;dashed=1;fillColor=none;fontColor=#333333;html=1;recursiveResize=0;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="455.453125" y="8" width="736.25" height="442.207085" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Browser" label="Browser (Next.js UI)" mermaidId="Browser" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="32.234375" y="52.707085" width="207.53125" height="52" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Web" label="web processUI + BFF · REST · MCPchat + run-reattach streams" mermaidId="Web" mermaidShape="rectangle">
          <mxCell parent="c:Host" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="25" y="85.207085" width="256" height="124" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Client" label="External system / MCP client" mermaidId="Client" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="8" y="254.707085" width="256" height="76" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:Worker" label="worker processpg-boss: queued starts/resumesconnectors · enrichment · eval/report work" mermaidId="Worker" mermaidShape="rectangle">
          <mxCell parent="c:Host" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="25" y="259.207085" width="256" height="148" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:PG" label="Postgres 17/18pgvector + pg_trgmRLS on every tenant table" mermaidId="PG" mermaidShape="cylinder">
          <mxCell parent="c:Host" vertex="1" style="backgroundOutline=1;boundedLbl=1;fillColor=#ECECFF;fontColor=#333333;html=1;shape=cylinder3;size=15;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="479.359375" y="34.999999" width="207.78125" height="132.828341" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:FS" label="DATA_DIRvault markdown · exports · report PDFs" mermaidId="FS" mermaidShape="rectangle">
          <mxCell parent="c:Host" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="468.25" y="247.914169" width="230" height="86" as="geometry"/>
          </mxCell>
        </object>
        <object id="n:External" label="AI/content APIs · live databasesremote MCP · webhooks · mail" mermaidId="External" mermaidShape="rectangle">
          <mxCell parent="1" vertex="1" style="fillColor=#ECECFF;fontColor=#333333;html=1;rounded=0;strokeColor=#9370DB;whiteSpace=wrap;">
            <mxGeometry x="910.703125" y="485.207085" width="256" height="124" as="geometry"/>
          </mxCell>
        </object>
        <object id="e:L_Browser_Web_0" label="HTTPS" mermaidId="L_Browser_Web_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Browser" target="n:Web" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="239.765625" y="78.707085" as="sourcePoint"/>
              <mxPoint x="484.453125" y="93.207085" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="359.726563" y="78.707085"/>
                <mxPoint x="455.453125" y="78.707085"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Client_Web_0" label="/api/v1 or /api/mcpBearer key" mermaidId="L_Client_Web_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Client" target="n:Web" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="264" y="292.707085" as="sourcePoint"/>
              <mxPoint x="539.464034" y="217.207085" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="359.726563" y="292.707085"/>
                <mxPoint x="455.453125" y="292.707085"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Web_PG_0" label="" mermaidId="L_Web_PG_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Web" target="n:PG" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=none;endFill=0;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="736.453125" y="103.739333" as="sourcePoint"/>
              <mxPoint x="934.8125" y="89.755438" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="823.578125" y="68.707085"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Worker_PG_0" label="" mermaidId="L_Worker_PG_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Worker" target="n:PG" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=none;endFill=0;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="706.668064" y="267.207085" as="sourcePoint"/>
              <mxPoint x="934.8125" y="143.077912" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="823.578125" y="179.121254"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Web_FS_0" label="" mermaidId="L_Web_FS_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Web" target="n:FS" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=none;endFill=0;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="736.453125" y="191.030475" as="sourcePoint"/>
              <mxPoint x="928.420191" y="256.414169" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="823.578125" y="215.414169"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Worker_FS_0" label="" mermaidId="L_Worker_FS_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Worker" target="n:FS" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=none;endFill=0;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="736.453125" y="341.504586" as="sourcePoint"/>
              <mxPoint x="924.203125" y="322.290103" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="823.578125" y="341.707085"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Web_External_0" label="validated egress" mermaidId="L_Web_External_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Web" target="n:External" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="669.495459" y="217.207085" as="sourcePoint"/>
              <mxPoint x="961.828485" y="485.207085" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="823.578125" y="373.707085"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
        <object id="e:L_Worker_External_0" label="validated egress" mermaidId="L_Worker_External_0" mermaidKind="relationship">
          <mxCell parent="1" source="n:Worker" target="n:External" edge="1" style="edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;html=1;jettySize=auto;orthogonalLoop=1;rounded=0;strokeColor=#333333;">
            <mxGeometry relative="1" as="geometry">
              <mxPoint x="736.453125" y="386.724807" as="sourcePoint"/>
              <mxPoint x="935.708917" y="485.207085" as="targetPoint"/>
              <Array as="points">
                <mxPoint x="823.578125" y="417.707085"/>
              </Array>
            </mxGeometry>
          </mxCell>
        </object>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
