← Back to Projects

ICC Rankings

Live

Feb 2026 – Apr 2026 · 2 months

sports-analytics
ICC Rankings screenshot

ICC Rankings tracks cumulative team points across every ICC format — Men's and Women's World Cups, T20s, Test Championship, and age-group events from 1973 to 2025. A Rust/Axum API serves the historical data; a Next.js frontend renders rankings, team breakdowns, and event pages. Authentication is handled via Google OAuth (NextAuth), with JWT claims carrying role and new-user state. The centrepiece is Twelfth Man, an AI chatbot built on LangGraph and Claude that routes natural language queries through a multi-node agent: classifying intent, running read-only SQL, executing sandboxed Pandas analytics, and formatting the response with optional inline charts. In production, both the API and chatbot run as containerised AWS Lambda functions; DynamoDB replaces MongoDB for chat history and per-user monthly question quotas.

Design Decisions

DynamoDB was chosen over MongoDB for production to eliminate the need for a persistent server in a serverless Lambda deployment — TTL-based auto-expiry handles 90-day chat retention without a cleanup job. Two separate Lambda functions (API + chatbot) are deployed from ECR images managed by Terraform, keeping infrastructure reproducible and idle costs at zero.

Highlights

Timeline

Feb 2026Started
Mar 2026Added Twelfth Man AI chatbot: LangGraph + Claude API with SQL and analytics agents
Mar 2026Added Google OAuth authentication with per-user JWT claims and chat history isolation
Apr 2026Migrated production storage from MongoDB to DynamoDB for serverless-compatible persistence
Apr 2026Added per-user monthly question quota (30/month) with atomic DynamoDB counters and graceful in-chat messaging
Apr 2026Completed

Auth

google-oauth

Infrastructure

aws-lambdaecraws-dynamodbiac

AI / LLM

claude-sonnetclaude-haiku

Tech Stack

TypeScriptRustPythonNext.jsFastAPILangGraphPostgreSQL

Metrics

160 pytest tests across 11 test files

3-language stack: TypeScript · Rust · Python

Architecture

View on GitHub ↗Live Demo ↗