<mxfile host="app.diagrams.net" agent="architecture-deliverables" version="24.0.0">
  <diagram name="Presence, Typing and Push Signals" id="11-presence-typing-push">
    <mxGraphModel dx="1400" dy="900" background="#ffffff" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="700" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="_st1" value="Emit" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="230" y="60" width="250" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_st2" value="Route" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="520" y="60" width="250" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_st3" value="State held" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="800" y="60" width="250" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_st4" value="Fan out" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="1090" y="60" width="250" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_st5" value="Client effect" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="1370" y="60" width="250" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_box6" value="" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#c9d3de;verticalAlign=top;align=left;spacingLeft=12;spacingTop=6;fontSize=11;fontStyle=2;fontColor=#5b6b7d;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="90" width="1610" height="110" as="geometry" />
        </mxCell>
        <mxCell id="_lh7" value="Presence" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=11;fontStyle=1;fontColor=#42536a;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="60" y="130" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_n8" value="&lt;b&gt;Socket connect and disconnect&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="250" y="110" width="220" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n9" value="&lt;b&gt;Gateway heartbeat&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Every 30 s&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="540" y="110" width="210" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_n10" value="&lt;b&gt;Presence Cache&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Redis, TTL 60 s&lt;/font&gt;" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=11;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#1e3a1e;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="820" y="110" width="210" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_n11" value="&lt;b&gt;Subscribed open chats only&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1110" y="110" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n12" value="&lt;b&gt;Online or last seen&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1390" y="110" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_box13" value="" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#c9d3de;verticalAlign=top;align=left;spacingLeft=12;spacingTop=6;fontSize=11;fontStyle=2;fontColor=#5b6b7d;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="220" width="1610" height="90" as="geometry" />
        </mxCell>
        <mxCell id="_lh14" value="Typing indicator" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=11;fontStyle=1;fontColor=#42536a;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="60" y="250" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_n15" value="&lt;b&gt;Keystroke, debounced 2 s&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="250" y="240" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n16" value="&lt;b&gt;Gateway, never persisted&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="540" y="240" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n17" value="&lt;b&gt;In-memory, TTL 10 s&lt;/b&gt;" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=11;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#1e3a1e;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="820" y="240" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n18" value="&lt;b&gt;Open chat participants&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1110" y="240" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n19" value="&lt;b&gt;Typing banner&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1390" y="240" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_box20" value="" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#c9d3de;verticalAlign=top;align=left;spacingLeft=12;spacingTop=6;fontSize=11;fontStyle=2;fontColor=#5b6b7d;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="330" width="1610" height="110" as="geometry" />
        </mxCell>
        <mxCell id="_lh21" value="Privacy gate" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=11;fontStyle=1;fontColor=#42536a;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="60" y="370" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_n22" value="&lt;b&gt;User privacy setting&lt;/b&gt;" style="shape=hexagon;perimeter=hexagonPerimeter2;size=0.12;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontColor=#4a3c00;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="250" y="350" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n23" value="&lt;b&gt;Evaluated at fan-out time&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="540" y="350" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n24" value="&lt;b&gt;Account &amp; Group DB&lt;/b&gt;" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=11;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#1e3a1e;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="820" y="350" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n25" value="&lt;b&gt;Reciprocity rule&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Hide yours, lose theirs&lt;/font&gt;" style="shape=hexagon;perimeter=hexagonPerimeter2;size=0.12;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontColor=#4a3c00;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1110" y="350" width="210" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_n26" value="&lt;b&gt;Signal suppressed&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontColor=#5c1a17;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1390" y="350" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_box27" value="" style="rounded=1;arcSize=3;whiteSpace=wrap;html=1;fillColor=none;strokeColor=#c9d3de;verticalAlign=top;align=left;spacingLeft=12;spacingTop=6;fontSize=11;fontStyle=2;fontColor=#5b6b7d;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="450" width="1610" height="90" as="geometry" />
        </mxCell>
        <mxCell id="_lh28" value="Push notification" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=11;fontStyle=1;fontColor=#42536a;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="60" y="490" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_n29" value="&lt;b&gt;Undelivered message or call&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="250" y="470" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n30" value="&lt;b&gt;Push Dispatcher&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="540" y="470" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n31" value="&lt;b&gt;Device token registry&lt;/b&gt;" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=11;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#1e3a1e;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="820" y="470" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n32" value="&lt;b&gt;APNs, FCM, Web Push&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#8c8c8c;fontColor=#333333;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1110" y="470" width="210" height="50" as="geometry" />
        </mxCell>
        <mxCell id="_n33" value="&lt;b&gt;Silent wake, then fetch and decrypt&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1370" y="470" width="260" height="50" as="geometry" />
        </mxCell>
        <mxCell id="title" value="Presence, Typing and Push Signals" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=20;fontStyle=1;fontColor=#16202c;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1610" height="30" as="geometry" />
        </mxCell>
        <mxCell id="rule" value="" style="line;strokeWidth=1;html=1;strokeColor=#c9d3de;" vertex="1" parent="1">
          <mxGeometry x="40" y="50" width="1610" height="10" as="geometry" />
        </mxCell>
        <mxCell id="note" value="Push payloads carry no message content; the woken client fetches and decrypts locally." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="630" width="1610" height="20" as="geometry" />
        </mxCell>
        <mxCell id="foot-rule" value="" style="line;strokeWidth=1;html=1;strokeColor=#e3e9ef;" vertex="1" parent="1">
          <mxGeometry x="40" y="650" width="1610" height="10" as="geometry" />
        </mxCell>
        <mxCell id="foot" value="v 1.0   ·   owner Platform Architecture   ·   date 2026-08" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=9;fontColor=#9aa7b4;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="660" width="1610" height="10" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
