BattlesBit Documentation
Welcome to the BattlesBit project documentation.
What is BattlesBit?
BattlesBit is a competitive trading game platform where players:
- Pay real entry fees to join trading challenges
- Compete using virtual balance to maximize trading profits
- Winner takes the prize pool (real money)
It’s NOT real trading - it’s a skill-based competition using real market data.
How It Works
Real Money (Entry Fee) → Virtual Trading Balance → Compete → Winner Takes PrizeGame Flow
- Join: Pay entry fee from your wallet
- Trade: Use virtual $100 USDT to open positions
- Compete: Trade using real Binance market data
- Win: Highest profit wins the prize pool + XP + rewards
Projects Overview
| Project | Description | Progress |
|---|---|---|
| Backend | Go-based API server | ~55% |
| Admin Panel | React Admin dashboard | ~40% |
| Mobile App | Ionic/Capacitor app | ~60% |
Backend Service
The core API server handling all business logic.
Tech Stack:
| Technology | Purpose |
|---|---|
| Go | Backend language |
| PostgreSQL | Database (Ent ORM) |
| GraphQL | API layer (gqlgen) |
| NATS JetStream | Event messaging |
| Temporal | Workflow orchestration |
| Solana | Blockchain integration |
| Binance | Market data provider |
Key Features:
- Wallet & settlement system
- Position management
- Real-time PnL calculation
- Matchmaking
- Achievement system
- Notifications
Admin Panel
Internal dashboard for platform management.
Tech Stack:
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| React Admin 5 | Admin framework |
| MUI 7 | UI components |
| URQL | GraphQL client |
| Vite | Build tool |
| TypeScript | Type safety |
Key Features:
- User management
- Game/Match management
- Wallet administration
- Transaction oversight
- Achievement configuration
- Store management
Mobile Application
The primary user-facing app for iOS, Android, and Web.
Tech Stack:
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| Ionic React | Mobile UI |
| Capacitor 6 | Native bridge |
| MUI 6 | Components |
| URQL | GraphQL client |
| Zustand | State management |
| Lightweight Charts | Trading charts |
| GSAP | Animations |
Key Features:
- User authentication (email OTP)
- Challenge browsing and joining
- Real-time trading interface
- Live PnL tracking
- Wallet management
- Achievement system
- Leaderboard
Current Status
Backend (~55%)
| Status | Modules |
|---|---|
| Done | Wallet, Positions, Matchmaking, Achievements, Notifications |
| In Progress | Risk management, Rule engine, Analytics |
| Planned | Anti-cheat, Advanced orders, Multi-provider |
Admin (~40%)
| Status | Resources |
|---|---|
| Done | Users, Games, Achievements, Badges, Consumables |
| In Progress | Settings, Custom actions, Bulk operations |
| Planned | Analytics dashboard, Audit logs |
Mobile (~60%)
| Status | Modules |
|---|---|
| Done | Auth, Challenges, Trading UI, Charts, Achievements |
| In Progress | Wallet flows, Profile editing, Store |
| Planned | Push notifications, Social features, Deep links |
Quick Links
| Section | Description |
|---|---|
| Backend Feature Tracking | Backend development progress |
| Admin Feature Tracking | Admin panel progress |
| Mobile Feature Tracking | Mobile app progress |
| Trading Module | Position management details |
| Challenge Module | Game and match system |
| Mobile Screens | Screen documentation |
| Contributing | How to contribute |
Architecture
┌─────────────────────────────────────────────────────────────┐
│ Mobile App │
│ (React + Ionic + Capacitor) │
│ iOS / Android / Web │
└─────────────────────────────────────────────────────────────┘
│
│ GraphQL
▼
┌─────────────────────────────────────────────────────────────┐
│ Backend Service │
│ (Go) │
├─────────────────────────────────────────────────────────────┤
│ GraphQL API │ Usecases │ Ent ORM │ Temporal │ NATS │
└─────────────────────────────────────────────────────────────┘
│ │ │ │
▼ ▼ ▼ ▼
PostgreSQL Binance WS Solana Redis
(Database) (Market Data) (Blockchain) (Cache)
┌─────────────────────────────────────────────────────────────┐
│ Admin Panel │
│ (React Admin) │
└─────────────────────────────────────────────────────────────┘
│
│ GraphQL
▼
Backend ServiceLast updated on