Skip to content

gtrush03/HACKERA

Repository files navigation

HACKERA — World Cup Player Intelligence

AI tells you which World Cup players are about to blow up — and puts a % confidence on it.

Live Demo → | GitHub Repo


The Big Number

13 out of 16 predictions confirmed. We analyzed every player at the 2022 FIFA World Cup, scored them with an opposition-quality-weighted metric (OQI), and predicted which ones would see major value increases. Then we waited. The transfers happened. We were right 81% of the time.

Rank Player Breakout % Pre-WC Value Post-WC Transfer ROI Verdict
1 Azzedine Ounahi 91% €4M Marseille €5M 3.0x CONFIRMED
2 Enzo Fernandez 88% €32M Chelsea €121M 2.7x CONFIRMED
3 Josko Gvardiol 85% €60M Man City €90M 1.4x CONFIRMED
4 Julian Alvarez 84% €32M Atletico €75M 2.7x CONFIRMED
5 Goncalo Ramos 82% €28M PSG €65M 2.0x PARTIAL
6 Alexis Mac Allister 80% €28M Liverpool €42M 2.7x CONFIRMED
7 Cody Gakpo 79% €40M Liverpool €45M 1.4x CONFIRMED
8 Mohammed Kudus 78% €18M West Ham €45M 3.1x CONFIRMED
... ... ... ... ... ... ...
13 Cho Gue-sung 55% €1.5M Midtjylland €2.5M 2.7x CORRECT (low)
16 Wout Weghorst 38% €7M Various loans 0.6x CORRECT (low)

The system also correctly identified Kylian Mbappe as the tournament's best player (OQI: 96) while scoring his breakout probability at only 45% — because you can't "break out" from €175M. That's the OQI model working as designed.


What is this?

HACKERA is a multi-agent scouting system that analyzed 665 players across all 64 matches of the 2022 FIFA World Cup. Instead of raw stats, it uses Opposition Quality Index (OQI) — a metric that weights player performance against the strength of opposition faced.

A midfielder completing 8 progressive passes against Spain is worth more than 12 against a weaker side. OQI captures that.

The three-factor model

Breakout probability is calculated via a three-factor weighted sigmoid:

Factor What it measures Weight
Performance OQI-weighted per-90 metrics across 6 categories (Passing, Carrying, Defending, Pressing, Shooting, Positioning) 40%
Contract Years remaining, club leverage, league discount factor 30%
Trajectory Age curve position, improvement rate, positional scarcity 30%

A player like Ounahi scores 93/92/88 across these factors — elite performance against top teams, minimal contract protection (2yr at relegated Angers), and peak-trajectory age (22). That's a 91% breakout signal.

A player like Mbappe scores 99/10/30 — best performance in the tournament, but already locked into a mega-deal at PSG with no trajectory upside left. That's a 45% breakout signal. Both are correct.


Three views

Chat View

Talk to the scout. Ask questions in natural language — it responds with rich, interactive cards:

  • PlayerCard — Breakout %, dual radar chart (raw vs OQI-weighted), three sub-score bars, "Why X%?" explanation, "What Actually Happened" validation
  • PortfolioCard — Top 5 value plays ranked by conviction (●●● / ●●○ / ●○○)
  • ComparisonCard — Head-to-head with dual radar charts and stat-by-stat breakdown
  • TransferPlanCard — Club-specific recommendations within a budget constraint

Multi-step agent thinking is visualized in real-time as each specialist processes the query.

Matrix View

Full sortable data table with all 16 demo players:

  • Sort by breakout %, OQI, market value, or ROI
  • Filter by position (ST, LW, AM, CM, CDM, CB, GK)
  • Click to expand: WC stats, reasoning, and outcome for each player
  • Color-coded verdicts: CONFIRMED / PARTIAL / MISSED

System View

