new-site/docs/architecture.svg
justin f8cd37ac8c Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers,
document generators, FCC compliance tools, Canada CRTC formation,
Ansible infrastructure, and deployment scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 06:54:22 -05:00

231 lines
18 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 680" font-family="system-ui, -apple-system, sans-serif" font-size="11">
<defs>
<marker id="arrow" markerWidth="8" markerHeight="6" refX="8" refY="3" orient="auto">
<path d="M0,0 L8,3 L0,6 Z" fill="#64748b"/>
</marker>
</defs>
<rect width="1200" height="680" fill="#f8fafc" rx="8"/>
<text x="600" y="28" text-anchor="middle" font-size="16" font-weight="700" fill="#1a2744">Performance West Inc. -- System Architecture</text>
<text x="600" y="44" text-anchor="middle" font-size="10" fill="#64748b">207.174.124.71 | Debian 13 | 62GB RAM | 8 vCPU | Updated 2026-04-17</text>
<!-- Browser -->
<rect x="490" y="55" width="220" height="28" rx="6" fill="#dbeafe" stroke="#3b82f6"/>
<text x="600" y="73" text-anchor="middle" font-weight="600" fill="#1e40af">Browser / Customer</text>
<!-- nginx -->
<rect x="420" y="95" width="360" height="24" rx="4" fill="#059669" opacity="0.15" stroke="#059669"/>
<text x="600" y="111" text-anchor="middle" font-weight="600" fill="#047857">nginx (TLS, reverse proxy, RPC proxies :5555/:5556)</text>
<line x1="600" y1="83" x2="600" y2="95" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<!-- Docker Compose Prod -->
<rect x="15" y="130" width="380" height="340" rx="6" fill="#fff" stroke="#e2e8f0" stroke-width="1.5"/>
<text x="205" y="148" text-anchor="middle" font-weight="700" font-size="12" fill="#1a2744">Docker Compose -- Production (15 containers)</text>
<rect x="25" y="158" width="175" height="22" rx="3" fill="#eff6ff" stroke="#93c5fd"/>
<text x="112" y="173" text-anchor="middle" font-size="10" fill="#1e40af">Site (Astro) :4322</text>
<rect x="210" y="158" width="175" height="22" rx="3" fill="#fef3c7" stroke="#f59e0b"/>
<text x="297" y="173" text-anchor="middle" font-size="10" fill="#92400e">Express API :3001</text>
<rect x="25" y="186" width="115" height="20" rx="3" fill="#f0fdf4" stroke="#86efac"/>
<text x="82" y="200" text-anchor="middle" font-size="9" fill="#166534">api-postgres</text>
<rect x="148" y="186" width="100" height="20" rx="3" fill="#fce7f3" stroke="#f9a8d4"/>
<text x="198" y="200" text-anchor="middle" font-size="9" fill="#9d174d">ERPNext :8080</text>
<rect x="256" y="186" width="130" height="20" rx="3" fill="#fce7f3" stroke="#f9a8d4"/>
<text x="321" y="200" text-anchor="middle" font-size="9" fill="#9d174d">ERP workers+sched</text>
<rect x="25" y="214" width="360" height="44" rx="4" fill="#f5f3ff" stroke="#a78bfa"/>
<text x="205" y="230" text-anchor="middle" font-weight="600" font-size="10" fill="#5b21b6">Python Workers :8090 -- 34 service handlers</text>
<text x="205" y="244" text-anchor="middle" font-size="8" fill="#7c3aed">FCC (499-A, CPNI, RMD, CALEA, BDC, STIR/SHAKEN) | Formation | CRTC | Treasury | Renewal | CDR | ICC</text>
<text x="205" y="254" text-anchor="middle" font-size="8" fill="#7c3aed">13 systemd timers | New Carrier Bundle (6-handler chain) | Foreign Qualification</text>
<rect x="25" y="264" width="85" height="18" rx="3" fill="#ecfdf5" stroke="#6ee7b7"/>
<text x="67" y="277" text-anchor="middle" font-size="9" fill="#065f46">MinIO</text>
<rect x="116" y="264" width="85" height="18" rx="3" fill="#fef9c3" stroke="#fde047"/>
<text x="158" y="277" text-anchor="middle" font-size="9" fill="#854d0e">Ollama LLM</text>
<rect x="207" y="264" width="85" height="18" rx="3" fill="#e0f2fe" stroke="#7dd3fc"/>
<text x="249" y="277" text-anchor="middle" font-size="9" fill="#0c4a6e">Listmonk</text>
<rect x="298" y="264" width="85" height="18" rx="3" fill="#f1f5f9" stroke="#cbd5e1"/>
<text x="340" y="277" text-anchor="middle" font-size="9" fill="#475569">Umami</text>
<!-- Crypto Treasury -->
<rect x="25" y="290" width="360" height="36" rx="4" fill="#fefce8" stroke="#facc15"/>
<text x="205" y="306" text-anchor="middle" font-weight="600" font-size="10" fill="#854d0e">Crypto Treasury Pipeline</text>
<text x="205" y="318" text-anchor="middle" font-size="8" fill="#a16207">SHKeeper -> Bridge (Stripe) -> RelayFi -> Relay Card -> Vendors | Cold wallet sweep | FIFO cost basis</text>
<!-- Compliance Check -->
<rect x="25" y="332" width="175" height="36" rx="4" fill="#eff6ff" stroke="#3b82f6"/>
<text x="112" y="348" text-anchor="middle" font-weight="600" font-size="9" fill="#1e40af">FCC Compliance Check</text>
<text x="112" y="360" text-anchor="middle" font-size="8" fill="#2563eb">CORES|RMD|CPNI|499|BDC</text>
<!-- Formation -->
<rect x="208" y="332" width="175" height="36" rx="4" fill="#f0fdf4" stroke="#4ade80"/>
<text x="295" y="348" text-anchor="middle" font-weight="600" font-size="9" fill="#166534">Formation + Foreign Qual</text>
<text x="295" y="360" text-anchor="middle" font-size="8" fill="#166534">51 jurisdictions | 10 adapters</text>
<!-- New Carrier + DC Agent -->
<rect x="25" y="374" width="175" height="30" rx="4" fill="#fef3c7" stroke="#f59e0b"/>
<text x="112" y="390" text-anchor="middle" font-size="9" font-weight="600" fill="#92400e">New Carrier $1,799</text>
<text x="112" y="400" text-anchor="middle" font-size="7" fill="#92400e">CORES->DC->499->RMD->CPNI->CALEA</text>
<rect x="208" y="374" width="175" height="30" rx="4" fill="#fed7aa" stroke="#f97316"/>
<text x="295" y="390" text-anchor="middle" font-size="9" font-weight="600" fill="#9a3412">CRTC Package $3,899</text>
<text x="295" y="400" text-anchor="middle" font-size="7" fill="#9a3412">Incorp+BITS+CCTS+DID+domain+binder</text>
<!-- Compliance batch -->
<rect x="25" y="412" width="360" height="24" rx="4" fill="#dbeafe" stroke="#60a5fa"/>
<text x="205" y="428" text-anchor="middle" font-size="9" fill="#1d4ed8">Batch Compliance Orders | 15% bundle discount | 5 payment methods</text>
<rect x="25" y="442" width="360" height="20" rx="3" fill="#f1f5f9" stroke="#cbd5e1"/>
<text x="205" y="456" text-anchor="middle" font-size="9" fill="#475569">67 migrations | MariaDB | Redis | umami-postgres</text>
<!-- k3s -->
<rect x="410" y="130" width="350" height="140" rx="6" fill="#fff" stroke="#e2e8f0" stroke-width="1.5"/>
<text x="585" y="148" text-anchor="middle" font-weight="700" font-size="12" fill="#1a2744">k3s -- SHKeeper (7 coin daemons)</text>
<rect x="420" y="158" width="150" height="20" rx="3" fill="#fed7aa" stroke="#f97316"/>
<text x="495" y="172" text-anchor="middle" font-size="9" fill="#9a3412">SHKeeper API :30723</text>
<rect x="580" y="158" width="170" height="20" rx="3" fill="#f0f9ff" stroke="#38bdf8"/>
<text x="665" y="172" text-anchor="middle" font-size="9" fill="#0369a1">RPC Proxies :5555/:5556</text>
<rect x="420" y="184" width="55" height="16" rx="2" fill="#fff7ed" stroke="#fdba74"/>
<text x="447" y="196" text-anchor="middle" font-size="8" fill="#c2410c">BTC</text>
<rect x="480" y="184" width="55" height="16" rx="2" fill="#fff7ed" stroke="#fdba74"/>
<text x="507" y="196" text-anchor="middle" font-size="8" fill="#c2410c">ETH</text>
<rect x="540" y="184" width="55" height="16" rx="2" fill="#fff7ed" stroke="#fdba74"/>
<text x="567" y="196" text-anchor="middle" font-size="8" fill="#c2410c">TRX</text>
<rect x="600" y="184" width="55" height="16" rx="2" fill="#fff7ed" stroke="#fdba74"/>
<text x="627" y="196" text-anchor="middle" font-size="8" fill="#c2410c">BNB</text>
<rect x="660" y="184" width="55" height="16" rx="2" fill="#fff7ed" stroke="#fdba74"/>
<text x="687" y="196" text-anchor="middle" font-size="8" fill="#c2410c">MATIC</text>
<rect x="420" y="204" width="55" height="16" rx="2" fill="#fff7ed" stroke="#fdba74"/>
<text x="447" y="216" text-anchor="middle" font-size="8" fill="#c2410c">LTC</text>
<rect x="480" y="204" width="55" height="16" rx="2" fill="#fff7ed" stroke="#fdba74"/>
<text x="507" y="216" text-anchor="middle" font-size="8" fill="#c2410c">DOGE</text>
<rect x="540" y="204" width="55" height="16" rx="2" fill="#fff7ed" stroke="#fdba74"/>
<text x="567" y="216" text-anchor="middle" font-size="8" fill="#c2410c">MariaDB</text>
<rect x="420" y="228" width="330" height="32" rx="3" fill="#fefce8" stroke="#facc15"/>
<text x="585" y="244" text-anchor="middle" font-size="9" fill="#854d0e">SHKeeper Webhook -> crypto_payment_jobs -> Bridge offramp -> RelayFi</text>
<text x="585" y="256" text-anchor="middle" font-size="8" fill="#a16207">Manual mode (TREASURY_MODE=manual) until Bridge approval</text>
<!-- Dev Stack -->
<rect x="410" y="280" width="350" height="56" rx="6" fill="#fff" stroke="#e2e8f0" stroke-width="1.5"/>
<text x="585" y="298" text-anchor="middle" font-weight="700" font-size="11" fill="#1a2744">Dev Stack (performancewest-dev.service)</text>
<rect x="420" y="306" width="80" height="16" rx="2" fill="#eff6ff" stroke="#93c5fd"/>
<text x="460" y="318" text-anchor="middle" font-size="8" fill="#1e40af">site :4323</text>
<rect x="505" y="306" width="80" height="16" rx="2" fill="#fef3c7" stroke="#f59e0b"/>
<text x="545" y="318" text-anchor="middle" font-size="8" fill="#92400e">api :3002</text>
<rect x="590" y="306" width="80" height="16" rx="2" fill="#f0fdf4" stroke="#86efac"/>
<text x="630" y="318" text-anchor="middle" font-size="8" fill="#166534">postgres</text>
<rect x="675" y="306" width="80" height="16" rx="2" fill="#f5f3ff" stroke="#a78bfa"/>
<text x="715" y="318" text-anchor="middle" font-size="8" fill="#5b21b6">workers</text>
<!-- DocServer -->
<rect x="410" y="346" width="350" height="40" rx="6" fill="#fff" stroke="#e2e8f0" stroke-width="1.5"/>
<text x="585" y="362" text-anchor="middle" font-weight="700" font-size="10" fill="#1a2744">Windows DocServer (108.181.102.34)</text>
<text x="585" y="378" text-anchor="middle" font-size="8" fill="#64748b">Word COM | MinIO poller (12s) | SSH:22422 | LibreOffice fallback</text>
<!-- External Services -->
<rect x="15" y="475" width="745" height="100" rx="6" fill="#fff" stroke="#e2e8f0" stroke-width="1.5"/>
<text x="387" y="493" text-anchor="middle" font-weight="700" font-size="12" fill="#1a2744">External Services and Portals</text>
<rect x="25" y="500" width="72" height="18" rx="3" fill="#eff6ff" stroke="#93c5fd"/>
<text x="61" y="513" text-anchor="middle" font-size="8" fill="#1e40af">Stripe</text>
<rect x="102" y="500" width="72" height="18" rx="3" fill="#eff6ff" stroke="#93c5fd"/>
<text x="138" y="513" text-anchor="middle" font-size="8" fill="#1e40af">PayPal</text>
<rect x="179" y="500" width="72" height="18" rx="3" fill="#ecfdf5" stroke="#6ee7b7"/>
<text x="215" y="513" text-anchor="middle" font-size="8" fill="#065f46">RelayFi</text>
<rect x="256" y="500" width="72" height="18" rx="3" fill="#fefce8" stroke="#facc15"/>
<text x="292" y="513" text-anchor="middle" font-size="8" fill="#854d0e">Bridge</text>
<rect x="333" y="500" width="72" height="18" rx="3" fill="#f5f3ff" stroke="#a78bfa"/>
<text x="369" y="513" text-anchor="middle" font-size="8" fill="#5b21b6">USAC</text>
<rect x="410" y="500" width="72" height="18" rx="3" fill="#f5f3ff" stroke="#a78bfa"/>
<text x="446" y="513" text-anchor="middle" font-size="8" fill="#5b21b6">FCC ECFS</text>
<rect x="487" y="500" width="72" height="18" rx="3" fill="#f5f3ff" stroke="#a78bfa"/>
<text x="523" y="513" text-anchor="middle" font-size="8" fill="#5b21b6">FCC CORES</text>
<rect x="564" y="500" width="72" height="18" rx="3" fill="#f5f3ff" stroke="#a78bfa"/>
<text x="600" y="513" text-anchor="middle" font-size="8" fill="#5b21b6">FCC RMD</text>
<rect x="641" y="500" width="72" height="18" rx="3" fill="#fee2e2" stroke="#fca5a5"/>
<text x="677" y="513" text-anchor="middle" font-size="8" fill="#991b1b">State SOS</text>
<rect x="25" y="524" width="72" height="18" rx="3" fill="#fee2e2" stroke="#fca5a5"/>
<text x="61" y="537" text-anchor="middle" font-size="8" fill="#991b1b">IRS (EIN)</text>
<rect x="102" y="524" width="72" height="18" rx="3" fill="#fce7f3" stroke="#f9a8d4"/>
<text x="138" y="537" text-anchor="middle" font-size="8" fill="#9d174d">BC COLIN</text>
<rect x="179" y="524" width="72" height="18" rx="3" fill="#fce7f3" stroke="#f9a8d4"/>
<text x="215" y="537" text-anchor="middle" font-size="8" fill="#9d174d">Porkbun</text>
<rect x="256" y="524" width="72" height="18" rx="3" fill="#fce7f3" stroke="#f9a8d4"/>
<text x="292" y="537" text-anchor="middle" font-size="8" fill="#9d174d">Flowroute</text>
<rect x="333" y="524" width="72" height="18" rx="3" fill="#fce7f3" stroke="#f9a8d4"/>
<text x="369" y="537" text-anchor="middle" font-size="8" fill="#9d174d">HestiaCP</text>
<rect x="410" y="524" width="72" height="18" rx="3" fill="#fed7aa" stroke="#f97316"/>
<text x="446" y="537" text-anchor="middle" font-size="8" fill="#9a3412">NWRA (RA)</text>
<rect x="487" y="524" width="72" height="18" rx="3" fill="#fed7aa" stroke="#f97316"/>
<text x="523" y="537" text-anchor="middle" font-size="8" fill="#9a3412">Anytime MB</text>
<rect x="564" y="524" width="72" height="18" rx="3" fill="#e0f2fe" stroke="#7dd3fc"/>
<text x="600" y="537" text-anchor="middle" font-size="8" fill="#0c4a6e">SMTP2GO</text>
<rect x="641" y="524" width="72" height="18" rx="3" fill="#f1f5f9" stroke="#cbd5e1"/>
<text x="677" y="537" text-anchor="middle" font-size="8" fill="#475569">TronGrid</text>
<rect x="25" y="548" width="72" height="18" rx="3" fill="#f1f5f9" stroke="#cbd5e1"/>
<text x="61" y="561" text-anchor="middle" font-size="8" fill="#475569">publicnode</text>
<rect x="102" y="548" width="72" height="18" rx="3" fill="#f1f5f9" stroke="#cbd5e1"/>
<text x="138" y="561" text-anchor="middle" font-size="8" fill="#475569">iConectiv</text>
<rect x="179" y="548" width="72" height="18" rx="3" fill="#f1f5f9" stroke="#cbd5e1"/>
<text x="215" y="561" text-anchor="middle" font-size="8" fill="#475569">Tawk.to</text>
<rect x="256" y="548" width="72" height="18" rx="3" fill="#f1f5f9" stroke="#cbd5e1"/>
<text x="292" y="561" text-anchor="middle" font-size="8" fill="#475569">Stripe ID</text>
<rect x="333" y="548" width="72" height="18" rx="3" fill="#f1f5f9" stroke="#cbd5e1"/>
<text x="369" y="561" text-anchor="middle" font-size="8" fill="#475569">CoinGecko</text>
<!-- Legend -->
<rect x="790" y="130" width="185" height="210" rx="6" fill="#fff" stroke="#e2e8f0"/>
<text x="882" y="148" text-anchor="middle" font-weight="700" font-size="11" fill="#1a2744">Legend</text>
<rect x="800" y="156" width="10" height="10" rx="2" fill="#eff6ff" stroke="#93c5fd"/>
<text x="818" y="165" font-size="9" fill="#475569">Frontend / Static</text>
<rect x="800" y="172" width="10" height="10" rx="2" fill="#fef3c7" stroke="#f59e0b"/>
<text x="818" y="181" font-size="9" fill="#475569">API / Backend</text>
<rect x="800" y="188" width="10" height="10" rx="2" fill="#f5f3ff" stroke="#a78bfa"/>
<text x="818" y="197" font-size="9" fill="#475569">Workers / Automation</text>
<rect x="800" y="204" width="10" height="10" rx="2" fill="#f0fdf4" stroke="#86efac"/>
<text x="818" y="213" font-size="9" fill="#475569">Database</text>
<rect x="800" y="220" width="10" height="10" rx="2" fill="#fed7aa" stroke="#f97316"/>
<text x="818" y="229" font-size="9" fill="#475569">Crypto / SHKeeper</text>
<rect x="800" y="236" width="10" height="10" rx="2" fill="#fce7f3" stroke="#f9a8d4"/>
<text x="818" y="245" font-size="9" fill="#475569">CRM / ERPNext</text>
<rect x="800" y="252" width="10" height="10" rx="2" fill="#fefce8" stroke="#facc15"/>
<text x="818" y="261" font-size="9" fill="#475569">Treasury / Payments</text>
<rect x="800" y="268" width="10" height="10" rx="2" fill="#e0f2fe" stroke="#7dd3fc"/>
<text x="818" y="277" font-size="9" fill="#475569">Email / Marketing</text>
<rect x="800" y="284" width="10" height="10" rx="2" fill="#fee2e2" stroke="#fca5a5"/>
<text x="818" y="293" font-size="9" fill="#475569">Government Portals</text>
<rect x="800" y="300" width="10" height="10" rx="2" fill="#f1f5f9" stroke="#cbd5e1"/>
<text x="818" y="309" font-size="9" fill="#475569">Third-party APIs</text>
<rect x="800" y="316" width="10" height="10" rx="2" fill="#dbeafe" stroke="#60a5fa"/>
<text x="818" y="325" font-size="9" fill="#475569">Batch/Ordering</text>
<!-- Stats -->
<rect x="790" y="350" width="185" height="130" rx="6" fill="#fff" stroke="#e2e8f0"/>
<text x="882" y="368" text-anchor="middle" font-weight="700" font-size="11" fill="#1a2744">System Stats</text>
<text x="800" y="385" font-size="9" fill="#475569">Containers: 19 (prod+dev)</text>
<text x="800" y="399" font-size="9" fill="#475569">k3s pods: 9 (SHKeeper)</text>
<text x="800" y="413" font-size="9" fill="#475569">Service handlers: 34</text>
<text x="800" y="427" font-size="9" fill="#475569">DB migrations: 67</text>
<text x="800" y="441" font-size="9" fill="#475569">Systemd timers: 13</text>
<text x="800" y="455" font-size="9" fill="#475569">Jurisdictions: 55 (51 US + 4 CA)</text>
<text x="800" y="469" font-size="9" fill="#475569">State adapters: 52 (10 real)</text>
<!-- Boot sequence -->
<rect x="790" y="490" width="185" height="84" rx="6" fill="#fff" stroke="#e2e8f0"/>
<text x="882" y="508" text-anchor="middle" font-weight="700" font-size="11" fill="#1a2744">Boot Sequence</text>
<text x="800" y="524" font-size="8" fill="#475569">1. docker.service (systemd)</text>
<text x="800" y="536" font-size="8" fill="#475569">2. k3s.service (SHKeeper pods)</text>
<text x="800" y="548" font-size="8" fill="#475569">3. performancewest.service (prod)</text>
<text x="800" y="560" font-size="8" fill="#475569">4. performancewest-dev.service</text>
<text x="800" y="572" font-size="8" fill="#475569">5. nginx.service (TLS + proxies)</text>
<!-- Footer -->
<text x="600" y="670" text-anchor="middle" font-size="9" fill="#94a3b8">All services auto-restart on reboot. Containers: restart=unless-stopped. k3s manages pod lifecycle. nginx configs in /etc/nginx/conf.d/ persist.</text>
</svg>