How white-trade-loan/algo-trading-platform works
Algo Trading is a self-hosted trading platform: traders build or configure strategies, test them in the sandbox, then route orders through a unified broker API. Its React application also provides options analytics and operational tools; the TypeScript server exposes health and API routes, with SQLite and optional Redis infrastructure. The README describes broader capabilities than the sampled backend implementation, and notes that many broker adapters and API endpoints are still in progress; links to those capabilities are documented rather than verified in source.
Main entry points: App.tsx React app · v1.ts Unified broker API · main.ts HTTP server · redis.ts Redis client
Components 24
Trader application
- React app
frontend/src/App.tsx - API client
frontend/src/api/client.ts - Authentication state
frontend/src/stores/authStore.ts
Strategy surfaces
- Visual strategy builder
frontend/src/pages/flow - Python strategy host
frontend/src/pages/python-strategy - Chartink strategies
frontend/src/pages/chartink - Sandbox and analyzer
frontend/src/pages/Analyzer.tsx
Trading and analytics
- Unified broker API
src/server/routes/api/v1.ts - Broker registry
src/server/broker/registry.ts - Options analytics
frontend/src/pages/OptionChain.tsx - Options strategy builder
frontend/src/pages/StrategyBuilder.tsx - Order approval
frontend/src/pages/ActionCenter.tsx - Dashboards and alerts
frontend/src/pages/monitoring - Live market data
frontend/src/lib/MarketDataManager.ts
Server and state
- HTTP server
src/server/main.ts - Route assembly
src/server/app.ts - Health endpoint
src/server/routes/health.ts - SQLite databases
src/server/db/connection.ts - Cache store
src/cache/store.ts - Redis client
src/cache/redis.ts - Server settings
src/server/config/settings.ts
Other components
- Trader
- Connected broker
- Redis service
Connections 29
- Trader → React app: uses
- React app → Options analytics: routes to
frontend/src/App.tsx - React app → Options strategy builder: routes to
frontend/src/App.tsx - React app → Sandbox and analyzer: routes to
frontend/src/App.tsx - React app → Visual strategy builder: opens
- React app → Python strategy host: opens
frontend/src/App.tsx - React app → Chartink strategies: opens
frontend/src/App.tsx - React app → API client: uses
- API client → Unified broker API: requests
- Trader → Unified broker API: integrates
- Unified broker API → Broker registry: consults
src/server/routes/api/v1.ts - Broker registry → Connected broker: dispatches
- Options strategy builder → Live market data: streams from
- Options analytics → Live market data: streams from
- Visual strategy builder → Sandbox and analyzer: sandbox trades
- Python strategy host → Sandbox and analyzer: sandbox trades
- Unified broker API → Sandbox and analyzer: supports testing
- Trader → Order approval: reviews orders
- Trader → Dashboards and alerts: monitors
- HTTP server → Route assembly: serves
src/server/main.ts - Route assembly → Health endpoint: mounts
src/server/app.ts - Route assembly → Unified broker API: mounts
src/server/app.ts - HTTP server → Server settings: loads
src/server/main.ts - HTTP server → SQLite databases: closes
src/server/main.ts - HTTP server → Redis client: closes
src/server/main.ts - Health endpoint → SQLite databases: checks
src/server/routes/health.ts - Health endpoint → Redis client: checks
src/server/routes/health.ts - Cache store → Redis client: uses
src/cache/store.ts - Redis client → Redis service: connects to