AI-powered cricket match prediction platform with live win probability, historical data analysis, and an XGBoost ML engine.
The React dashboard works immediately with demo data — no backend required.
# Step 1 — Install dependencies
cd "apps\web"
npm install
# Step 2 — Start the dev server
npm run dev
# Open: http://localhost:5173cd infra
docker-compose up -d db redis# In psql or any DB tool, connect and run:
# apps/api/src/db/migrations/001_initial_schema.sqlcd apps\api
npm install
cp ../../.env.example ../../.env # then fill in your values
npm run dev
# API: http://localhost:3001
# Health: http://localhost:3001/api/health# A. Download Cricsheet IPL data
# Go to: https://cricsheet.org/downloads/
# Download: ipl_json.zip
# Extract to: data\cricsheet\
# B. Run the importer
npx ts-node scripts\import_cricsheet.ts .\data\cricsheet\
# Imports ~1000 matches with ball-by-ball datacd services\ml
pip install -r requirements.txt
python -m src.training.train_pre_match
# Saves model to: services/ml/artifacts/pre_match_v1.pklcd services\ml
uvicorn main:app --port 8000
# ML API: http://localhost:8000ipl betting/
├── apps/
│ ├── web/ ← React + Vite dashboard (http://localhost:5173)
│ └── api/ ← Node + Express API (http://localhost:3001)
├── services/
│ └── ml/ ← Python FastAPI ML (http://localhost:8000)
├── scripts/
│ └── import_cricsheet.ts ← Historical data importer
├── infra/
│ └── docker-compose.yml ← PostgreSQL + Redis
└── .env.example ← Copy to .env and fill in API keys
To get live ball-by-ball updates during matches (starting March 28, 2026):
- Sign up at Roanuz Cricket API (free tier available)
- Add your key to
.env:ROANUZ_API_KEY=your_key_here - The API poller in
apps/api/src/jobs/index.tswill auto-activate
| Phase | Model | Inputs |
|---|---|---|
| Pre-match | XGBoost | ELO, team form, venue, head-to-head, toss |
| Live | Heuristic → ML | Score, wickets, CRR, RRR, balls remaining |
- Pre-match: Updates when IPL 2026 fixtures are announced
- Live: Refreshes every 3 seconds in the UI, every 10s from the poller
| Source | Purpose | URL |
|---|---|---|
| Cricsheet | Historical IPL 2008–2025 | cricsheet.org/downloads |
| IPL Official | 2026 Fixtures & Results | iplt20.com |
| Roanuz / CricketAPI | Live ball-by-ball | sports.roanuz.com |
For full beginner-to-advanced documentation, read: