A modern, scalable cryptocurrency exchange platform built with Rust and Next.js, featuring real-time trading, order matching, and WebSocket-based market data streaming.
TrueMan2 follows a microservices architecture designed for high performance and scalability:

trueman2/
├── api/ # Instead of /api
├── engine/ # Instead of /simulator
├── ws/ # Instead of /engine
├── db-updater/ # Instead of /ws
├── simulator/ # Instead of /db-updater
└── client/ # Instead of /db-updater
- Framework: Actix Web (Rust)
- Purpose: REST API endpoints for trading operations
- Key Features:
- User authentication with JWT
- Order management (create, cancel, query)
- Balance operations (deposit, withdraw)
- Admin panel for market/token management
- Real-time order processing via Redis
- Framework: Tokio async runtime
- Purpose: Core order matching and trade execution
- Key Features:
- In-memory order book management
- Real-time order matching (FIFO algorithm)
- Market and limit order support
- Balance validation and locking
- Trade execution and settlement
- Framework: Axum (Rust)
- Purpose: Real-time market data streaming
- Key Features:
- Live order book updates
- Real-time trade notifications
- Market ticker updates
- Client subscription management
- Purpose: Asynchronous database persistence
- Key Features:
- Processes Redis stream events
- Maintains data consistency
- Handles order/trade/balance updates
- Transaction-based operations
- Purpose: Market simulation and stress testing
- Key Features:
- Automated trading bots
- Market data generation
- Performance testing
- Liquidity simulation
- Framework: Next.js 15 with TypeScript
- UI Library: Radix UI + Tailwind CSS
- State Management: Zustand
- Key Features:
- Modern trading interface
- Real-time charts and order books
- Responsive design
- Dark/light theme support
- Actix Web: High-performance HTTP server
- Tokio: Async runtime for concurrency
- Diesel: Type-safe SQL ORM
- Redis: Message queuing and caching
- JWT: Stateless authentication
- UUID: Unique identifiers
- Next.js 15: React framework with SSR
- Tailwind CSS: Utility-first styling
- Radix UI: Accessible component primitives
- Zustand: Lightweight state management
- Axios: HTTP client
- PostgreSQL: Primary database
- Redis: Message broker and cache
- Docker: Containerization
- Docker Compose: Multi-service orchestration