This is a submission for (See the An interactive AI companion for devoted football fans to track sentiment, calculate fan passion index metrics, and simulate sports rivalries using the Google Gemini API. Built for the DEV Weekend Challenge: Passion Edition (Best Use of Google AI Category). The application is built using a modern full-stack developer architecture: We instruct Gemini to output structured JSON data directly by passing a precise scoring template: In the backend services, we configured To capture the real feeling of sports rivalries, we feed Gemini a commentator persona biased towards a specific team:
Local Run: The frontend dev server runs at http://localhost:5173 and connects to the FastAPI backend gateway running at http://localhost:8888.
docs/assets/ directory in our repository for screenshots of the dashboard UI and passion gauge in action).
Code
FanaticAI: World Cup Rivalry Obsession Engine — DEV Weekend Challenge: Passion Edition entry using Google Gemini API
FanaticAI — World Cup Rivalry Obsession Engine
🚀 How It Works
Rant Analyzer: Uses Gemini to evaluate sports rant inputs, compute a passion score (0-100), and generate supportive analyst summaries.
Rivalry Simulator: Simulates high-emotion commentary of matches with fan loyalty configuration.
🛠️ Stack
AI Platform: Google Gemini 1.5 Flash (google-generativeai SDK)
Backend: FastAPI (Python), Uvicorn
Frontend: React, TS, Vite, Tailwind CSS v4, Framer Motion
📂 Repository Layout
backend/: FastAPI routers, schemas, and Gemini integration handlers.
frontend/: Command Center dashboard with interactive sentiment gauges.
docs/: Holds the DEV Community submission templates (dev_submission.md).
💻 Local Setup & Run
1. Configure Environment (Backend)
…
How I Built It
Backend: FastAPI (Python) and Uvicorn for fast asynchronous endpoints. We integrated the official Google Generative AI SDK (google-generativeai) to connect to the gemini-1.5-flash model.
Frontend: React, Vite, TypeScript, Tailwind CSS v4, and Framer Motion for a premium, responsive, dark-mode neon dashboard.
🧠 Gemini Prompts & Integration
1. Structured JSON Passion Score Estimation
prompt = (
f"Analyze the following sports fan rant text: '{rant}'. "
f"Calculate a 'passion_score' representing how obsessed, devoted, and emotional the fan is on a scale from 0 to 100. "
f"Also write a brief 1-sentence supportive response acknowledging their obsession. "
f"Return ONLY a clean JSON object with keys: 'passion_score' (integer) and 'response_summary' (string)."
)
generation_config={"response_mime_type": "application/json"} to guarantee a clean, parseable JSON block returned to the React frontend.
2. PERSONA-Biased Commentary Generation
prompt = (
f"You are a fanatical, obsessed football commentator who is highly devoted to {bias_team}. "
f"Generate a brief, emotional, 3-sentence live commentary stream of a hypothetical match "
f"between {team_a} and {team_b}. Your tone must show absolute passion, bias, and excitement!"
)
Prize Categories
Best Use of Google AI: The entire system logic is powered by Google Gemini 1.5 Flash to perform structured sentiment scoring and persona-driven creative content generation.
FanaticAI — World Cup Rivalry Obsession Engine (Powered by Google Gemini)
- ▸ What I Built
- ▸ Demo
- ▸ Code
- ▸ samuelQUANSAH / fanatic-ai-world-cup-companion
- ↳ FanaticAI: World Cup Rivalry Obsession Engine — DEV Weekend Challenge: Passion Edition entry using Google Gemini API
- ▸ 🚀 How It Works
- ▸ 🛠️ Stack
- ▸ 📂 Repository Layout
- ▸ 💻 Local Setup & Run
- ↳ 1. Configure Environment (Backend)
- ▸ How I Built It
- ↳ 🧠 Gemini Prompts & Integration
- ▸ Prize Categories
SOCIAL SHARE CARD GENERATOR