⌜ J.A.R.V.I.S. // ONLINE ⌝
Case Study • System Architecture

The Ultimate Cricket Analytics Platform

I wanted to understand how modern sports analytics systems are built. Starting with over 22,000 raw match files, I designed a data warehouse, engineered point-in-time features, trained multiple ML models, and built an interactive platform that surfaces predictions and cricket intelligence.

ReactNode.jsExpress.jsRapidAPIMachine Learning

22,000+

Matches

4

Models

638K+

Player Matchups

16

Datasets

CricSphere screenshot preview 1
01.Landing
1 / 12

The Vision

When I set out to build CricSphere, the goal wasn't just to display cricket scores. The sports analytics market is saturated with platforms that either bombard users with ads or hide meaningful insights behind complex interfaces. I wanted to build a unified, high-performance ecosystem.

I envisioned a platform where a casual fan could effortlessly track live games, while a hardcore analyst could dive deep into historical PvP matchups, win probabilities, and point-in-time statistics—all rendered in a gorgeous, modern UI.

Engineering the Engine

Handling live sports data at scale presents massive challenges in state management, rate limiting, and ML feature alignment.

Defeating Rate Limits

Live cricket APIs are notoriously expensive. I implemented a highly aggressive, intelligent caching layer. By batching requests and syncing state globally across connected clients, I reduced upstream API calls from ~200/min down to just 18/min, ensuring near-instant updates for users without bottlenecking the backend.

Preventing Data Leakage

Training ML models on sports data is tricky. To prevent the model from "seeing the future", I built a pipeline that engineered point-in-time features. The model calculates a team's rolling win rate, toss luck, and batting economy exactly as it stood before the first ball of the match was bowled.

Model Pipeline Architecture

Three production LightGBM models trained on leak-free chronological splits with early stopping.

22,000+
Raw JSON match files parsed into an optimized schema.
638K+
Historical PvP stats processed for matchup feature extraction.
~63.0%
Real outcome prediction accuracy (Elo + venue + H2H), beating 50% baseline.
Target Prediction Simulation Registry
Target Score165 Runs
Current Score115 Runs
Overs Completed14 / 20 Overs
Wickets Fallen4 Wickets
Batter Matchup IndexNeutral Matchup
45%WIN PROB
Real-time regression predicting outcome likelihood from rolling wickets & required run rate coordinates.
Model 1

Match Outcome Classifier

Uses format-grouped LGBMClassifier (T20, ODI, Test, DOM_LO) predicting outcomes from Elo ratings, rolling head-to-head ratios, and recent venue records.

• Time-respecting train/val splits

• Symmetric team-swapped training rows

• ~63% Accuracy / 0.684 AUC

Model 2

Next-Innings Runs Regressor

Leverages a player-level LGBMRegressor predicting runs in their next innings from chronological shift-expanding averages, rolling last-5/10 match metrics, and boundary index scores.

• Non-overlapping player aggregates

• Early stopping on MAE score

• Outperforms simple average baseline

Model 3

Dismissal Matchup Regressor

An ensemble regressor mapping historical matchup profiles (batter average/strike-rate/dot-percentage vs bowler economy/strike-rate) to predict long-run dismissal rates.

• 70/15/15 train/val/test splits

• Static matchup correlation matrix

• Persisted as joblib and metadata schema

Ready to see it in action?

Launch CricSphere