Pro Hockey Sim
0

Documentation

How it works

The cap rules, trade engine, and sim model — explained end to end.

  1. 1. Rosters load from the public league API

    When you first open the app, every team's current 23-man active roster is pulled from api-web.nhle.com — 14 forwards, 7 defensemen, 2 goalies per team. Player names, jersey numbers, heights, weights, and shooting hand all come from this source.

  2. 2. Cap hits are generated by a model, not scraped

    Real contract data isn't redistributable, so each player is assigned a synthetic cap hit using a depth-chart and age-curve model. The model targets a realistic distribution: average forwards around $3.2M, defensemen around $3.6M, goalies around $3.0M, with top-line stars reaching up to $13.5M. An average 23-man roster lands in the $75-85M range, the same band you'd see in real life.

  3. 3. The cap and roster validators block bad trades

    Every move runs through the same checks a real GM would face. A trade is blocked if it would push the destination team above the $104M cap ceiling, push the source team below the 20-player minimum, exceed the 23-player maximum, or leave any team with fewer than 2 goalies. Errors come back with a specific reason — for example, 'Move would exceed the salary cap by $2.4M.'

  4. 4. Season sim uses Poisson-based game scoring

    Each team has an overall rating derived from its top-12 forwards, top-6 defensemen, and starting goalie. When you sim a day, every scheduled game uses a Poisson distribution to generate a final score, with a small home-ice advantage and a tie-breaker for overtime. The schedule itself is the real published 2025-26 league schedule, with a round-robin fallback if the API is unreachable.

  5. 5. AI trade offers fit under the cap

    Once you pick a team to manage, the sim periodically generates trade offers from other teams. Every generated offer is pre-validated against both teams' caps and rosters before it ever appears, so any offer you see is actually executable. Accept, counter, or reject — and the league cap state updates everywhere.

  6. 6. Preferences save locally, league state lives in the cloud

    Your favorite teams, recently viewed team, and other UI preferences are stored in your browser's localStorage — no account required. The shared league state (rosters, trades, season progress) lives in a hosted database so it persists across sessions and devices.

Keep reading

  • Glossary — definitions for cap hit, LTIR, RFA, retained salary, and more
  • About — what the project is and the FAQ