A SvelteKit app that turns a Valorant player's recent competitive matches into stats measured against their lobbies, coaching on what to fix first, and a detailed page for every match. Data comes from the HenrikDev Valorant API.
New to the code? Read docs/ARCHITECTURE.md for the layout, request flow and a suggested reading order. Terms are defined in GLOSSARY.md, and the reasons behind key decisions are in docs/adr/.
Requires Node.js 20+, pnpm, and a HenrikDev API key.
pnpm install echo "VALORANT_API_KEY=your_henrikdev_api_key" > .env.local pnpm dev
Open http://localhost:5173 and search for a Riot ID such as Janhoi#VAL.
The key is read only by server code. Do not prefix it with PUBLIC_ or commit
.env.local.
| Command | What it does |
|---|---|
pnpm dev |
Development server with hot reload |
pnpm check |
Type-check Svelte and TypeScript |
pnpm lint |
ESLint |
pnpm format:check |
Prettier check |
pnpm test |
Vitest (provider calls are faked) |
pnpm test:watch |
Vitest in watch mode |
pnpm build |
Production build (Node adapter) |
pnpm preview |
Preview the production build |
pnpm start |
Run the built server (node build) |
| Route | Purpose |
|---|---|
/ |
Search for a player |
/players/[name]/[tag] |
Player dashboard |
/players/[name]/[tag]/matches/[matchId] |
One match from that player's view |
/leaderboard |
Regional Radiant/Immortal+ board |
/api/players/[name]/[tag] |
Profile JSON for the search flow |
/api/health |
Health check |
- Stats, trends and coaching use up to 100 detailed matches, loaded 10 per request with all ten requests sent at once. The match log also lists up to 500 lighter stored matches.
- The activity calendar covers the last 13 weeks of that match log. Days before its oldest stored match show as unknown, not as days off. Tabs shade each day by matches played, K/D or win rate.
- The player page shows the profile first and streams in the stats once the matches have loaded.
- Neither is a player's full career history; the provider only keeps what it has stored.
- KAST, first kills and deaths, and trades come from the round-by-round kill feed, and are empty for matches without it.
- The match page's round replay and kills and deaths map use the positions
and loadouts recorded at each kill, plant and defuse. Positions
are still frames, not movement, and only maps listed in
src/lib/maps.tsget a minimap. - Results are cached in memory for 15 minutes per player.
- The leaderboard is the PC board for one region, 50 players per page,
filtered with
?region=eu&tier=radiant|immortal&page=1. Only Immortal and Radiant players are on it, and each page is cached for 15 minutes. - HenrikDev allows about 30 requests a minute, so loading many new players quickly can return a "try again" error.
See ADR 0003 for why.