SquadBridge is an interactive, query-first explorer that reveals the hidden “clubmate bonds” between 2026 World Cup players. It turns the official pinned squad dataset into discoverable stories of players from rival nations who shared the same dressing room.
Built for the TAIKAI AI Agent Hackathon – The Squad Graph.
lib/graph.ts (group by club_id + season, combinations for edges). 8 Vitest tests including the exact PSG 2023-24 example from the brief (Vitinha, Nuno Mendes, Gonçalo Ramos).Next.js 16 (App Router) + TypeScript + Tailwind – client-side only after initial bundle (perfect for static dataset).
Pure graph engine (lib/graph.ts): buildGraph, getTeammates(club_id, season), getAllEdges, getDegreesOfSeparation, findCrossNationalBridges, getStrongestClubSeasons – exact port of the reference Python snippet from the brief.
react-force-graph (canvas) for the interactive viz.
Vitest for the 8 critical correctness tests.
Data: committed copy of the pinned v1.0 CDN files (self-contained deployment).
All computation happens in the browser. No backend, no external calls at runtime.
Live demo: https://squadbridge-arena-grokbuild-final.vercel.app
Code: https://github.com/layerx-labs/arena-the-squad-graph-arena-grokbuild
Local: npm install && npm run dev (full interactive experience with the committed dataset).
The biggest challenge was Next.js 16 + React 19 prerendering of error boundaries during static export with a heavy client graph. We fell back to a clean server build + minimal landing for the public demo while keeping the full, tested engine + all query/visualization components in the repo (the real value).
Strictly following the “join on club_id + season only” rule and shipping executable tests was non-negotiable for the Graph Correctness rubric item.
Deep-linkable queries (?club=Q483020&season=2023-24), era filters, country-of-club filter, shareable path images, and a small “surprising bridges” feed.