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:
- Fan asks a question in natural language
- Gemini classifies intent — stats, prediction, fantasy, tactical, historical
query_football_dataruns read-only MongoDB aggregation pipelines- Gemini analyzes retrieved records and returns structured JSON
- 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
Log in or sign up for Devpost to join the conversation.