nordabiz/docs/architecture/diagrams/a6-api-integration-map.drawio

173 lines
18 KiB
Plaintext

<mxfile host="draw.io" modified="2026-02-12" agent="Claude Code" type="device">
<diagram id="a6-api" name="Mapa Integracji API">
<mxGraphModel dx="1400" dy="900" 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="NordaBiz — Mapa Integracji API" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=22;fontStyle=1;fontColor=#1a1a2e;" vertex="1" parent="1">
<mxGeometry x="460" y="15" width="430" height="36" as="geometry"/>
</mxCell>
<mxCell id="subtitle" value="Szczegółowa mapa wszystkich zewnętrznych API z endpointami, uwierzytelnianiem i przepływem danych" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=11;fontColor=#888;" vertex="1" parent="1">
<mxGeometry x="350" y="48" width="620" height="20" as="geometry"/>
</mxCell>
<!-- CENTRUM: NORDABIZ API LAYER -->
<mxCell id="center_bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1a1a2e;strokeColor=#1a1a2e;shadow=1;" vertex="1" parent="1">
<mxGeometry x="580" y="310" width="240" height="280" as="geometry"/>
</mxCell>
<mxCell id="center_title" value="&lt;b style=&quot;font-size:16px;color:#fff&quot;&gt;NordaBiz API Layer&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="610" y="318" width="200" height="24" as="geometry"/>
</mxCell>
<mxCell id="cs1" value="&lt;font color=&quot;#90CAF9&quot;&gt;gemini_service.py&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="346" width="120" height="18" as="geometry"/>
</mxCell>
<mxCell id="cs2" value="&lt;font color=&quot;#90CAF9&quot;&gt;pagespeed_client.py&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="366" width="130" height="18" as="geometry"/>
</mxCell>
<mxCell id="cs3" value="&lt;font color=&quot;#90CAF9&quot;&gt;oauth_service.py&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="386" width="120" height="18" as="geometry"/>
</mxCell>
<mxCell id="cs4" value="&lt;font color=&quot;#90CAF9&quot;&gt;crux_service.py&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="406" width="110" height="18" as="geometry"/>
</mxCell>
<mxCell id="cs5" value="&lt;font color=&quot;#90CAF9&quot;&gt;youtube_service.py&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="426" width="130" height="18" as="geometry"/>
</mxCell>
<mxCell id="cs6" value="&lt;font color=&quot;#90CAF9&quot;&gt;social_media_audit.py&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="446" width="140" height="18" as="geometry"/>
</mxCell>
<mxCell id="cs7" value="&lt;font color=&quot;#90CAF9&quot;&gt;news_service.py&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="466" width="110" height="18" as="geometry"/>
</mxCell>
<mxCell id="cs8" value="&lt;font color=&quot;#90CAF9&quot;&gt;krs_service.py&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="486" width="110" height="18" as="geometry"/>
</mxCell>
<mxCell id="cs9" value="&lt;font color=&quot;#90CAF9&quot;&gt;email_service.py&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="506" width="120" height="18" as="geometry"/>
</mxCell>
<mxCell id="cs10" value="&lt;font color=&quot;#90CAF9&quot;&gt;benchmark_service.py&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="526" width="140" height="18" as="geometry"/>
</mxCell>
<mxCell id="cs_db" value="&lt;font color=&quot;#FFF59D&quot;&gt;→ PostgreSQL (80+ tabel)&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=10;" vertex="1" parent="1">
<mxGeometry x="600" y="553" width="160" height="18" as="geometry"/>
</mxCell>
<!-- GOOGLE APIs (lewa-góra) -->
<mxCell id="g_bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E3F2FD;strokeColor=#4285F4;shadow=1;" vertex="1" parent="1">
<mxGeometry x="40" y="80" width="440" height="250" as="geometry"/>
</mxCell>
<mxCell id="g_title" value="&lt;b style=&quot;font-size:16px;color:#4285F4&quot;&gt;Google APIs&lt;/b&gt;&lt;font style=&quot;font-size:10px;color:#888&quot;&gt; — API Key + OAuth 2.0&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="55" y="86" width="320" height="24" as="geometry"/>
</mxCell>
<mxCell id="g1" value="&lt;b&gt;Gemini AI&lt;/b&gt; (gemini-3-flash)&lt;br&gt;&lt;font style=&quot;font-size:9px&quot;&gt;Auth: API Key | generateContent, embedContent&lt;br&gt;Chat, SEO insights, knowledge extraction&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#4285F4;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="55" y="116" width="410" height="42" as="geometry"/>
</mxCell>
<mxCell id="g2" value="&lt;b&gt;PageSpeed Insights API v5&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:9px&quot;&gt;Auth: API Key | runPagespeed (strategy=mobile/desktop)&lt;br&gt;Lighthouse audits, Core Web Vitals, accessibility&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#4285F4;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="55" y="164" width="410" height="42" as="geometry"/>
</mxCell>
<mxCell id="g3" value="&lt;b&gt;Places API (New)&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:9px&quot;&gt;Auth: API Key | searchText, getPlace, reviews&lt;br&gt;GBP data, ratings, photos, attributes&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#4285F4;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="55" y="212" width="410" height="42" as="geometry"/>
</mxCell>
<mxCell id="g4" value="&lt;b&gt;Search Console API&lt;/b&gt; ✅ OAuth&lt;br&gt;&lt;font style=&quot;font-size:9px&quot;&gt;Auth: OAuth 2.0 | searchAnalytics.query&lt;br&gt;Clicks, impressions, CTR, top queries/pages&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#34A853;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="55" y="260" width="200" height="55" as="geometry"/>
</mxCell>
<mxCell id="g5" value="&lt;b&gt;CrUX API&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:9px&quot;&gt;Auth: API Key | queryRecord&lt;br&gt;Real user field data (LCP, FID,&lt;br&gt;CLS, INP, TTFB)&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#4285F4;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="265" y="260" width="200" height="55" as="geometry"/>
</mxCell>
<!-- STRZAŁKA Google → Center -->
<mxCell id="arr_g" value="5 API" style="strokeColor=#4285F4;strokeWidth=3;fontSize=11;fontColor=#4285F4;fontStyle=1;" edge="1" source="g_bg" target="center_bg" parent="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- SOCIAL MEDIA (prawa-góra) -->
<mxCell id="sm_bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FCE4EC;strokeColor=#C62828;shadow=1;" vertex="1" parent="1">
<mxGeometry x="930" y="80" width="340" height="210" as="geometry"/>
</mxCell>
<mxCell id="sm_title" value="&lt;b style=&quot;font-size:16px;color:#C62828&quot;&gt;Social Media&lt;/b&gt;&lt;font style=&quot;font-size:10px;color:#888&quot;&gt; — Web scraping&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="945" y="86" width="280" height="24" as="geometry"/>
</mxCell>
<mxCell id="sm1" value="&lt;b&gt;Facebook&lt;/b&gt; — scraping stron firmowych" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#1877F2;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="945" y="116" width="310" height="24" as="geometry"/>
</mxCell>
<mxCell id="sm2" value="&lt;b&gt;Instagram&lt;/b&gt; — weryfikacja profili (curl -sI)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#E4405F;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="945" y="146" width="310" height="24" as="geometry"/>
</mxCell>
<mxCell id="sm3" value="&lt;b&gt;LinkedIn&lt;/b&gt; — scraping profili firmowych" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#0077B5;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="945" y="176" width="310" height="24" as="geometry"/>
</mxCell>
<mxCell id="sm4" value="&lt;b&gt;YouTube Data API v3&lt;/b&gt; — API Key | channels.list" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#FF0000;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="945" y="206" width="310" height="24" as="geometry"/>
</mxCell>
<mxCell id="sm5" value="&lt;b&gt;TikTok + X (Twitter)&lt;/b&gt; — link detection only" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#333;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="945" y="236" width="310" height="24" as="geometry"/>
</mxCell>
<!-- STRZAŁKA Social → Center -->
<mxCell id="arr_sm" value="6 platform" style="strokeColor=#C62828;strokeWidth=3;fontSize=11;fontColor=#C62828;fontStyle=1;" edge="1" source="sm_bg" target="center_bg" parent="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- REJESTRY PUBLICZNE (lewy-dół) -->
<mxCell id="reg_bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#E8F5E9;strokeColor=#2E7D32;shadow=1;" vertex="1" parent="1">
<mxGeometry x="40" y="400" width="440" height="150" as="geometry"/>
</mxCell>
<mxCell id="reg_title" value="&lt;b style=&quot;font-size:16px;color:#2E7D32&quot;&gt;Rejestry Publiczne&lt;/b&gt;&lt;font style=&quot;font-size:10px;color:#888&quot;&gt; — REST / SOAP&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="55" y="406" width="340" height="24" as="geometry"/>
</mxCell>
<mxCell id="reg1" value="&lt;b&gt;KRS API&lt;/b&gt; (Krajowy Rejestr Sądowy)&lt;br&gt;&lt;font style=&quot;font-size:9px&quot;&gt;Auth: brak | Dane spółek, zarządy, wspólnicy&lt;br&gt;api-krs.ms.gov.pl — REST JSON&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#2E7D32;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="55" y="436" width="410" height="42" as="geometry"/>
</mxCell>
<mxCell id="reg2" value="&lt;b&gt;CEIDG API&lt;/b&gt; (Centralna Ewidencja Działalności Gosp.)&lt;br&gt;&lt;font style=&quot;font-size:9px&quot;&gt;Auth: token | Dane JDG, PKD, adresy, status&lt;br&gt;dane.biznes.gov.pl — REST JSON&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#2E7D32;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="55" y="484" width="410" height="42" as="geometry"/>
</mxCell>
<!-- STRZAŁKA Reg → Center -->
<mxCell id="arr_reg" value="2 rejestry" style="strokeColor=#2E7D32;strokeWidth=3;fontSize=11;fontColor=#2E7D32;fontStyle=1;" edge="1" source="reg_bg" target="center_bg" parent="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- INNE SERWISY (prawy-dół) -->
<mxCell id="oth_bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFF3E0;strokeColor=#E65100;shadow=1;" vertex="1" parent="1">
<mxGeometry x="930" y="350" width="340" height="200" as="geometry"/>
</mxCell>
<mxCell id="oth_title" value="&lt;b style=&quot;font-size:16px;color:#E65100&quot;&gt;Inne Serwisy&lt;/b&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="945" y="356" width="160" height="24" as="geometry"/>
</mxCell>
<mxCell id="oth1" value="&lt;b&gt;Microsoft Graph API&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:9px&quot;&gt;Auth: OAuth 2.0 | Mail.Send&lt;br&gt;Wysyłka e-mail (powiadomienia, reset)&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#00A4EF;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="945" y="386" width="310" height="42" as="geometry"/>
</mxCell>
<mxCell id="oth2" value="&lt;b&gt;Brave Search API&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:9px&quot;&gt;Auth: API Key | Web search&lt;br&gt;Wiadomości i news monitoring (ZOPK)&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#FB542B;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="945" y="434" width="310" height="42" as="geometry"/>
</mxCell>
<mxCell id="oth3" value="&lt;b&gt;ALEO.com API&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:9px&quot;&gt;Auth: scraping | Dane finansowe firm&lt;br&gt;Przychody, zyski, zatrudnienie&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#E65100;fontSize=10;align=left;spacingLeft=6;" vertex="1" parent="1">
<mxGeometry x="945" y="482" width="310" height="42" as="geometry"/>
</mxCell>
<!-- STRZAŁKA Other → Center -->
<mxCell id="arr_oth" value="3 serwisy" style="strokeColor=#E65100;strokeWidth=3;fontSize=11;fontColor=#E65100;fontStyle=1;" edge="1" source="oth_bg" target="center_bg" parent="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<!-- LEGENDA AUTH -->
<mxCell id="leg_bg" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff;strokeColor=#ccc;" vertex="1" parent="1">
<mxGeometry x="40" y="600" width="440" height="70" as="geometry"/>
</mxCell>
<mxCell id="leg_title" value="&lt;b style=&quot;font-size:12px&quot;&gt;Metody uwierzytelniania:&lt;/b&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="55" y="606" width="200" height="22" as="geometry"/>
</mxCell>
<mxCell id="leg1" value="&lt;font style=&quot;font-size:10px&quot;&gt;&lt;b&gt;API Key&lt;/b&gt; — klucz w .env (Gemini, PageSpeed, Places, CrUX, YouTube, Brave)&lt;br&gt;&lt;b&gt;OAuth 2.0&lt;/b&gt; — token użytkownika (Google Search Console, Microsoft Graph, Meta)&lt;br&gt;&lt;b&gt;Token&lt;/b&gt; — klucz autoryzacyjny (CEIDG) &amp;nbsp;|&amp;nbsp; &lt;b&gt;Open&lt;/b&gt; — brak autoryzacji (KRS)&lt;/font&gt;" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="55" y="628" width="420" height="36" as="geometry"/>
</mxCell>
<!-- PODSUMOWANIE -->
<mxCell id="summary" value="&lt;font style=&quot;font-size:11px;color:#888&quot;&gt;&lt;b&gt;16 integracji API&lt;/b&gt; &amp;nbsp;|&amp;nbsp; 5 Google APIs + 6 Social Media + 2 Rejestry + 3 Inne &amp;nbsp;|&amp;nbsp; Cost: &lt;b&gt;$0/mies.&lt;/b&gt; (free tiers + scraping)&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="330" y="710" width="700" height="24" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>