Ultimate Hattrick
A companion web app for Hattrick that rates lineups, predicts matches and sends orders back via the official CHPP API.
- Year
- 2026
- Status
- Live
- Stack
-
- PHP
- Laravel
- Livewire
- Tailwind CSS
- Claude API
- Links
What it is
Ultimate Hattrick is a companion web app for Hattrick, the online football management game. It reads a manager’s team over Hattrick’s official CHPP API and presents it as a calm, editorial interface covering the squad, lineups, match analysis, transfers and youth.
It rates a lineup while you build it, scouts the opponent, predicts the result, and sends your match orders back to the game. It’s in beta, and the core tools are free.
Why I built it
I’m relatively new to Hattrick, and I kept hitting the same wall: I could set a lineup easily enough, but I had no idea whether it was a good one. Was that winger worth playing? Would a different shape hold up against this opponent? The numbers existed – they just weren’t anywhere I could compare them.
So I started building the missing half. Ultimate Hattrick reads your team over the official CHPP API, puts a real match engine behind the pitch, and writes your orders back to the game. It’s a personal project growing into something I think the community might find useful.
Technical notes
- A dedicated layer for the CHPP API: an OAuth 1.0a signer, a rate limiter (600 requests every five minutes by default), a response cache, typed data objects and one class per endpoint. Data comes in through queued sync jobs, and match orders go back out through a lineup serialiser and submit jobs.
- The match engine is pure functions with no I/O: a ratings calculator, a match prediction engine, and a tactic scorer that runs every tactic through the same prediction pipeline.
- The AI features are backed by Claude, and each has a deterministic fallback. Auto-pick runs a deterministic selector first, then Claude explains where it departs from it. Each task is routed to Opus, Sonnet or Haiku, prompts are cached, each user has a rolling 30-day AI budget, and AI output is treated as untrusted input.
- It installs as a web app, with web push notifications.
- The tests replay recorded Hattrick API responses.
Screenshots