Minute93

The story behind Minute93

A real-time football intelligence platform and a distributed systems portfolio piece built by someone who believes the 93rd minute can change everything.

The Name

93rd minute. Lisbon. 2014.

May 24, 2014. The Champions League final. Real Madrid vs Atlético Madrid. Atlético leading 1-0. Stoppage time. The fourth official raises the board. Three minutes added.

In the 93rd minute, Sergio Ramos rises above everyone to meet a corner kick and powers a header into the net. 1-1. Atlético are broken. Real Madrid go on to win 4-1 in extra time, claiming La Décima, their 10th European Cup.

That moment, raw, dramatic, decided in the final seconds, is exactly what this platform is built to capture in real time.

The Builder

Built by a football enthusiast

I'm Azmain, a software engineer and lifelong Real Madrid fan. Minute93 is a full-stack distributed systems project wrapped in something I genuinely care about.

This isn't a toy demo. It's a full distributed system with event-driven architecture, real-time data pipelines, and production-grade infrastructure, designed to handle live football data across the Champions League, Premier League, and La Liga.

The goal: build something real, deploy it to production, stress-test it with live data, and write about the engineering decisions honestly. What worked, what didn't, and why.

Architecture

What powers this

Every architectural decision serves a purpose. Here are the highlights.

Event-Driven Pipeline

A Kafka-powered pipeline with 4 independent consumers (cache updater, Postgres writer, stats aggregator, and SSE publisher) each processing match events in parallel.

4 Redis Patterns

Cache-aside for hot reads, Pub/Sub for real-time push, rate limiting per IP/user, and Set-based deduplication, all in one Redis instance.

Real-Time SSE

Server-Sent Events deliver live match updates to the browser without polling. Simpler than WebSocket, auto-reconnects, no protocol upgrade.

Layered Security

Nginx rate limiting as first defense, NestJS ThrottlerGuard for per-user granularity, JWT auth with bcrypt, and CORS origin validation.

Materialized Views

Standings and top scorer rankings are pre-computed in PostgreSQL materialized views, refreshed concurrently by Kafka consumers after each event.

Graceful Degradation

Redis down? Fall back to Postgres. API-Football offline? Serve stale cache. Every component is designed to degrade without crashing.

Tech Stack

NestJS
NestJSBackend API
Next.js
Next.jsFrontend
PostgreSQL
PostgreSQLDatabase
Redis
RedisCache & Pub/Sub
Kafka
KafkaEvent Backbone
TypeScript
TypeScriptLanguage
Docker
DockerInfrastructure
Nginx
NginxReverse Proxy

Want to see the code?

Minute93 is open source. Explore the codebase, the architecture docs, and the engineering decisions.