SCALABLE TRADING PLATFORMUnlimited VPS Operations
Centralized signal + orchestration, distributed execution, real-time monitoring, and VPS replication. Built for scale (multi-router, multi-local) with manual control when needed.
WebSocket RealtimeMaster–Router–LocalTelemetryVPS Replication
CANONICAL FLOW
Master → Routers (fan-out) → Locals (execute). Locals report status back to Routers. Routers push snapshots to Frontend. Frontend can monitor and send manual commands to all nodes.
Central Brain
Master VPS
Risk rules + orchestration
Execution Scale
Local VPS xN
MT5 execution + PnL control
Network Gateway
Router VPS xN
Fan-out + status relay
Control Plane
Frontend + API
UI commands + replication
Key Idea
Router-centricRouters sit between Master and Locals: they distribute commands to execution nodes and aggregate status back to the UI.
SYSTEM ARCHITECTURE
Drop your diagram at public/architecture.jpg

Legend: Signal → Master decision → Router distribution → Local execution → Router status → Frontend dashboard → Manual commands broadcast.
REALTIME FLOW
Each step is explicit—easy for partners to understand and easy for operators to verify.
STEP 1
realtime1) CCI Indicator VPS → 2) Signal Socket VPS → 3) Master VPS
STEP 2
realtime3) Master VPS → Router VPS (xN)
STEP 3
realtimeRouter VPS (xN) → Local Trading VPS (xN) (MT5 Execution)
STEP 4
realtimeLocal Trading VPS → Router VPS (Status/PnL)
STEP 5
realtimeRouter VPS → Frontend VPS → Dashboard UI (Realtime Monitoring)
STEP 6
realtimeDashboard UI → Manual Commands → Router VPS → All Local VPS
STEP 7
realtimeAPI/Replication VPS → Telemetry + VPS Replication (Scale unlimited nodes)
VPS RESPONSIBILITIES
Clear responsibilities by layer (Bacodo-style ops view).
Signal Generation
Layer 1CCI Indicator VPS
VPSComputes CCI + candle signals and emits real-time trading events.
Signal Socket VPS
VPSNormalizes and pushes signals to Master (dedupe, real-time delivery, reliability).
Decision Engine
Layer 2Master VPS
VPSOrchestration + risk rules. Decides OPEN/CLOSE and distributes orders to Routers.
Distribution & Execution
Layer 3Router VPS (xN)
VPSReceives commands from Master → fans out to Locals. Aggregates status from Locals → pushes to Frontend.
Local Trading VPS (xN)
VPSExecutes MT5 orders, manages PnL/TP/SL locally, and reports status back to Router.
Monitoring & Control
Layer 4Frontend VPS
VPSReceives router snapshots/events and broadcasts real-time updates to the Dashboard UI.
Control / Manual Commands
VPSOperator sends manual commands from UI → Router → broadcast to all Local VPS nodes.
API / Replication VPS
VPSTelemetry + reports + VPS replication (add accounts, scale nodes, automate provisioning).
Operating Rules (System Fit)
Practical rules aligned with the Master–Router–Local design and realtime monitoring/control.
Idempotency
Every OPEN/CLOSE command must be deduped by a unique id to prevent duplicate execution across Router/Local nodes.
Router-Centric Fan-out
Master never talks to every Local directly. Master → Routers, Routers → Locals. Routers also aggregate Local status and push snapshots to UI.
Realtime Visibility
Locals continuously report PnL/TP/SL + health → Routers. UI consumes router snapshots for monitoring and manual broadcast control.
Fail-Safe Control
Manual commands from UI must be broadcast via Router so an operator can stop/close/override consistently across all nodes.
Scale Unlimited Nodes
Replication/API layer should automate provisioning so you can add accounts/nodes without changing the core Master–Router–Local flow.
Next pages (dashboard-style)
Next pages you can add: /dashboard (realtime websocket), /nodes (router/local health), /trades (tickets), and /control (manual commands).
