Deadlock Stats
Production-grade game analytics platform with live data and reverse-engineered match history.
The Problem
Deadlock is a 6v6 hero shooter by Valve - but when it launched in early access, there was no proper match history. No hero win rates. No performance trends. While some tracking tools already existed in the community, none of them presented the data the way we envisioned.
As a team of three, we decided to do it better.
What I Built
Deadlock Labs is a production-grade game analytics platform that ingests data from the public Deadlock API and our own reverse-engineered match history tool (built from GC-Steam communication), processes it, stores it in a relational database, and presents it in a fast, real-time web interface.
Core features:
- Match history - custom tool reverse-engineered from GC-Steam communication, storing 1,000,000+ matches
- Player profiles - stats across all heroes, win rates, performance trends
- Hero analytics - pick rates, win rates, damage profiles per patch
- Leaderboards - ranked by multiple metrics, updated hourly
- Draft tool - built on @dnd-kit with drag-and-drop hero selection
- Live match viewer - real-time data during active matches via polling
Architecture
The stack was chosen for a specific reason: predictable cost and linear scalability.
Frontend: Next.js 16 with React 19 and TypeScript. Server components for the heavy data pages (leaderboards, hero stats), client components only where interactivity is required. This kept the Lighthouse performance score at 94 even with large data tables.
Database: PostgreSQL via Prisma. Match data is normalized across multiple tables - players, heroes, items, match events. Complex queries (e.g., hero win rates filtered by rank bracket) run in under 80ms with proper indexes.
Caching: Redis sits in front of the most expensive queries. Hot data (current leaderboard top 100, hero stats for the current patch) is cached with a 5-minute TTL. This brings the p95 response time for those endpoints from 1.2s to under 40ms.
Auth: NextAuth v5 with Overwolf OAuth - players sign in to claim their profile and track their own stats separately from public data.
Engineering Challenges
Match history didn't exist. Valve doesn't offer an official match history API. We reverse-engineered the GC-Steam communication (Game Coordinator Protobuf messages) and built our own match history tool from it. The system now ingests and stores over 1,000,000 matches.
The public API isn't documented. Valve doesn't publish API docs for Deadlock. We reverse-engineered the endpoints from network traffic, wrote our own type definitions, and built a resilient ingestion layer that handles rate limits, missing fields, and schema changes between patches.
Match data is messy. A single match produces thousands of events. We built a processing pipeline that normalizes events into a clean schema on ingestion - so queries are fast and the schema stays stable even when Valve changes the raw format.
Scale appeared faster than expected. After posting on r/deadlockthegame, the platform hit thousands of unique visitors within 48 hours. The Redis caching layer kept the database from collapsing. No downtime.
Internationalization at scale. The entire UI supports 10+ languages (including English, German, Spanish, Korean, Chinese) via next-intl, including dynamically loaded hero names, ability descriptions, and patch notes. All translated content is statically pre-rendered at build time.
Results
- 1,000,000+ match replays stored and queryable via custom GC-Steam tool
- Lighthouse Performance: 94 - fast on mobile and desktop
- p95 API response time: under 40ms for cached endpoints
- Zero downtime during the initial traffic spike
- Active user base from the Deadlock community
- Multilingual (10+ languages) with full static pre-rendering
Tech Stack
Next.js 16 · React 19 · TypeScript · Prisma · PostgreSQL · Redis · NextAuth v5 · next-intl · @dnd-kit · Vercel · Railway



