Skip to Content
Home

BattlesBit Documentation

Welcome to the BattlesBit project documentation.

What is BattlesBit?

BattlesBit is a competitive trading game platform where players:

  1. Pay real entry fees to join trading challenges
  2. Compete using virtual balance to maximize trading profits
  3. 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 Prize

Game Flow

  1. Join: Pay entry fee from your wallet
  2. Trade: Use virtual $100 USDT to open positions
  3. Compete: Trade using real Binance market data
  4. Win: Highest profit wins the prize pool + XP + rewards

Projects Overview

ProjectDescriptionProgress
BackendGo-based API serverV1 Complete
Admin PanelReact Admin dashboardV1 Complete
Mobile AppIonic/Capacitor app~60%
InfrastructureTerraform IaCActive

Backend Service

The core API server handling all business logic.

Tech Stack:

TechnologyPurpose
GoBackend language
PostgreSQLDatabase (Ent ORM)
GraphQLAPI layer (gqlgen)
NATS JetStreamEvent messaging
TemporalWorkflow orchestration
SolanaBlockchain integration
BinanceMarket data provider

Key Features:

  • Wallet & settlement system
  • Position management
  • Real-time PnL calculation
  • Matchmaking
  • Achievement system
  • Notifications

View Backend Docs →


Admin Panel

Internal dashboard for platform management.

Tech Stack:

TechnologyPurpose
React 19UI framework
React Admin 5Admin framework
MUI 7UI components
URQLGraphQL client
ViteBuild tool
TypeScriptType safety

Key Features:

  • User management
  • Game/Match management
  • Wallet administration
  • Transaction oversight
  • Achievement configuration
  • Store management

View Admin Docs →


Mobile Application

The primary user-facing app for iOS, Android, and Web.

Tech Stack:

TechnologyPurpose
React 19UI framework
Ionic ReactMobile UI
Capacitor 6Native bridge
MUI 6Components
URQLGraphQL client
ZustandState management
Lightweight ChartsTrading charts
GSAPAnimations

Key Features:

  • User authentication (email OTP)
  • Challenge browsing and joining
  • Real-time trading interface
  • Live PnL tracking
  • Wallet management
  • Achievement system
  • Leaderboard

View Mobile Docs →


Infrastructure

Infrastructure as Code managing DNS, domains, and deployments.

Tech Stack:

TechnologyPurpose
TerraformInfrastructure as Code
Terraform CloudRemote state
CloudflareDNS & CDN
Cloudflare PagesStatic hosting

Managed Resources:

  • 7 domains (battlesbit.com, .ir, .xyz, etc.)
  • 4 Cloudflare Pages projects
  • DNS records & email configuration
  • Dev environment routing

View Infrastructure Docs →


Current Status

Backend (V1 Complete)

StatusModules
DoneWallet, Positions, Room-Based Matching, Achievements, Notifications, Risk Management, Challenge Rules, Match Lifecycle, Social, Analytics, Anti-Cheat (V1), Equity/Margin
V2ML anti-cheat, Stop-limit/OCO orders, Multi-provider market data

Admin (~60%)

StatusResources
DoneUsers, Games, Achievements, Badges, Consumables, Risk Management Fields, Challenge Rules
In ProgressAnalytics dashboard, User Moderation
PlannedAudit logs, Advanced analytics

Mobile (~60%)

StatusModules
DoneAuth, Challenges, Trading UI, Charts, Achievements
In ProgressWallet flows, Profile editing, Store
PlannedPush notifications, Social features, Deep links

SectionDescription
Backend Feature TrackingBackend development progress
Admin Feature TrackingAdmin panel progress
Mobile Feature TrackingMobile app progress
Trading ModulePosition management details
Challenge ModuleGame and match system
Mobile ScreensScreen documentation
Domains & DNSDomain configuration
DeploymentsCloudflare Pages setup
ContributingHow 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 Service
Last updated on