Live architecture diagram built with React Flow:

  • Orchestrator (Claude Sonnet) — Routes queries, selects tools
  • Match Analyzer — Per-match OQI computation
  • Contract Analyst — Fee estimation via contract multipliers
  • Value Scorer — Breakout probability via 3-factor sigmoid
  • Team Builder — Squad-fit scoring against club profiles
  • SQLite DB — 665 players with full metrics

Animated edges show data flow. Log panel displays agent activity in real-time.


Data sources

Source What License
StatsBomb Open Data Match events for all 64 WC 2022 matches (passes, shots, carries, pressures, etc.) CC BY 4.0
Transfermarkt Datasets Player profiles, market values, contract data, transfer history MIT
Club ELO Club strength ratings for opposition quality weighting Free / Non-commercial
FIFA 23 Ratings (Kaggle) Individual player quality scores (50-99 scale) CC0

All player data is from the World Cup 2022 (November-December 2022). Post-tournament transfer data covers January 2023 through early 2025.


Tech stack

React 19 + Vite + Tailwind v4         — Frontend framework
@xyflow/react + dagre                  — System architecture diagram
Recharts                               — Dual-overlay radar charts
Express + better-sqlite3               — API + data layer
Claude Opus + Sonnet                   — Multi-agent orchestration
ai + @ai-sdk/anthropic                 — Streaming + tool calls
StatsBomb + Transfermarkt              — Raw data sources

Quick start

git clone https://github.com/gtrush03/HACKERA.git
cd HACKERA
npm install
npm run dev

Open http://localhost:5173/app.html

Architecture

User Query ("Who's the most undervalued CB?")
         │
         ▼
┌─────────────────┐
│   Orchestrator   │ Claude Sonnet — routes query, selects tools
└────────┬────────┘
         │
    ┌────┼────┬─────────┐
    ▼    ▼    ▼         ▼
┌──────┐┌──────┐┌───────┐┌──────┐
│Match ││Cont- ││Value  ││Team  │
│Analy-││ract  ││Scorer ││Build-│
│zer   ││Analy-││       ││er    │
│      ││st    ││       ││      │
└──┬───┘└──┬───┘└───┬───┘└──┬───┘
   │       │        │       │
   └───────┼────────┼───────┘
           ▼
    ┌─────────────┐
    │  SQLite DB   │ 665 players, OQI scores, market values
    └─────────────┘
           │
           ▼
   Generative UI Response
   (PlayerCard, RadarChart, PortfolioCard, etc.)

Project structure

HACKERA/
├── src/
│   ├── App.jsx                    # Shell: Chat | Matrix | System toggle
│   ├── views/
│   │   ├── ChatView.jsx           # Conversational scout interface
│   │   ├── MatrixView.jsx         # Sortable player data table
│   │   └── SystemView.jsx         # Agent architecture diagram
│   ├── components/
│   │   ├── chat/
│   │   │   ├── PlayerCard.jsx     # Glassmorphic expandable player card
│   │   │   ├── RadarChart.jsx     # Dual-overlay radar (raw vs OQI)
│   │   │   ├── PortfolioCard.jsx  # Top 5 picks with conviction dots
│   │   │   ├── ComparisonCard.jsx # Head-to-head comparison
│   │   │   └── TransferPlanCard.jsx # Club-specific transfer plan
│   │   └── system/
│   │       ├── SystemDiagram.jsx  # React Flow with dagre layout
│   │       ├── AgentNode.jsx      # Custom node with status indicators
│   │       └── LogPanel.jsx       # Scrolling agent activity log
│   └── lib/
│       ├── constants.js           # Design tokens, agent definitions
│       └── mockData.js            # 16 real WC 2022 players with verified data
├── spec/                          # 10 detailed specification documents
├── prompts/                       # 16 BizSynth-format build prompts
├── scripts/                       # Data acquisition scripts (Python)
├── data/                          # Raw + processed data files
└── api/                           # Express API (backend, not yet wired)

License

MIT

About

AI World Cup Player Intelligence — Multi-agent scouting system with verified 81% prediction accuracy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors