Subham Haldar
workno source

Cricket Savant — Sports Analytics Platform

Sole backend engineer · Rajasthan Royals (IPL franchise) · Nov 2023 – Sep 2024

Cricket Savant — player analytics and trade simulation for an IPL franchise. Query, compose and ship pillars over a Node.js, Express, BigQuery, MySQL, Firebase, Docker and AWS ECS stack.

A real-time analytics and trading platform for an IPL franchise, built end to end as the sole backend engineer — including direct communication with the client's data analysis team.

Context

Rajasthan Royals, an IPL franchise with a 12M+ fan base, needed player performance evaluation and scouting workflows over a warehouse of millions of records. I owned the project end to end — infrastructure, API design, authentication and deployment — and communicated directly with their data analysis team.

Cricket Savant architecture: a React/Next.js frontend calls an Express API through CORS and request logging; auth routes use a login rate limiter and Firebase, other routes pass JWT verification and an RBAC check, and read from BigQuery, MySQL and a scouting CSV.
System architecture

Query performance

I built a REST API layer over a BigQuery analytical warehouse using multi-CTE drilldown queries and in-process aggregation, cutting query response time from roughly 1 second to 0.65 seconds.

The best-eleven algorithm

A two-pass greedy composition algorithm enforcing the IPL's overseas-player cap and salary-cap tracking, resolving season and competition context through a year-walk query with no hardcoded year.

Best-eleven pipeline: resolve the competition with a year-walk query, fetch the squad from BigQuery, sort batters and bowlers, enforce the overseas quota by backfilling from bowlers, then compute team value and remaining purse and persist the scenario.
Best-eleven algorithm — four stages, two in-process

Deployment and security

A full CI/CD pipeline — Docker to AWS ECR to AWS ECS via GitHub Actions — reduced deployment errors by roughly 30% after automation. Access used dual-token authentication (a JWT access token plus an HttpOnly refresh cookie) behind an RBAC middleware pipeline, backed by two independently isolated GCP service accounts for least-privilege IAM.

Built with

Node.jsExpressGoogle BigQueryDockerAWS ECSAWS ECRGitHub ActionsFirebase