Inspiration

Cricket broadcasts tend to tell you which team is ranked highest, not which team is actually likely to win tonight. During the 2026 India versus England T20I series, India were the top-ranked side on ICC rating and still lost four T20Is in a row, yet the on-screen graphics kept leading with their ranking. Rankings are a slow-moving average, while form is what is true right now.

I wanted a tool that makes that point directly, with a number: a match-intelligence platform that trusts recent form over reputation, factors in the pitch and the weather, plays matches out live, and defends every prediction it makes instead of hiding its mistakes.

What it does

PitchIQ is a T20 international match-intelligence dashboard with eleven working sections:

  • Form-first win predictions for every upcoming T20I, shown as a three-way split of team one win percentage, no-result percentage, and team two win percentage, with the exact drivers behind each call.
  • A live in-play model that plays a match ball by ball at real T20 pace and updates the win probability as it goes.
  • Pitch, weather and venue intelligence, top-20 team profiles, player scouting, and a what-if simulator where the pitch is locked to the selected ground and you adjust the weather and toss.
  • A model performance page that tracks every published prediction and grades its own rolling accuracy.

Everything on screen is derived live from the data. Nothing is a hardcoded mock.

How I built it

The prediction logic runs in the browser from the underlying data. Open any section and it is live.

Form-first pre-match engine. The win probability is a weighted sum of three signals, with recent form deliberately outweighing ranking:

$$P_1 = \text{clip}\left(50 + \text{clip}(0.25\,\Delta R,\ -6,\ 6) + 7\,\Delta F_{\text{team}} + 4.5\,\Delta F_{\text{player}},\ 20,\ 80\right)$$

Here ( \Delta R ) is the ICC rating gap and ( \Delta F ) are the form differentials in the range negative one to one. The rating term is capped at plus or minus six, while team form can move the number by up to seven and player form by up to four and a half. Form therefore outweighs ranking by design.

Rain as a first-class input. Each venue forecast carries a rain probability, which becomes a no-result share and folds into the split:

$$\text{NR} = \max(2,\ \text{round}(0.55\,r)), \qquad P_1 + \text{NR} + P_2 = 100$$

where ( r ) is the rain chance for the venue.

In-play model. During a real match window a deterministic feed plays the game at genuine T20 pace, one ball every forty seconds. The first innings projects the final total against venue par, weighted by wickets in hand. The chase uses a resources-remaining model in the style of Duckworth Lewis Stern, passed through a logistic function to a live win probability:

$$P_{\text{win}} = \frac{1}{1 + e^{-k z}}$$

where ( z ) measures the batting side's projected surplus over the required rate, scaled by the resources remaining, and ( k ) sets the steepness.

Confidence calibration. Confidence is a weighted blend of rolling accuracy, data completeness, feature coverage and model agreement, minus a volatility adjustment, so it falls when the model is missing rather than staying pinned high.

Self-recording results. When a match window ends, the result records itself, including the winner, the scores and the top performer. From there every downstream number recalculates through a single reactive data layer: the match moves to results, the model page gains a history row, rolling accuracy and confidence recalibrate, team form updates, and the featured match advances to the next T20I with a fresh prediction. There are no manual edits at any point.

Architecture

PitchIQ is built with Next.js 16 using the App Router and Turbopack, React 19, TypeScript, Tailwind CSS version 4, Recharts and Framer Motion. A single reactive context is the source of truth, merging three layers: a bundled verified dataset, self-recorded results, and an optional live API. Match state is derived from real scheduled windows, so nothing is ever hardcoded as live. An optional free CricketData.org key auto-syncs new international T20Is every fifteen minutes, and the key is read only on the server so it never reaches the browser.

Challenges I faced

The fabrication problem was my biggest lesson. An early version invented a live match and made-up series to look impressive. It looked convincing and was entirely dishonest. I removed it and rebuilt around a firm rule: only ever show a verified, real fixture calendar. For a prediction product, trust is the product.

Making one change update everything was the core engineering problem. A finished match has to update predictions, accuracy, confidence, form and the next fixture at the same time. I re-architected the application around a single reactive provider so that one data change updates every section consistently.

Self-recording without manual edits took several iterations. Teaching the app to detect a finished match, decide the winner, record it, and then have every dependent number recalculate had to be made both correct and repeatable.

Honest data sourcing was harder than expected. ESPNcricinfo has no public API and blocks scraping, so I integrated a legitimate free API with a graceful fallback, and made the settings page report the real connection status rather than a fake connected badge. I also filtered the live feed down to international T20Is so that domestic and placeholder matches never appear.

What I learned

Form beats reputation, and it can be quantified. Capping the ranking term and letting form move the number further is not a shortcut, it is the thesis expressed as mathematics.

A dashboard is a set of promises. Every number implies that it is true, so deriving everything live and letting the model own its misses is what makes it credible.

I also gained a great deal of practical experience with Next.js 16 and React 19 server and client components, reactive state design, and building a design system that stays consistent across eleven pages.

Built With

Share this project:

Updates

Submission history