Skip to main content

Platform Architecture Documentation

This directory contains comprehensive architecture diagrams and documentation for the CMPDR Risk Management & Position Sizing Platform.

Overview

The platform is a Node.js/Express backend with a static HTML frontend that supports multiple providers: TopStepX (REST + SignalR) and cTrader (FIX quote + REST bars + execution). Strategy instances are bound to one provider; risk engine and execution adapters are resolved per instance via the provider registry.

Diagram Index

See 00-diagram-index.md for a complete list of all diagrams and their purposes.

Security Notes

See SECURITY_NOTES.md for information about what is safe to publish and what should never be exposed.

Structure

  • 00-diagram-index.md - Index and navigation for all diagrams
  • 01-context.mmd - System context diagram (C4 Level 0)
  • 02-container.mmd - Container diagram (C4 Level 1)
  • flows/ - Detailed flow diagrams (C4 Level 2)
    • 01-live-entry.mmd - Live trade entry flow
    • 02-exit-reduce.mmd - Exit/reduce order flow
    • 03-pyramiding.mmd - Pyramiding decision flow
    • 04-payout.mmd - Payout security flow
    • 05-consistency-rule.mmd - Topstep consistency rule enforcement
    • 06-simulation.mmd - Simulation/backtesting flow
    • 07-settings-verification-refresh.mmd - Settings and state verification flow