World Cup Biz AI ⚽
Hackathon: Google Cloud Rapid Agent Hackathon — MongoDB Partner Track
Live Demo: worldcupbizai.vercel.app
Repo: github.com/kyisaiah47/match-day-commander
Inspiration
FIFA World Cup 2026 is coming to 16 US cities. For local businesses — restaurants, bars, hotels, retail — it's the biggest revenue opportunity in a generation, but most have no system to act on it. They don't know which matches are coming, how large the crowds will be, or how to reach those fans. World Cup Biz AI fixes that.
What It Does
Enter your business name, type, city, and capacity once. The agent personalizes everything to you:
- Crowd Intelligence — real match schedules, expected attendance, and fan demographics per host city, all pulled live from MongoDB Atlas
- Campaign Generation — targeted social media posts, email copy, and SMS offers written around the specific teams playing and the expected crowd size
- Operations Planning — staffing levels and inventory boosts calculated from your capacity and the crowd forecast
- Match Day Notes — a notes sidebar with general and date-specific notes, persisted to MongoDB
- Saved Items — campaigns and recommendations saved to your account and retrievable on demand
How I Built It
Architecture
Next.js Frontend (Vercel)
│ SSE stream
▼
FastAPI Backend (Google Cloud Run)
│
▼
Gemini 2.5 Flash Agent (function calling)
│
├── get_matches_at_venue()
├── get_crowd_forecast()
├── get_business_profile()
├── save_campaign()
├── save_recommendation()
└── get_notes() / save_note()
│
▼
MongoDB Atlas (Motor async driver)
├── venues & matches
├── businesses
├── campaigns
├── analytics / recommendations
└── notes
The agent streams tool-call events to the frontend in real time — users see each MongoDB query fire as it happens. Gemini 2.5 Flash runs in a thread pool executor so the FastAPI event loop stays free during inference.
Tech Stack
| Layer | Technology |
|---|---|
| AI Model | Gemini 2.5 Flash (Google AI) |
| Agent Framework | google-genai SDK with function calling |
| Backend | Python 3.12, FastAPI |
| Database | MongoDB Atlas, Motor (async driver) |
| Frontend | Next.js 16, Tailwind CSS, shadcn/ui, Framer Motion |
| Streaming | Server-Sent Events (SSE) |
| Backend Hosting | Google Cloud Run |
| Frontend Hosting | Vercel |
| Secrets | Google Cloud Secret Manager |
MongoDB Integration
MongoDB Atlas is the backbone of the entire product:
- venues and matches collections store all 48 World Cup group-stage matches across 16 host cities, seeded via a Python script
- businesses collection stores user profiles so the agent personalizes every response
- campaigns and analytics collections persist everything the agent generates — users can ask "show my saved items" at any time
- notes collection backs the live notes sidebar with per-date and general entries
- The Motor async driver keeps all DB calls non-blocking inside FastAPI's async request handlers
The agent never fetches raw documents — it calls named tool functions that wrap Motor queries, keeping the LLM context clean and the data layer testable.
Challenges
- Streaming + async inference: Gemini's Python SDK is synchronous. Running it inside an async FastAPI SSE handler required a thread pool executor and careful event-loop management to avoid blocking.
- Tool result fidelity: Gemini 2.5 Flash sometimes wants to skip tool calls and answer from training data. Explicit system-prompt rules ("ALWAYS get the match schedule first") fixed this.
- Real-time UX: Surfacing individual tool-call events (not just the final text) as SSE tokens required a custom event protocol between the backend and the Next.js frontend.
What's Next
- Push notifications for match-day reminders
- Multi-business dashboard for restaurant groups or franchise owners
- Real ticketing and weather API integrations for more precise crowd forecasts
- PDF export for staffing and inventory plans
Example Prompts to Try
"Germany vs Brazil is coming to East Rutherford on June 14th. Create and save a social media campaign for my restaurant."
"Which World Cup matches are coming to Dallas, TX and how big are the crowds expected to be?"
"There's a match this weekend with 80,000 fans. Give me a full staffing and inventory plan."
"What's the fan breakdown for the next match in my city? Which nationalities, peak hours, and what should I prepare for?"
Team
Built solo by @kyisaiah47 for the Google Cloud Rapid Agent Hackathon, MongoDB Partner Track.
Built With
- fastapi
- framer-motion
- google-cloud-run
- google-gemini
- mongodb-atlas
- motor
- next.js
- python
- server-sent-events
- shadcn-ui
- tailwindcss
- typescript
- vercel

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