Inspiration

World Cup 2026 is the first 48-team tournament — 104 matches, 12 groups, 16 host venues across three countries. Fans will drown in noise across broadcasters, social clips, fantasy apps, and group chat takes. I wanted to build a calmer layer: one analyst that cites its data, shows its confidence, and admits when something isn't official yet.

What it does

MatchMind is an AI football intelligence agent. You ask it like you'd ask a pundit on air:

  • "Who has the best defensive record in Group B?"
  • "How have Brazil and France matched up historically?"
  • "Give me a fantasy XI from Group A"
  • "What's Argentina's tactical weakness this tournament?"

It classifies your intent, queries a real MongoDB Atlas tournament database via MCP-shaped tool contracts, reasons over the records with Gemini, and returns a structured analyst-style response — headline, analysis, key stats, confidence signal, and a follow-up suggestion.

How I built it

Agent architecture:

  1. Fan asks a question in natural language
  2. Gemini classifies intent — stats, prediction, fantasy, tactical, historical
  3. query_football_data runs read-only MongoDB aggregation pipelines
  4. Gemini analyzes retrieved records and returns structured JSON
  5. UI renders an analyst card with a data badge — always shows what's real

Data integrity system: Every dataset is documented and badged in the UI:

  • ◇ Preview mockup — illustrative demo data before kickoff
  • ● Live MongoDB — synced real results after tournament starts
  • ○ Demo fallback — in-memory when Atlas isn't wired

Tournament phase system: lib/tournament-phase.ts switches the app between preview and live modes by date — the same product, honest before kickoff and operational after.

Stack:

  • Next.js 16 (App Router)
  • Google ADK (@google/adk) for agent orchestration
  • Gemini (gemini-2.5-flash-lite) for classification and analysis
  • MongoDB Atlas as the football intelligence database
  • MongoDB MCP server for structured tool-based data access
  • Vercel for deployment

Challenges

Data integrity was the hardest part — not the code.

Early on I filled gaps with estimated squads and mock player stats. It looked rich. Then I asked: what is actually official right now? The answer forced me to tear it back.

I aligned everything to the official Dec 5, 2025 FIFA draw, seeded all 104 real fixtures, and removed mock squads entirely until FIFA publishes official ones. The seed log literally says:

Skipped players collection — official FIFA tournament squads not published yet.

That decision hurt the demo's wow factor for a day. It earned my trust in the product forever.

What I learned

The database is the intelligence. The agent is the reasoning layer on top. If the data is wrong, the smartest model in the world just becomes a confident liar.

I also learned to design deliberately — every section of MatchMind has a different background with a different emotional job. Hero: feel the atmosphere. Middle: focus on the data. CTA: you're about to step into something. Footer: final whistle.

