Skip to content

About

A comprehensive set of endpoints to access Deadlock game data, match history, player statistics, hero analytics, and more. Whether you're a developer integrating game data or a player analyzing performance, the Deadlock API has you covered.

Resources

Stars

41 stars

Watchers

0 watching

Forks

Repository files navigation

Deadlock API

Monorepo for the Deadlock API project.

Structure

  • api/ - Rust API (Axum) serving game data, analytics, leaderboards, and more
  • website/ - React frontend (Vite + React Router) for the Deadlock API website
  • workers/ - Rust microservices for data ingestion, scraping, and pipeline processing
  • db/ - ClickHouse and Postgres schema, pulled from production
  • live-events/ - Rust service for live match event streaming via SSE
  • crates/ - Rust libraries shared by the services, among them:
    • valveprotos/ - Rust bindings for the Steam and Deadlock protobufs (formerly valveprotos-rs)
    • haste/ - Source 2 demo and broadcast parser (formerly deadlock-api/haste), including the dungers bit buffer, varint and char cursor crates it uses (formerly deadlock-api/dungers)
    • demofusion/ - SQL queries (Apache DataFusion) over demo files and live broadcasts, parsed with haste
    • keyvalues/ - parsers for Valve's KV3 (.vdata) and localization files
    • crosshair/ - crosshair share codes (DL.…) to settings and back, and settings to PNG
    • game-assets/ - the versioned game files (.vdata, CSS, localization) to the API's /v1/assets JSON
    • rate-limit/ - the API's sliding-window rate limiter
    • telemetry, service-utils, steam-id, steam-proxy, db-clients, clickhouse-utils and assets-client, the service plumbing that used to live in one common crate

All Rust crates are members of one cargo workspace (Cargo.toml at the repo root), sharing a single Cargo.lock and target/. Build or run any of them from the root with cargo <cmd> -p <package>. Docker images for the Rust services are built with the repo root as context, e.g. docker build -f api/Dockerfile ..

Getting Started

API

cd api
cp .env.example .env
# Edit .env with your credentials
cargo run

Website

cd website
cp .env.example .env
pnpm install
pnpm dev

Workers

# Set up workers/.env with your credentials
cd workers
cargo run -p <service-name>

Live Events

cd live-events
cp .env.example .env
# Edit .env with your credentials
cargo run

See live-events/README.md for full documentation.

License

MIT

About

A comprehensive set of endpoints to access Deadlock game data, match history, player statistics, hero analytics, and more. Whether you're a developer integrating game data or a player analyzing performance, the Deadlock API has you covered.

Resources

Stars

41 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages