BackTrade — Trading Backtesting Platform
TypeScriptReactNode.jsExpressPrismaZodJWTStripePostgreSQLRedisClickHouseRabbitMQMinIODockerKubernetesNginxCloudflareViteTanStack QueryTurborepopnpmJest

BackTrade is a trading backtesting platform that replays historical markets as if they were live: start a session at any past timestamp, trade in simulated real time and review detailed performance analytics.
- Type: SaaS web platform
- Role: Sole developer — architecture, development and infrastructure
- Timeline: Sep 2025 – Jan 2026
- Live: backtrade.damien-reichhart.fr
Overview
Built for traders and quantitative analysts, BackTrade provides a deterministic simulation environment. Each session is configured with an instrument (XAUUSD, EURUSD…), a time range, a starting balance, leverage, and fixed spread, slippage and commission models — then played back candle by candle, exactly as the market unfolded.
Key features
- Market replay — play, pause and change speed (0.5× to 10×) on interactive candlestick charts
- Concurrent sessions — run several simulations side by side across instruments and timeframes
- Position management — market orders sized in lots, take profit and stop loss with live edits, close one or all positions with real-time P&L
- Performance analytics — detailed metrics for every session
- Subscription tiers — User, Trader and Expert plans with role-based session limits and Stripe billing
- Dataset pipeline — admins upload OHLCV CSV files that are split, validated and ingested asynchronously
Architecture
A TypeScript monorepo (pnpm workspaces + Turborepo) split into independently deployable services that share typed packages for data access, validation, caching, queueing, object storage, mailing and logging.
| Service | Responsibility |
|---|---|
| Web | React + Vite single-page app served by Nginx |
| API | Express REST API — authentication, sessions, trading, billing |
| Worker | RabbitMQ consumers that split and process uploaded datasets |
| Scheduler | Scheduled tasks and failed-job retries |
| PostgreSQL | Core relational data, accessed through Prisma |
| ClickHouse | Historical candlestick time series |
| Redis | Caching layer |
| MinIO | S3-compatible storage for dataset files |
| RabbitMQ | Message broker between the API and workers, with retries and a dead-letter queue |
Engineering highlights
- Security — JWT access and refresh tokens, Argon2 password hashing, Helmet headers, role-based authorization and Zod validation on every request
- Production infrastructure — Docker Compose stack with non-root containers, dropped capabilities, health checks, resource limits and three isolated networks, exposed only through a Cloudflare Tunnel; Kubernetes manifests included
- Code quality — strict TypeScript, ESLint, Prettier, Jest, pre-commit hooks and Conventional Commits
- Documentation — 50+ design documents: use cases, sequence and activity diagrams, data dictionary, API reference, error handling and deployment guides (available below)
Tech stack
- Frontend: React, TypeScript, Vite, React Router, TanStack Query, Zustand, Lightweight Charts, Zod
- Backend: Node.js, Express, Prisma, Pino, Argon2, Stripe
- Data & messaging: PostgreSQL, ClickHouse, Redis, RabbitMQ, MinIO
- DevOps: Docker, Nginx, Cloudflare Tunnel, Kubernetes, pnpm, Turborepo