# 40k-rankings.gateway-gamers.net A Warhammer 40,000 leaderboard for Gateway Gamers team members, ranked by ITC points in the Warhammer Global Rankings 2026 league on Best Coast Pairings (BCP). ## What it serves A single page (`index.html`) with: - **Team Leader card** showing the top-ranked member's name, ITC points, win rate and global ITC rank. - **Stat strip** with players placed, top ITC points, combined team win % and the best league rank held by any member. - **Sortable leaderboard**, one row per team member who has placed in the league. Each row shows: - ITC points and league rank - Lord Marshal Conference (LMC) points and rank - W–L–T record and win % for the league, with career totals underneath - Stat Check ELO rating The page reads from BCP in the viewer's browser on every load. It caches the last result in `localStorage` (`gg_board_v3`) and shows that straight away while the live data arrives. The **Refresh** button fetches again. ## Data sources | Data | Source | | --- | --- | | Team roster | BCP `teams/{teamId}` | | ITC points, rank, record | BCP `placings` for `leagueId`, filtered to `regionId` | | LMC points and rank | BCP `placings` for `lmcLeagueId` (2026 Lord Marshal Conference) | | Career W–L–T | BCP `placings?userId=…` for each member | | ELO | `public/elo-data.json`, served from this site | All BCP calls go to `https://newprod-api.bestcoastpairings.com/v1` without authentication. `elo-data.json` is built from Stat Check's public ELO spreadsheet (https://www.stat-check.com/elo) by the scraper in [`statcheck-elo-scraper/`](statcheck-elo-scraper/README.md). The root `refresh-elo.yml` workflow runs it weekly and commits the result, and that commit triggers a redeploy. ELO is matched by player name. When several Stat Check players share a name, the page picks the one whose "Last Event" appears in that member's BCP event history. If it can't narrow it down to one, it shows "—" rather than guess. ## Configuration Everything you'd normally change is in the `CONFIG` block at the top of `src/main.js`: - `teamId`: the BCP team whose members are shown - `leagueId` / `regionId`: which ITC league and region to rank against - `lmcLeagueId`: the Lord Marshal Conference league used for the LMC columns - `blacklistNames`: players to hide from the board (full name or nickname, case-insensitive) - `memberIds`: fallback roster, used if the team endpoint ever stops returning members without auth - `useSample`: set to `true` to render placeholder rows with no network calls ## Files - `index.html`, `src/main.js`, `src/style.css`: the page - `nav.html`: this site's header nav entries (see the root README) - `public/elo-data.json`: generated ELO data. Don't edit it by hand; the weekly sync overwrites it. - `statcheck-elo-scraper/`: builds `elo-data.json` - `40k-rankings.gateway-gamers.net.conf`: reference nginx config for the live server block - `gateway_gamers_leaderboard.html`: an older standalone version of the page from before the Vite rewrite. It isn't part of the build. - `.github/workflows/refresh-elo.yml`: the old GitHub Actions ELO job from before this site moved into the monorepo. It doesn't run (Gitea only reads workflows from the repo root); the live job is `.gitea/workflows/refresh-elo.yml`. ## Deploy `.gitea/workflows/deploy-40k-rankings.yml` builds the site and rsyncs `dist/` to `/var/www/domains/gateway-gamers.net/40k-rankings/` on every push to `main` that touches `sites/40k-rankings/` or `shared/`. See the root README for local dev commands and the shared header, footer and images.