FanaticAI — World Cup Rivalry Obsession Engine (Powered by Google Gemini) A developer built FanaticAI, a web application for football fans that uses the Google Gemini API to calculate a 'passion score' from fan rants and simulate biased match commentary. The app, built for the DEV Weekend Challenge, features a React frontend and a FastAPI backend that instructs the Gemini model to output structured JSON data. This is a submission for Weekend Challenge: Passion Edition I built FanaticAI: World Cup Rivalry Obsession Engine , a companion web application for devoted football soccer fans who want to measure their passion and simulate legendary matches. The application offers two primary features: http://localhost:5173 and connects to the FastAPI backend gateway running at http://localhost:8888 . See the docs/assets/ directory in our repository for screenshots of the dashboard UI and passion gauge in action . 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 . backend/ frontend/ docs/ dev submission.md .The application is built using a modern full-stack developer architecture: google-generativeai to connect to the gemini-1.5-flash model.We instruct Gemini to output structured JSON data directly by passing a precise scoring template: 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 ." In the backend services, we configured generation config={"response mime type": "application/json"} to guarantee a clean, parseable JSON block returned to the React frontend. To capture the real feeling of sports rivalries, we feed Gemini a commentator persona biased towards a specific team: 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 "