Enterprise-grade Trade Copy Platform for real-time trade synchronization, risk management, and account handling using a microservices architecture.
The Trade Copy Platform is a robust, scalable solution designed to securely copy trades across multiple accounts in real-time. Built entirely with TypeScript across the stack, it leverages a microservices architecture to ensure high availability, low latency, and fault tolerance.
The platform uses an NPM Workspaces monorepo structure, containing a React frontend and several Node.js/TypeScript backend services.
- API Gateway (
services/api-gateway): The central entry point for all client requests, handling routing, rate limiting, and request aggregation. - Auth Service (
services/auth-service): Manages user authentication, authorization, and session handling. - Account Service (
services/account-service): Handles user accounts, portfolio management, and platform configuration. - Trade Sync Engine (
services/trade-sync-engine): The core engine responsible for receiving, processing, and distributing trade signals in real-time. - Risk Engine (
services/risk-engine): Evaluates trades against predefined risk parameters and constraints before execution. - Broker Adapters (
services/broker-adapters): Integration layer for connecting with external trading platforms and APIs.
- Admin Dashboard (
frontend): A modern, responsive React application built with Tailwind CSS and Vite. It provides comprehensive monitoring, analytics, account management, and configuration interfaces.
- Shared Utils (
packages/shared-utils): Common utilities, logging mechanisms, custom errors, and shared types used across all microservices to maintain consistency.
- Node.js (v20+ recommended)
- npm (v9+)
- Docker and Docker Compose
-
Clone the repository:
git clone <repository-url> cd trade-copy-platform
-
Install dependencies: This project uses npm workspaces, so a single install command from the root will install dependencies for all packages and services.
npm install
To start the local development environment:
-
Start Infrastructure Support: Launch the required databases and message brokers (e.g., Redis, PostgreSQL) using Docker Compose.
docker-compose up -d
-
Start the Frontend: Runs the Vite React development server.
npm run dev -w frontend
-
Start Backend Services: (You can start specific services individually, or configure a script to run them all). For example, to run the auth service:
npm run dev -w services/auth-service
Note: For local development ease, authentication routing and token validation might be currently bypassed in the auth-service.
- Language: TypeScript (Strict Mode)
- Frontend: React, React Router, Tailwind CSS, Zustand/Context API, Vite
- Backend: Node.js, Hono / Express (or similar framework)
- Infrastructure: Docker, Docker Compose
- Monorepo: NPM Workspaces
(To be defined in CONTRIBUTING.md)
(To be defined)