Production-ready cricket betting analytics — win probability, player props, value bets, and playoff forecasts backed by verified data.
Wicket Oracle is a production-grade web app for cricket bettors who want data-driven insights. Every day before matches start, a nightly pipeline pulls the latest fixtures, weather, and DraftKings lines, then runs validated predictions. You see, side by side, what the model thinks will happen and what the bookmaker is pricing — so you can spot the gaps.
2026 audit update: match-winner betting is disabled; totals and in-play are research-only with flat paper stakes; player props abstain until confirmed-XI and timestamped-price gates pass. Kelly staking is not published.
The frontier implementation adds multi-format coverage, point-in-time logging, leakage-safe forward validation, live win probability, toss/XI scenarios, matchup shrinkage, advanced venue/phase analytics, model health, and optional OpenCode Zen previews through OPENCODE_API_KEY.
Production Features:
- ✅ No mock data in production — Never shows simulated predictions as real
- ✅ Atomic cache updates — Failed pipeline runs preserve last known good data
- ✅ Full audit trail — Every run tracked with manifest, errors, and data lineage
- ✅ Competition-aware — Per-competition status tracking (ready/stale/no_fixtures/etc.)
- ✅ Model validation — Predictions only published if they pass 6 validation gates
- ✅ Performance tracking — Settled predictions scored with Brier, calibration, ROI, CLV
- ✅ Comprehensive testing — Unit tests, integration tests, CI/CD with GitHub Actions
Today's Matches Research forecasts for each match with format-aware context, venue and weather inputs, toss/XI scenarios, forecast horizon, data coverage, and model verification status. Captured market prices are shown for comparison only while winner publishing is disabled.
Player Props Research projections for batters and bowlers. The app explicitly abstains instead of inventing lines, and props remain unavailable until confirmed-XI, timestamped-price, sample-size, and validation gates pass.
Market Release Gates An auditable view of per-market policy and validation status. Match-winner publishing is disabled; totals and in-play are research-only with flat paper stakes; props and futures remain unavailable. No Kelly stakes are published.
Team Deep Dive Recent form, batting and bowling breakdowns by phase of play (powerplay / middle overs / death), head-to-head records, and venue-specific performance for any team in the competition.
Fixtures & Table The full schedule with results, live points table, and a playoff probability simulator that runs 10,000 season scenarios to show each team's chances of making the top four.
Model Performance A running scorecard of how predictions have performed. Rolling accuracy, Brier score, calibration metrics, cumulative ROI, closing line value (CLV), and full match-by-match settlement log.
Statistics Deep-dive profiles for every venue, batter, bowler, and umpire based on historical ball-by-ball data.
The front-end is a pure static React site (no Python server, no Streamlit). The Python pipeline remains, but it runs only inside GitHub Actions as the nightly data pull; the site consumes its exported JSON at build/serve time.
cd web
npm install
npm run dev # local dev server at http://localhost:5173
npm run build # type-check + production build into web/dist
npm run preview # serve the production build locallypip install -r requirements.txtTo see real predictions, you need two free API keys:
| Key | Where to get it |
|---|---|
ODDS_API_KEY |
the-odds-api.com |
CRICKET_DATA_API_KEY |
cricketdata.org |
Create a .env file (never commit this):
APP_ENV=production
ODDS_API_KEY=your_key_here
CRICKET_DATA_API_KEY=your_key_hereThen run the data pipeline and refresh the site's data bundle:
python -m pipeline.run_pipeline --skip-cricsheet
python pipeline/export_site_data.pyAfter that, the pipeline runs automatically every morning at 06:00 UTC via GitHub Actions, exports web/public/data/*.json, commits the result, and triggers a Cloudflare Pages redeploy — so the site always has fresh data.
Important: In production mode (APP_ENV=production), the pipeline never writes mock data. If the pipeline hasn't run or a cache is missing, the site displays its "No data available" state instead of fake predictions.
- Fetch Cricsheet — Historical ball-by-ball data → team form, player stats, venue stats
- Fetch Fixtures — CricketData.org → today's matches + full schedule
- Fetch Odds — The Odds API → DraftKings implied probabilities
- Fetch Weather — Open-Meteo (no key required) → venue weather forecasts
- Feature Engineering — Build model features from historical and current data
- Run Models — XGBoost + LightGBM predictions (with validation)
- Monte Carlo — 10,000-trial playoff probability simulator
- Reconcile Predictions — Match predictions to actual results for performance tracking
- Export Site Data —
pipeline/export_site_data.pymaterialises the static bundle intoweb/public/data/
[APIs] → [Nightly GH Workflow] → [Atomic Cache] → [Site Data Export] → [Cloudflare Pages]
↓
[Run Manifests]
- Pipeline writes to
cache/runs/{run_id}/during execution - On success, atomically promotes to production cache with backup
- On failure, preserves last known good cache
- Every run tracked with full manifest (errors, warnings, counts, hashes)
- The site itself is fully static: it fetches
/data/*.jsonand renders client-side
Each competition tracked with granular status:
ready— Live predictions availablestale— Data > 24 hours oldno_fixtures— No matches scheduledno_draftkings_market— No betting markets availablehistorical_data_insufficient— Need 100+ historical matchesmodel_not_ready— Model failed validationno_qualifying_bets— No bets meet edge thresholdfetch_failed— API errorsnot_run— Pipeline never executednot_enabled— Competition disabled for production
cd web
npm install
npm run devThe site is a static build hosted on Cloudflare Pages via Git integration: Cloudflare pulls the repo from GitHub and builds it on every push — no API tokens, no repo secrets, nothing pushed from CI.
One-time setup in the Cloudflare dashboard (Workers & Pages → Create → Pages → Connect to Git → select gmalbert/cricket):
| Setting | Value |
|---|---|
| Project name | wicket-oracle |
| Production branch | main |
| Root directory | web |
| Build command | npm run build |
| Build output directory | dist |
After that, every push to main — including the nightly pipeline's data commits under web/public/data/ — is pulled by Cloudflare and republished automatically. Branch pushes get preview URLs.
See docs/DEPLOYMENT.md and web/README.md for the full guide.
# Run health check (pipeline data freshness)
python scripts/health_check.py
# Expected output:
# ✅ Environment: production
# ✅ Cache is fresh (last updated: 2026-07-22T06:15:30Z)
# ✅ Using production data
# ✅ Competitions ready: 3/5
# ✅ Overall Status: HEALTHYRun the full test suite:
# Python: pipeline + export contract tests
pytest tests/ -v
# With coverage
pytest tests/ -v --cov=pipeline --cov=utils --cov-report=term
# Web: type-check and build
cd web && npm run buildCI/CD runs automatically on every push:
- Code quality (ruff, mypy)
- Unit tests + site-data export smoke test
- Integration tests
- Security scanning
- Build verification (Python imports + web build)
After every match finishes, the nightly pipeline checks the actual result against what was predicted and logs it. The Model Performance page shows this full history with:
- Brier score — Calibration quality (lower is better, 0.20 is good)
- Calibration slope/intercept — Are 60% predictions winning 60% of the time?
- ROI by edge bucket — Are high-edge picks actually more profitable?
- Closing Line Value (CLV) — Is the model ahead of market moves?
There's nowhere to hide a bad run. Every bet recommendation is backed by a live, auditable track record.
- PRODUCTION_PLAN.md — 8-phase production readiness plan
- docs/DEPLOYMENT.md — Deployment guide for all environments
- docs/RUNBOOK.md — Operational procedures and troubleshooting
- docs/architecture.md — System architecture overview
- pipeline/README.md — Pipeline component details
| Variable | Required | Purpose | Example |
|---|---|---|---|
APP_ENV |
Yes | Controls mock data behavior | production or development |
ODDS_API_KEY |
Production only | The Odds API access | abc123... |
CRICKET_DATA_API_KEY |
Production only | CricketData.org access | xyz789... |
OPENCODE_API_KEY |
Optional | OpenCode Zen evidence-based match previews | your-secret |
OPENCODE_PREVIEWS_ENABLED |
Optional | Override preview calls; defaults on when OPENCODE_API_KEY exists |
true or false |
Never commit .env files — use environment secrets in production.
MIT License — see LICENSE for details.
- Issues: GitHub Issues
- Deployment: See docs/DEPLOYMENT.md
- Operations: See docs/RUNBOOK.md