{"slug": "fanaticai-world-cup-rivalry-obsession-engine-powered-by-google-gemini", "title": "FanaticAI — World Cup Rivalry Obsession Engine (Powered by Google Gemini)", "summary": "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.", "body_md": "*This is a submission for Weekend Challenge: Passion Edition*\n\nI 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.\n\nThe application offers two primary features:\n\n`http://localhost:5173`\n\nand connects to the FastAPI backend gateway running at `http://localhost:8888`\n\n.*(See the docs/assets/ directory in our repository for screenshots of the dashboard UI and passion gauge in action).*\n\nAn interactive AI companion for devoted football fans to track sentiment, calculate fan passion index metrics, and simulate sports rivalries using the **Google Gemini API**.\n\nBuilt for the **DEV Weekend Challenge: Passion Edition** (Best Use of Google AI Category).\n\n`backend/`\n\n`frontend/`\n\n`docs/`\n\n`dev_submission.md`\n\n).The application is built using a modern full-stack developer architecture:\n\n`google-generativeai`\n\n) to connect to the `gemini-1.5-flash`\n\nmodel.We instruct Gemini to output structured JSON data directly by passing a precise scoring template:\n\n```\nprompt = (\n    f\"Analyze the following sports fan rant text: '{rant}'. \"\n    f\"Calculate a 'passion_score' representing how obsessed, devoted, and emotional the fan is on a scale from 0 to 100. \"\n    f\"Also write a brief 1-sentence supportive response acknowledging their obsession. \"\n    f\"Return ONLY a clean JSON object with keys: 'passion_score' (integer) and 'response_summary' (string).\"\n)\n```\n\nIn the backend services, we configured `generation_config={\"response_mime_type\": \"application/json\"}`\n\nto guarantee a clean, parseable JSON block returned to the React frontend.\n\nTo capture the real feeling of sports rivalries, we feed Gemini a commentator persona biased towards a specific team:\n\n```\nprompt = (\n    f\"You are a fanatical, obsessed football commentator who is highly devoted to {bias_team}. \"\n    f\"Generate a brief, emotional, 3-sentence live commentary stream of a hypothetical match \"\n    f\"between {team_a} and {team_b}. Your tone must show absolute passion, bias, and excitement!\"\n)\n```\n\n", "url": "https://wpnews.pro/news/fanaticai-world-cup-rivalry-obsession-engine-powered-by-google-gemini", "canonical_source": "https://dev.to/samuelquansah/fanaticai-world-cup-rivalry-obsession-engine-powered-by-google-gemini-47oh", "published_at": "2026-07-10 18:56:35+00:00", "updated_at": "2026-07-10 19:43:29.284694+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-tools", "developer-tools", "generative-ai"], "entities": ["Google Gemini", "FanaticAI", "DEV Weekend Challenge", "FastAPI", "React"], "alternates": {"html": "https://wpnews.pro/news/fanaticai-world-cup-rivalry-obsession-engine-powered-by-google-gemini", "markdown": "https://wpnews.pro/news/fanaticai-world-cup-rivalry-obsession-engine-powered-by-google-gemini.md", "text": "https://wpnews.pro/news/fanaticai-world-cup-rivalry-obsession-engine-powered-by-google-gemini.txt", "jsonld": "https://wpnews.pro/news/fanaticai-world-cup-rivalry-obsession-engine-powered-by-google-gemini.jsonld"}}