<mxfile host="app.diagrams.net" modified="2026-07-15T00:00:00.000Z" agent="Codex" version="24.7.17">
  <diagram id="nyumatflix-architecture" name="NyumatFlix architecture">
    <mxGraphModel dx="1200" dy="675" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1200" pageHeight="675" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="extraction" value="1. EXTRACTION PLANE" style="swimlane;rounded=1;html=1;startSize=40;fillColor=#0f172a;strokeColor=#334155;fontColor=#f8fafc;" vertex="1" parent="1"><mxGeometry x="30" y="30" width="1140" height="265" as="geometry"/></mxCell>
        <mxCell id="input" value="TMDB input&#xa;id + season/episode" style="rounded=1;html=1;fillColor=#172554;strokeColor=#60a5fa;fontColor=#f8fafc;" vertex="1" parent="extraction"><mxGeometry x="35" y="90" width="170" height="70" as="geometry"/></mxCell>
        <mxCell id="dispatcher" value="Dispatcher&#xa;typed provider chain" style="rounded=1;html=1;fillColor=#172554;strokeColor=#60a5fa;fontColor=#f8fafc;" vertex="1" parent="extraction"><mxGeometry x="270" y="90" width="190" height="70" as="geometry"/></mxCell>
        <mxCell id="adapter" value="Provider adapter&#xa;extract + validate + probe" style="rounded=1;html=1;fillColor=#3b0764;strokeColor=#c084fc;fontColor=#f8fafc;" vertex="1" parent="extraction"><mxGeometry x="525" y="90" width="205" height="70" as="geometry"/></mxCell>
        <mxCell id="gluetun" value="Gluetun&#xa;HTTP proxy" style="rounded=1;html=1;fillColor=#052e16;strokeColor=#4ade80;fontColor=#f8fafc;" vertex="1" parent="extraction"><mxGeometry x="795" y="65" width="150" height="55" as="geometry"/></mxCell>
        <mxCell id="flare" value="FlareSolverr&#xa;only when challenged" style="rounded=1;html=1;fillColor=#052e16;strokeColor=#4ade80;fontColor=#f8fafc;" vertex="1" parent="extraction"><mxGeometry x="795" y="145" width="150" height="55" as="geometry"/></mxCell>
        <mxCell id="provider" value="Provider&#xa;embed / API" style="rounded=1;html=1;fillColor=#3b0764;strokeColor=#c084fc;fontColor=#f8fafc;" vertex="1" parent="extraction"><mxGeometry x="995" y="90" width="110" height="70" as="geometry"/></mxCell>
        <mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;strokeColor=#94a3b8;" edge="1" parent="extraction" source="input" target="dispatcher"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;strokeColor=#94a3b8;" edge="1" parent="extraction" source="dispatcher" target="adapter"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;strokeColor=#94a3b8;" edge="1" parent="extraction" source="adapter" target="gluetun"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;strokeColor=#94a3b8;dashed=1;" edge="1" parent="extraction" source="adapter" target="flare"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;strokeColor=#94a3b8;" edge="1" parent="extraction" source="gluetun" target="provider"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;strokeColor=#94a3b8;dashed=1;" edge="1" parent="extraction" source="flare" target="provider"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="playback" value="2. PLAYBACK PLANE" style="swimlane;rounded=1;html=1;startSize=40;fillColor=#0f172a;strokeColor=#334155;fontColor=#f8fafc;" vertex="1" parent="1"><mxGeometry x="30" y="320" width="1140" height="315" as="geometry"/></mxCell>
        <mxCell id="player" value="Player&#xa;HLS / DASH" style="rounded=1;html=1;fillColor=#172554;strokeColor=#60a5fa;fontColor=#f8fafc;" vertex="1" parent="playback"><mxGeometry x="35" y="105" width="155" height="70" as="geometry"/></mxCell>
        <mxCell id="route" value="/api/scrape/play&#xa;token + request context" style="rounded=1;html=1;fillColor=#172554;strokeColor=#60a5fa;fontColor=#f8fafc;" vertex="1" parent="playback"><mxGeometry x="255" y="105" width="225" height="70" as="geometry"/></mxCell>
        <mxCell id="rewriter" value="Manifest rewriter&#xa;HLS URI + DASH BaseURL" style="rounded=1;html=1;fillColor=#172554;strokeColor=#60a5fa;fontColor=#f8fafc;" vertex="1" parent="playback"><mxGeometry x="545" y="90" width="210" height="100" as="geometry"/></mxCell>
        <mxCell id="cdn" value="Media CDN&#xa;manifest • segments • keys&#xa;subtitles • byte ranges" style="rounded=1;html=1;fillColor=#451a03;strokeColor=#fbbf24;fontColor=#f8fafc;" vertex="1" parent="playback"><mxGeometry x="820" y="75" width="285" height="130" as="geometry"/></mxCell>
        <mxCell id="e7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;strokeColor=#94a3b8;" edge="1" parent="playback" source="player" target="route"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;strokeColor=#94a3b8;" edge="1" parent="playback" source="route" target="rewriter"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;strokeColor=#94a3b8;" edge="1" parent="playback" source="rewriter" target="cdn"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="e10" value="rewritten child request" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;strokeColor=#94a3b8;dashed=1;fontColor=#cbd5e1;" edge="1" parent="playback" source="cdn" target="player"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="960" y="250"/><mxPoint x="110" y="250"/></Array></mxGeometry></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
