@startuml price-flow title Цена SOL: Binance -> NATS -> шлюз -> контракт -> фронт skinparam componentStyle rectangle skinparam shadowing false actor "Игрок" as User rectangle "Внешняя сеть" { [Binance WS API] as Binance } rectangle "k3s (192.168.76.120)" { rectangle "ns invest" { component "binance-market\n(сборщик цен)" as BM } rectangle "ns game" { component "testfront-gateway\n(шлюз релейера, :8895)" as GW component "testfront\n(статика test-front)" as FE } } cloud "NATS\n192.168.88.93:4222" as NATS database "Solana localnet\n192.168.76.181:8899" as SOL Binance --> BM : WS-поток сделок BM --> NATS : publish market.price.solusdt NATS --> GW : subscribe (только чтение) GW --> SOL : create_bet(entry_price)\nclose_bet(exit_price) GW --> FE : WS /api/ws {"type":"price"} FE --> User : «SOL: 102.30» note right of GW Цена из NATS -> целое x1e8 ("102.30000000" -> 10230000000) Без float: строковый парсер end note note bottom of NATS Core NATS, без JetStream: истории нет, только живая подписка end note @enduml