<mxfile host="app.diagrams.net" modified="2026-08-27T00:00:00.000Z" agent="OpenFloodAI Codex" version="24.7.17">
  <diagram id="openfloodai-v1-architecture" name="OpenFloodAI V1 Architecture">
    <mxGraphModel dx="1600" dy="980" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1600" pageHeight="1000" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="title" value="OpenFloodAI V1 Architecture" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=28;fontStyle=1;fontColor=#111827;" vertex="1" parent="1">
          <mxGeometry x="440" y="30" width="720" height="50" as="geometry"/>
        </mxCell>
        <mxCell id="subtitle" value="Edge-first river monitoring. Alert candidates support humans; they are not official public warnings." style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=15;fontColor=#374151;" vertex="1" parent="1">
          <mxGeometry x="390" y="80" width="820" height="40" as="geometry"/>
        </mxCell>
        <mxCell id="edge-boundary" value="Edge Node: core detection runs locally when video, power, storage, and local config are available" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F8FAFC;strokeColor=#64748B;dashed=1;fontSize=14;fontStyle=1;align=center;verticalAlign=top;spacingTop=12;" vertex="1" parent="1">
          <mxGeometry x="330" y="160" width="820" height="540" as="geometry"/>
        </mxCell>
        <mxCell id="input" value="Fixed Camera / CCTV&lt;br&gt;or Prerecorded Video" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DBEAFE;strokeColor=#2563EB;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="60" y="370" width="190" height="80" as="geometry"/>
        </mxCell>
        <mxCell id="health" value="Camera / Feed&lt;br&gt;Health Checks&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;offline, stale, blurry, blocked&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E0F2FE;strokeColor=#0284C7;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="380" y="220" width="190" height="90" as="geometry"/>
        </mxCell>
        <mxCell id="vision" value="Vision / ML Module&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;water-region evidence only&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DCFCE7;strokeColor=#16A34A;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="650" y="220" width="190" height="90" as="geometry"/>
        </mxCell>
        <mxCell id="temporal" value="Temporal Analysis&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;change over time, persistence&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F0FDFA;strokeColor=#0D9488;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="900" y="220" width="190" height="90" as="geometry"/>
        </mxCell>
        <mxCell id="risk" value="Risk Engine&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;NORMAL, ELEVATED, HIGH,&lt;br&gt;CRITICAL, UNKNOWN / DEGRADED&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FEF3C7;strokeColor=#D97706;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="650" y="380" width="210" height="105" as="geometry"/>
        </mxCell>
        <mxCell id="store" value="Local Event Store&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;events, reasons, versions,&lt;br&gt;evidence windows&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F3E8FF;strokeColor=#9333EA;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="430" y="560" width="210" height="90" as="geometry"/>
        </mxCell>
        <mxCell id="candidate" value="Alert-Candidate Creator&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;review item, not public warning&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFE4E6;strokeColor=#E11D48;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="780" y="560" width="220" height="90" as="geometry"/>
        </mxCell>
        <mxCell id="operator" value="Notification /&lt;br&gt;Operator Handoff&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;human or approved process reviews&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFEDD5;strokeColor=#EA580C;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="1230" y="540" width="220" height="95" as="geometry"/>
        </mxCell>
        <mxCell id="warning" value="Official Public Warning&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;outside OpenFloodAI V1 authority&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FEE2E2;strokeColor=#DC2626;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="1230" y="720" width="220" height="85" as="geometry"/>
        </mxCell>
        <mxCell id="cloud" value="Optional Cloud / Control Plane&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;dashboard, fleet config, telemetry,&lt;br&gt;model/config rollout&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EDE9FE;strokeColor=#7C3AED;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="430" y="800" width="300" height="95" as="geometry"/>
        </mxCell>
        <mxCell id="audit" value="Audit / Telemetry Path&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;upload when network is available&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ECFCCB;strokeColor=#65A30D;fontSize=14;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="810" y="800" width="260" height="95" as="geometry"/>
        </mxCell>
        <mxCell id="privacy-boundary" value="Privacy / Security Boundary&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;no face, person, vehicle, or license-plate recognition; protect camera credentials and raw video&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F9FAFB;strokeColor=#374151;dashed=1;fontSize=13;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="60" y="790" width="300" height="110" as="geometry"/>
        </mxCell>
        <mxCell id="unknown" value="Visible Degraded State&lt;br&gt;&lt;font style=&quot;font-size: 11px;&quot;&gt;missing or unreliable evidence must not silently become NORMAL&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#F1F5F9;strokeColor=#475569;fontSize=13;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="900" y="390" width="190" height="85" as="geometry"/>
        </mxCell>
        <mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#2563EB;endArrow=block;endFill=1;" edge="1" parent="1" source="input" target="health">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0284C7;endArrow=block;endFill=1;" edge="1" parent="1" source="health" target="vision">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e3" value="visual signals" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#16A34A;endArrow=block;endFill=1;fontSize=11;" edge="1" parent="1" source="vision" target="temporal">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e4" value="evidence window" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0D9488;endArrow=block;endFill=1;fontSize=11;" edge="1" parent="1" source="temporal" target="risk">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e5" value="health state" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0284C7;endArrow=block;endFill=1;fontSize=11;" edge="1" parent="1" source="health" target="risk">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e6" value="risk event" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#D97706;endArrow=block;endFill=1;fontSize=11;" edge="1" parent="1" source="risk" target="store">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e7" value="qualifying state" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#D97706;endArrow=block;endFill=1;fontSize=11;" edge="1" parent="1" source="risk" target="candidate">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e8" value="alert candidate" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#E11D48;endArrow=block;endFill=1;fontSize=11;" edge="1" parent="1" source="candidate" target="operator">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e9" value="human decision only" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#DC2626;endArrow=block;endFill=1;dashed=1;fontSize=11;" edge="1" parent="1" source="operator" target="warning">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e10" value="events" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#65A30D;endArrow=block;endFill=1;fontSize=11;" edge="1" parent="1" source="store" target="audit">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e11" value="telemetry upload" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#65A30D;endArrow=block;endFill=1;fontSize=11;" edge="1" parent="1" source="audit" target="cloud">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e12" value="config/model metadata when available" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#7C3AED;endArrow=block;endFill=1;dashed=1;fontSize=11;" edge="1" parent="1" source="cloud" target="edge-boundary">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1170" y="845" as="sourcePoint"/>
            <mxPoint x="1140" y="660" as="targetPoint"/>
          </mxGeometry>
        </mxCell>
        <mxCell id="e13" value="degraded/unknown if unreliable" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#475569;endArrow=block;endFill=1;dashed=1;fontSize=11;" edge="1" parent="1" source="health" target="unknown">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="e14" value="degraded/unknown if evidence missing" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#475569;endArrow=block;endFill=1;dashed=1;fontSize=11;" edge="1" parent="1" source="risk" target="unknown">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
        <mxCell id="note1" value="Safety boundary: ML is evidence, not ground truth." style="shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;fillColor=#FEFCE8;strokeColor=#CA8A04;fontSize=13;" vertex="1" parent="1">
          <mxGeometry x="1180" y="190" width="280" height="90" as="geometry"/>
        </mxCell>
        <mxCell id="note2" value="Audit fields include: site/camera ID, timestamp, software version, model version, config version, input quality, signals, risk state, reason codes, evidence window, action, and delivery result." style="shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;fillColor=#F8FAFC;strokeColor=#64748B;fontSize=12;" vertex="1" parent="1">
          <mxGeometry x="1180" y="310" width="280" height="135" as="geometry"/>
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
