How finos/traderx works
Project type and purpose
• This is a distributed, polyglot, full-stack reference trading application (“TraderX”) designed as a microservices demo.
• It showcases RESTful services (Java/Spring Boot, .NET Core, Node/NestJS), a message bus (Socket.IO), an embedded SQL database, and two front-end UIs (Angular & React).
File structure
• Top-level service directories:
• database (Java/H2)
• reference-data (Node/NestJS)
• trade-feed (Node/Socket.IO message bus)
• people-service (.NET Core)
• account-service (Java/Spring Boot)
• -service (Java/Spring Boot)
• trade-service (Java/Spring Boot)
• trade-processor (Java/Spring Boot subscriber/processor)
• web-front-end (Angular & React)
• Deployment/config: Dockerfiles, docker-compose.yml, Kustomize under gitops, Tiltfile for Kubernetes.
Key insights from the README
• Services communicate over HTTP/REST and a pub/sub bus
• Default ports for each component and recommended startup sequence
• Support for Docker Compose and Kubernetes via gitops/kustomize/Tiltfile
Main components
A. Database layer
• H2 SQL database container (database)
B. Microservices layer (RESTful)
• Reference-Data Service (Node/NestJS)
• People Service (.NET Core)
• Account Service (Java/Spring Boot)
• Service (Java/Spring Boot)
• Trade Service (Java/Spring Boot)
C. Message Bus layer
• Trade-Feed (Socket.IO publisher)
• Trade-Processor (Socket.IO subscriber + processing)
D. Front-end UI
• Angular App (full account/trade UI)
• React App (trade/blotter UI)
E. Ingress/API gateway (nginx ingress via Kubernetes or Docker Compose)
F. Optional: GitOps/K8s Control Plane (Tilt/Kustomize)
Relationships and interactions
• Front-end → HTTP REST → Reference-Data, People, Account, Position, Trade Services
• Trade Service → publishes to Socket.IO bus (Trade-Feed)
• Trade-Feed → real-time broadcast → UI clients (Angular/React)
• Trade-Processor → subscribes to Socket.IO bus, processes orders, writes to DB, updates Position Service
• Service → queries DB / repository for positions & executed trades
• All Java services talk to the central SQL database for persistence
• Ingress sits in front of all services for unified routing
Architectural patterns & design principles
• Microservices: each bounded context in its own container, own codebase
• Polyglot services: choose best-fit runtimes (Java, .NET, Node)
• Pub/Sub event distribution: Socket.IO bus for real-time updates
• Containerized deployments + Docker Compose or Kubernetes + GitOps
• Clear separation of API (REST) vs messaging
Final checklist
• All components clearly labeled and grouped
• Optional: annotate ports or config files for clarity
• Keep it detailed but avoid clutter—focus on logical interactions and data flows.
• Refer to existing C4 DSL in docs/c4 as a starting point for style and notation.