IodidDOCUMENTATION

README.md

/doc/readme

PUBLIC DOCUMENTATION

README

Iodid

Open platform for League of Legends data: competitive profile, analytics, leaderboards and live metadata. Canonical source: Beebot com.safjnest.lol.

Iodid is Beebot's public layer dedicated to League of Legends. It exposes already normalized and indexed data (Summoner, Rank, Match, Participant, ProfileStatistics, Mastery) via stable HTTP APIs and provides tools for dashboards, Discord bots and balance experiments.

It is not a raw wrapper around Riot APIs: data goes through validation, canonicalization and read-through caching before being served. Clients receive ready-to-use models.

What it does

  • Complete profile — SummonerView aggregates identity, ranks, masteries, statistics and recent matches with consistent ResponseMetadata.
  • Ranked history — RankHistory with queries by season/patch/view and timeStart ordering.
  • Leaderboards — LeaderboardPage with pagination and MMR distribution.
  • Champion analytics — tier lists, statistics per patch/queue/rank/region/lane, optimal builds.
  • Records and matchups — global and per-profile records, matchup matrix per champion/opponent/duo.
  • Live game — direct read of the ongoing match state.

Stack

ComponentVersionReferenceRole
Java25pom.xml:15 maven.compiler.source / java.versiontoolchain, compilation, runtime
Spring Framework7.0.8pom.xml:18 spring.versionspring-context, spring-webmvc — controllers, parameter validation, error handling
Tomcat Embed11.0.10pom.xml:19 tomcat.versionembedded HTTP runtime
MongoDB Driver Sync5.8.0pom.xml:276sole runtime persistence — all LoL documents
Redis Jedis5.1.0pom.xml:341cache only (RedisClient, RedisKey) — no authoritative data
R4J (Riot API for Java)2.8.1pom.xml:261official Riot client, canonical enums re-exported via utils
Jackson2.21.4pom.xml:134JSON serialization (jackson-databind, jackson-datatype-jsr310)
Caffeine3.1.8pom.xml:244local in-memory cache
FastUtil8.5.16pom.xml:108high-performance primitive structures
JDA6.3.1pom.xml:209Discord bot — not used by the LoL flow, present only for Beebot integration

Full library details: see libraries.mdx.

Versions are defined as Maven properties in pom.xml:13 and referenced in <dependency> blocks. R4J enums (LeagueShard, GameQueueType, TierType, LaneType) are not exposed directly: they are wrapped by TierDivisionUtils, GameQueueTypeUtils, LeagueShardUtils, LaneTypeUtils in src/main/java/com/safjnest/lol/utils/.

API baseUrl

text
https://api.safjnest.com/api/lol

All routes are prefixed with /{shard} validated via LolApiParameters.requiredShard in src/main/java/com/safjnest/spring/controller/LolApiParameters.java:163. See getting-started.mdx and index.mdx for quick start.

Controller base path: src/main/java/com/safjnest/spring/controller/LolController.java:36 (@RequestMapping("/api/lol/{shard}")), ChampionController, LeaderboardController, RecordsController.

  • Production: https://api.safjnest.com/api/lol
  • No authentication required (public API, server-side parameter validation)
  • Uniform error envelope: src/main/java/com/safjnest/spring/dto/LolApiError.java:5

Documentation structure

FileContent
index.mdxhero, tagline, curl quick start, feature list
getting-started.mdxhow to call the APIs, LolApiParameters, LolApiError, ApiResult, pagination
concepts.mdxdomain glossary: puuid, riotId, shard, filter, MMR, staleness
architecture.mdxMongo/Redis, 3 schedulers, QueueHandler/Router/Registry/JobQueue, match ingestion
libraries.mdxlibrary table with versions, links and notes pom.xml:15

Project principles

  • Canonical models in com.safjnest.lol.model — Spring controllers return models directly, without duplicate success DTOs (docs/architecture/README.md:92).
  • Summoner is the canonical identity (src/main/java/com/safjnest/lol/model/summoner/Summoner.java:18).
  • Rank is the canonical ranked model, Mastery the champion mastery model, riotId stays String (AGENTS.md).
  • Mongo is the sole runtime store (docs/architecture/README.md:98), Redis is only ephemeral and rebuildable cache.

To contribute: read AGENTS.md, docs/architecture/README.md, the relevant ADR and docs/HANDBOOK.md §5-§7 before any LoL change.