<mxfile host="app.diagrams.net" type="device">
  <diagram name="sequencia-fluxo" id="sequencia-fluxo">
    <mxGraphModel dx="1200" dy="800" 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"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="n2" value="Busca-Busca — Sequência: coleta → ingestão → enriquecimento → recálculo → consulta" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;fontSize=17;fontColor=#222222;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="40" y="20" width="1200" height="24" as="geometry"/></mxCell>
        <mxCell id="n3" value="&lt;b&gt;Coletor (Python)&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;fontSize=11;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="25" y="60" width="170" height="40" as="geometry"/></mxCell>
        <mxCell id="n4" value="" style="html=1;endArrow=none;dashed=1;strokeColor=#aaaaaa;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="110" y="100" as="sourcePoint"/><mxPoint x="110" y="900" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n5" value="&lt;b&gt;API Ingestão (Java)&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=11;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="245" y="60" width="170" height="40" as="geometry"/></mxCell>
        <mxCell id="n6" value="" style="html=1;endArrow=none;dashed=1;strokeColor=#aaaaaa;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="330" y="100" as="sourcePoint"/><mxPoint x="330" y="900" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n7" value="&lt;b&gt;RabbitMQ&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=11;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="455" y="60" width="170" height="40" as="geometry"/></mxCell>
        <mxCell id="n8" value="" style="html=1;endArrow=none;dashed=1;strokeColor=#aaaaaa;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="540" y="100" as="sourcePoint"/><mxPoint x="540" y="900" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n9" value="&lt;b&gt;Worker (Java)&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=11;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="655" y="60" width="170" height="40" as="geometry"/></mxCell>
        <mxCell id="n10" value="" style="html=1;endArrow=none;dashed=1;strokeColor=#aaaaaa;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="740" y="100" as="sourcePoint"/><mxPoint x="740" y="900" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n11" value="&lt;b&gt;PostgreSQL&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=11;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="865" y="60" width="170" height="40" as="geometry"/></mxCell>
        <mxCell id="n12" value="" style="html=1;endArrow=none;dashed=1;strokeColor=#aaaaaa;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="950" y="100" as="sourcePoint"/><mxPoint x="950" y="900" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n13" value="&lt;b&gt;API Pública (Java)&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=11;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="1085" y="60" width="170" height="40" as="geometry"/></mxCell>
        <mxCell id="n14" value="" style="html=1;endArrow=none;dashed=1;strokeColor=#aaaaaa;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="1170" y="100" as="sourcePoint"/><mxPoint x="1170" y="900" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n15" value="&lt;b&gt;Frontend (Angular)&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5f5f0;strokeColor=#3aa89a;fontSize=11;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="1305" y="60" width="170" height="40" as="geometry"/></mxCell>
        <mxCell id="n16" value="" style="html=1;endArrow=none;dashed=1;strokeColor=#aaaaaa;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="1390" y="100" as="sourcePoint"/><mxPoint x="1390" y="900" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n17" value="POST /internal/ingest/imoveis (lote CSV)" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="110" y="130" as="sourcePoint"/><mxPoint x="330" y="130" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n18" value="upsert imovel · coleta_bruta · historico_preco (na mudança)" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="330" y="174" as="sourcePoint"/><mxPoint x="950" y="174" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n19" value="publica imovel.recebido / imovel.enriquecer" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="330" y="218" as="sourcePoint"/><mxPoint x="540" y="218" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n20" value="202 Accepted" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;dashed=1;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="330" y="262" as="sourcePoint"/><mxPoint x="110" y="262" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n21" value="imovel.recebido" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="540" y="306" as="sourcePoint"/><mxPoint x="740" y="306" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n22" value="normaliza · geocoding · calcula custo/score" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="740" y="350" as="sourcePoint"/><mxPoint x="950" y="350" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n23" value="imovel.enriquecer (consumer detalhe)" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="540" y="394" as="sourcePoint"/><mxPoint x="110" y="394" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n24" value="GET detalhe-imovel.asp (site Caixa)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#999999;fontSize=10;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="20" y="424" width="180" height="30" as="geometry"/></mxCell>
        <mxCell id="n25" value="POST /internal/ingest/imoveis/{codigo}/detalhe" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="110" y="482" as="sourcePoint"/><mxPoint x="330" y="482" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n26" value="upsert imovel_detalhe · fotos" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="330" y="526" as="sourcePoint"/><mxPoint x="950" y="526" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n27" value="publica imovel.enriquecido" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="330" y="570" as="sourcePoint"/><mxPoint x="540" y="570" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n28" value="imovel.enriquecido" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="540" y="614" as="sourcePoint"/><mxPoint x="740" y="614" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n29" value="recalcula analise_custo (RF-06/07)" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="740" y="658" as="sourcePoint"/><mxPoint x="950" y="658" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n30" value="GET /api/v1/imoveis (busca/filtros)" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="1390" y="702" as="sourcePoint"/><mxPoint x="1170" y="702" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n31" value="query + cache Redis" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="1170" y="746" as="sourcePoint"/><mxPoint x="950" y="746" as="targetPoint"/></mxGeometry></mxCell>
        <mxCell id="n32" value="200 · resultados" style="html=1;rounded=0;endArrow=block;startArrow=none;strokeColor=#555555;dashed=1;fontSize=10;verticalAlign=bottom;" edge="1" parent="1"><mxGeometry relative="1" as="geometry"><mxPoint x="1170" y="790" as="sourcePoint"/><mxPoint x="1390" y="790" as="targetPoint"/></mxGeometry></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
