Caution
This software is an educational research project.
We are NOT affiliated, associated, authorized, endorsed by, or in any way officially connected with Bitkub Online Co., Ltd. or any of its subsidiaries.
This software is not intended for production financial use. No real assets are handled. (For the live demo we'll use testnet tokens only.)
Bitka Exchange is a proof-of-concept centralized crypto exchange (CEX) designed to handle high-concurrency trading with strict double-entry accounting.
- Atomic Accounting: Double-entry ledger system preventing race conditions and negative balances.
- Event-Driven: Asynchronous communication via Apache Kafka for scalability.
- High Performance: In-memory matching engine (coming soon) and internal communication via gRPC.
- Secure: RS256 JWT Authentication with strict role-based access control (RBAC).
- Clean Architecture: Strict separation of concerns (Domain, Usecase, Repository, Delivery).
Note
We also have other repositories that you might want to check them out at Bitka Exchange GitHub Organization.
The system is composed of decoupled microservices communicating via gRPC for synchronous and Kafka for asynchronous. In the end we plan to deploy hybrid using K3s but for now it's on docker in on-premises with 1 PostgreSQL instance as container (still logically separate database for each service).
| Component | Technology | Description |
|---|---|---|
| Language | Golang 1.24+ | - |
| Framework | Fiber v2 | High-performance HTTP web framework |
| Database | PostgreSQL 18 | Primary persistence |
| Logging | Zerolog | Structured logging |
| ORM | GORM | Data access layer |
| Authentication | JWT (RS256) | User identity & access control |
| Internal Communication | gRPC & Protobuf | Synchronous inter-service communication |
| Messaging | Apache Kafka | Event streaming |
| Gateway | Traefik | Reverse proxy & load balancing |
| Containerization | Docker & Docker Compose | Containerization & local orchestration |
| CI/CD | GitHub Actions | Automated testing (WIP) & deployment |
| API Docs | OpenAPI 3.0.3 | API Contract & Specifications |
| Docs UI | Docusaurus | React framework markdown based docs |
For more details, see Bitka online docs or Markdown file.
bitka/
├── docs/ # OpenAPI & AsyncAPI (WIP) specifications
├── deploy/ # Deployment configurations
├── pkg/ # Shared libraries (Logger, JWT, Middleware, Etc.)
├── portal/ # Docusaurus documentation site
├── services/
│ ├── auth/ # Authentication & User Management
│ ├── user/ # User data & Profile Management
│ ├── ledger/ # Wallet, Assets, & Double-Entry Accounting
│ ├── order/ # Order Management System
│ ├── matching/ # Order Matching Engine
│ └── market/ # Market Data Aggregation
├── compose.yml # Local development stack
├── Makefile # Build & Run commands
└── go.work # Go Workspace configuration
- Docker & Docker Compose
- Make
- Node.js (optionally, for docs site)
git clone https://github.com/BitKa-Exchange/bitka-exchange.git
cd bitka-exchangeCopy the template .env.template to .env and adjust any necessary variables.
make docker-devYou can test the APIs using the interactive docs once the services are running.
cd portal
npm install
cd ..
make docs # at root folderWe plan to implement unit and integration tests on necessary part for each service. But we will focus on integration/e2e testing to allocate time more on other aspect of the project.
Currently, we are interested in Testcontainer for integration/e2e tests. And K6 for load testing.
We welcome contributions from students and anyone who want to learn together! Because this project purpose is mainly for creating environment for learning and research in each person's area of interest, and combine everyone's work to build a complete system.
Right now, we don't have a formal contribution guide yet, only some developer guidelines at Docs. If you want to contribute, feel free to open issues or pull requests.
Note
I also encourage you to reach out to me directly first if you want the experience of team collaboration - @14two-77