The palette is personal — Leo born Saturday night. Leo ruled by the Sun, Saturday by Saturn. Antique gold (#C9A84C) against near-black (#08090A). Not flashy. Earned.

Built With

  • fraunces
  • gemini
  • google-adk
  • google-cloud-agent-builder
  • grok-build-cli
  • mongodb-atlas
  • mongodb-mcp
  • nano-banana
  • next.js
  • sora
  • tailwind-css
  • typescript
  • vercel
Share this project:

Updates

posted an update

MatchMind — Changelog

MatchMind is the only WC 2026 agent we know of that syncs FIFA scores and FotMob player intelligence into MongoDB in one matchday command then lets Gemini answer like a live analyst.


Live Tournament Data

  • FIFA score sync → MongoDB — match results + auto standings on every update
  • FotMob player stats sync (new) — goals, assists, minutes, xG, and rating updated after every matchday
  • SYNC_MODE=both (new) — one workflow handles both score and player stat pipelines
  • Live badge (● Live MongoDB) now reflects real synced data, not a preview mockup

FotMob Pipeline — Built for WC 2026

Command What it does
npm run fotmob-feed ~365 players with tournament minutes via bulk league JSON
npm run fotmob-squads 48/48 teams mapped → 1,149 / 1,248 players linked to FotMob IDs
npm run fotmob-full Club season form, recent club matches + WC match-by-match logs via playerData API
npm run validate-feed Roster name check before any sync handles accents, aliases, Korean names

FotMob IDs are stored on each player document for faster incremental updates.


What Syncs Into MongoDB Now

Tournament stats

  • Goals, assists, minutes played, xG, match rating

Club context

  • Season goals/assists, avg rating, last-five form

Match logs

  • Recent club matches + World Cup match-by-match rows

Example: Deniz Undav → 1G, 2A, 26 min, xG 0.5 (Germany 7–1 Curaçao, MD1)


Docs & Operator UX

  • docs/PLAYER-STATS-SOURCES.md (new) — full matchday playbook: FIFA → FotMob → sync
  • Updated README, DATA-SOURCES.md, architecture doc, and in-app /docs hub
  • MD1 example feed template for manual ESPN/FOX fallback
  • FotMob scripts are public on GitHub — judges can reproduce the entire pipeline

Still Honest About Data

Badge Meaning
◇ Preview Mockup shown before kickoff — clearly labeled
● Live MongoDB FIFA scores + FotMob stats after kickoff

Guardian squads (1,248 players), FOX USA roster, and editorial intel are unchanged.


Highlights

  • Turned a read-only football DB into a live tournament intelligence engine mid-hackathon
  • 1,149 players auto-mapped to FotMob across 48 national squads, no manual ID hunting
  • Agent answers "Who leads the Golden Boot?" with numbers synced minutes after final whistles
  • Solved FIFA's gap: they give scores, not player stats, I built the bridge with FotMob
  • Club form + WC match logs from the same pipeline, not just leaderboard G/A
  • Full reproducibility: public scripts, validated feeds, documented sources for judges
  • From ◇ Preview mockup to ● Live MongoDB without re-architecting the same agent, real data

Log in or sign up for Devpost to join the conversation.

posted an update

What's New Since Our Last Submission

We aligned MatchMind with the real World Cup 2026 data landscape — moving from prototype scaffolding to editorial depth and live result sync.


1,248 Players Across 48 Teams

Squad data sourced from two authoritative references:

  • Guardian Squad Guide — bios, positions, and player photos
  • FOX Sports Official USA 2026 — confirmed roster lists per nation

Every player card in the database now reflects a real, verified squad member.


Rich Scout Cards

Each player card surfaces multi-layered editorial intelligence:

  • Guardian — biographical context and position breakdowns
  • FOX Top 100 — global rankings with full analyst paragraphs
  • Reuters Spotlights — news-driven player narratives and form context

48 Team Guides

Every qualified nation has a dedicated team guide covering:

  • Head coach and tactical identity
  • Key strengths and known weaknesses
  • Standout player picks with scout context

72 Group Stage H2H Records

Head-to-head history for every group matchup:

  • Curated historical records where meetings exist
  • Honest placeholders documented clearly where teams have never faced each other — no fabricated data

FIFA Live Sync

Post-kickoff, the system pulls live:

  • Finished scores directly from api.fifa.com
  • Group standings recalculated in real-time via MongoDB

The agent always knows the current table state when fans ask.


Transparent Data Layer

We clearly distinguish three data states for judges and fans alike:

State Description
Preview / Mockup Pre-tournament editorial estimates
Live FIFA API results post-kickoff
Editorial Curated analysis from Guardian, FOX, Reuters

No hidden sources. No silent assumptions.


Agent Architecture (Unchanged Core)

The MatchMind agent still queries MongoDB via MCP — but the database it reasons over now reflects genuine editorial depth and verified live results.

Built with Google ADK · MongoDB MCP · Multi-subdomain architecture · FIFA live sync

Log in or sign up for Devpost to join the conversation.