<mxfile host="app.diagrams.net" agent="architecture-deliverables" version="24.0.0">
  <diagram name="Media Upload and Download Pipeline" id="10-media-pipeline">
    <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="1660" pageHeight="590" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="_st1" value="Capture" 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="40" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.cap" value="&lt;b&gt;Camera, gallery, file&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="40" y="120" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.comp" value="&lt;b&gt;Client Compression&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;H.264 / WebP / Opus&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="40" y="220" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.thumb" value="&lt;b&gt;Thumbnail Generation&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;On device&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="40" y="320" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st2" value="Protect" 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="320" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.mk" value="&lt;b&gt;Random Media Key&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;AES-256-CBC&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="320" y="170" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.hmac" value="&lt;b&gt;HMAC-SHA256 Tag&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Integrity&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="320" y="270" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st3" value="Upload" 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="600" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.msvc" value="&lt;b&gt;Media Service&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Resumable, chunked&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="600" y="90" width="170" height="90" as="geometry" />
        </mxCell>
        <mxCell id="n.obj" value="&lt;b&gt;Object Store&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Immutable, TTL 30 d&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="600" y="210" width="170" height="90" as="geometry" />
        </mxCell>
        <mxCell id="n.dedupe" value="&lt;b&gt;Blob already stored?&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;SHA-256 of ciphertext&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="600" y="330" width="170" height="90" as="geometry" />
        </mxCell>
        <mxCell id="_st4" value="Reference" 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="890" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.chat" value="&lt;b&gt;Chat Service&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Normal send path&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="890" y="170" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.pay" value="&lt;b&gt;Message Payload&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;URL + key + hash&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="890" y="270" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st5" value="Distribute" 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="1170" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.cdn" value="&lt;b&gt;CDN Edge&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Signed URL, origin pull&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;fontColor=#4a3200;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1170" y="170" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.inline" value="&lt;b&gt;Inline Thumbnail&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Encrypted in payload&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="1170" y="270" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st6" value="Consume" 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="1450" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.rdev" value="&lt;b&gt;Recipient Device&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Verify HMAC, decrypt&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="1450" y="170" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.gal" value="&lt;b&gt;Media Gallery&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;On-device, per chat&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="1450" y="270" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_spine7" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="220" y="250" as="sourcePoint" />
            <mxPoint x="310" y="250" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine8" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="500" y="250" as="sourcePoint" />
            <mxPoint x="590" y="250" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine9" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="780" y="250" as="sourcePoint" />
            <mxPoint x="880" y="250" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine10" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1070" y="250" as="sourcePoint" />
            <mxPoint x="1160" y="250" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine11" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1350" y="250" as="sourcePoint" />
            <mxPoint x="1440" y="250" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_e12" value="yes, reuse handle" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;jettySize=auto;orthogonalLoop=1;endArrow=block;endFill=1;strokeColor=#5a6570;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;verticalAlign=bottom;fontFamily=Segoe UI;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.dedupe" target="n.pay">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="690" y="450" />
              <mxPoint x="980" y="450" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="_e13" value="no, store blob" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;jettySize=auto;orthogonalLoop=1;endArrow=block;endFill=1;strokeColor=#5a6570;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;verticalAlign=bottom;fontFamily=Segoe UI;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.dedupe" target="n.obj">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="title" value="Media Upload and Download Pipeline" 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="1570" 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="1570" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg14" value="" style="rounded=1;arcSize=30;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
          <mxGeometry x="40" y="490" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg15" value="Application we own" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="70" y="490" width="110" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg16" value="" style="rounded=1;arcSize=30;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
          <mxGeometry x="200" y="490" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg17" value="Security / platform" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="230" y="490" width="110" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg18" value="" style="rounded=1;arcSize=30;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
          <mxGeometry x="370" y="490" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg19" value="Data store" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="400" y="490" width="70" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg20" value="" style="rounded=1;arcSize=30;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
          <mxGeometry x="480" y="490" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg21" value="Decision point" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="510" y="490" width="90" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg22" value="" style="rounded=1;arcSize=30;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
          <mxGeometry x="620" y="490" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg23" value="Interface / broker" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="650" y="490" width="110" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg24" value="" style="html=1;endArrow=none;strokeColor=#5a6570;strokeWidth=1.4;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="780" y="500" as="sourcePoint" />
            <mxPoint x="800" y="500" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_lg25" value="synchronous" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="810" y="490" width="70" height="20" as="geometry" />
        </mxCell>
        <mxCell id="note" value="The platform stores opaque bytes; the media key travels only inside the encrypted message." 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="520" width="1570" 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="540" width="1570" 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="550" width="1570" height="10" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
