Production-oriented centralized exchange backend built in Rust.
Currently building the foundation layer:
- Rust workspace architecture
- Actix Web API
- SQLx integration
- PostgreSQL migrations
- structured logging
- CI/CD workflows
- verification tooling
- developer automation
graph TD
Client((Client))
Gateway[API Gateway]
Auth[Auth Service]
Order[Order Service]
Risk[Risk Engine]
Match[Matching Engine]
Balance[Balance Service]
Wallet[Wallet Service]
WS[WS Gateway]
Kafka{Kafka / NATS}
Redis[(Redis)]
PG[(Postgres)]
Client --> Gateway
Gateway --> Auth
Gateway --> Order
Gateway --> Balance
Gateway --> Wallet
Gateway --> WS
Order --> Risk
Order --> Kafka
Kafka --> Match
Match --> Kafka
Kafka --> Wallet
Kafka --> Balance
Kafka --> WS
Wallet --> PG
Balance --> PG
Order --> PG
Auth --> PG
Balance --> Redis
Match --> Redis
| Phase | Focus |
|---|---|
| P0 | Workspace, tooling, SQLx, migrations |
| P1 | Authentication + user system |
| P2 | Balance + ledger engine |
| P3 | Matching engine + orderbook |
| P4 | Trade settlement |
| P5 | Redis integration |
| P6 | WebSocket infrastructure |
| P7 | Service separation |
| P8 | Event-driven architecture |
| P9 | Risk engine |
| P10 | Production hardening |
- Rust
- Tokio
- Actix Web
- SQLx
- Tracing
- PostgreSQL
- Redis
- Kafka / NATS
- Prometheus
- Grafana
- Loki
- Jaeger
- Docker
- Kubernetes
- GitHub Actions
cex/
├── apps/
│ └── api/
│
├── crates/
│ ├── config/
│ ├── db/
│ ├── errors/
│ └── types/
│
├── migrations/
├── scripts/
├── docker/
└── .github/
make setupdocker compose up -dmake migratemake runmake fixmake verifyRepository checks include:
- formatting
- clippy
- tests
- dependency audits
- license checks
- git hooks
- CI verification