This repository is a small monorepo for a static frontend plus two backend services:
frontend/: React + Vite UI for backtests, strategy experiments, and live portfolio pagesdata-service/: market-data and trading-oriented backend used by the frontenddispatch-service/: signal delivery backend for notifications and user dispatch preferences
If you are reading the code for the first time, start by treating each folder above as a service boundary. The frontend owns user-facing workflows. data-service owns market data, portfolio state, and bot/watchlist APIs. dispatch-service owns notification fan-out and delivery preferences.
Typical request flow:
- The browser loads the static app from
frontend/. - Frontend route code calls
data-servicethroughVITE_API_BASE_URL. data-serviceserves bars, portfolio snapshots, and bot/watchlist routes.- When watchlist signals should be forwarded,
data-serviceoptionally posts them todispatch-servicethroughSIGNAL_DISPATCH_URL. dispatch-serviceresolves per-user delivery settings and sends or logs the resulting notifications.
That split lets the UI stay deployable as a static site while backend behavior evolves independently.
.
├── frontend/ React application
├── data-service/ Market data + bot/watchlist backend
├── dispatch-service/ Signal delivery backend
└── scripts/ Repo-level helper scripts
- Frontend entry:
frontend/src/main.tsx - Frontend routes:
frontend/src/app/AppRoutes.tsx - Shared backtesting workspace:
frontend/src/features/backtesting/BacktestingWorkspace.tsx - Data-service entry:
data-service/server.ts - Data-service route handlers:
data-service/routes/barsRoute.ts,data-service/routes/botRoutes.ts - Dispatch-service entry:
dispatch-service/server.ts - Dispatch-service routing and delivery orchestration:
dispatch-service/src/dispatcher.ts,dispatch-service/src/delivery.ts
If you want the fastest architectural orientation, read those files in that order.
Install root dependencies once:
npm installCommon commands from the repo root:
npm run dev: rundata-serviceandfrontendtogethernpm run dev:frontend: run only the frontendnpm run dev:api: run onlydata-servicenpm run dev:dispatch: run onlydispatch-servicenpm run build: build the frontendnpm run build:api: typecheck/builddata-servicenpm run build:dispatch: typecheck/builddispatch-servicenpm run build:frontend: typecheck/build the frontend
The frontend expects a reachable backend URL via VITE_API_BASE_URL. The two backend services each document their own environment variables in their service README files.
- The frontend is route-driven. New user-facing experiences usually begin in
frontend/src/app/AppRoutes.tsx. - The backtesting UI has been split into feature folders under
frontend/src/features/rather than staying in one page component. data-serviceis intentionally a plain Node HTTP service instead of an Express app, so route flow is easiest to follow directly fromserver.ts.dispatch-serviceis also a plain Node HTTP service and persists lightweight state to JSON files by default.