About the Project

MLP Quiz: Swing for the Fences with MLB Trivia, Powered by Google Cloud

Inspiration ⚾💡

As die-hard baseball fans, we wanted to celebrate MLB’s rich history and data-driven gameplay through an engaging trivia experience. The idea sparked from the endless stories hidden in player stats, iconic moments, and the thrill of the game itself. Our goal? To create a fast-paced, interactive quiz where fans could test their knowledge, compete with others, and dive deeper into the numbers behind America’s pastime—all while showcasing Google Cloud’s capabilities.

Tech Stack 🛠️

  • Frontend: React (dynamic UI with real-time scoring and animations)
  • Backend: Django (handling trivia logic, user sessions, and API integrations)
  • AI: Google’s Gemini (generating creative trivia questions and parsing MLB stats)
  • Cloud: Google Cloud Platform (Cloud Run for hosting)

How We Built It 🧩

  1. Design: Focused on a clean, game-like interface with categories like "Legendary Moments" and "Stat Attack."
  2. Question Engine:
    • Used Gemini to auto-generate trivia questions from MLB datasets (e.g., “Which pitcher threw the most strikeouts in the 2023 postseason?”).
    • Integrated Django to validate answers and manage difficulty levels.
  3. Real-Time Data:
    • Pulled live player stats and game updates via BigQuery to keep questions current.
    • React animated leaderboards to reflect scores instantly.
  4. Authentication & Scaling:
    • Deployed on Cloud Run to handle traffic spikes during big game days.

Challenges Faced 🚧

  • Gemini’s Quirks: Fine-tuning prompts to generate accurate, MLB-specific trivia (e.g., avoiding fictional player stats).
  • User Engagement: Balancing difficulty for casual fans vs. stat nerds. Absolutely! Here are three key challenges we faced while building the backend for the MLB Fan Quiz Page: Scalability:: Ensuring the backend can handle a high volume of concurrent users, especially during peak times like major MLB events. Real-Time Updates:: Providing real-time quiz updates and leaderboard rankings to keep users engaged. User Authentication and Security:: Implementing secure authentication mechanisms to protect user data and prevent unauthorized access.

What We Learned 📚

  • AI’s Role in Content Creation: Gemini’s power (and limitations) in generating sports trivia at scale.
  • GCP’s Flexibility: How BigQuery and Cloud Run can turn raw stats into a snappy user experience.
  • The Power of Nostalgia: Fans loved revisiting historic moments (e.g., 2004 Red Sox comeback) as much as current stats.

Future Goals 🔮

  • Add voice-based questions using Google’s Speech-to-Text API.
  • Introduce team-based leagues (e.g., Yankees vs. Dodgers fan battles).
  • Integrate AR for “virtual ballpark” quiz environments.

MLP Quiz isn’t just trivia—it’s a love letter to baseball, built with React’s speed, Django’s reliability, and Google Cloud’s muscle.

Share this project:

Updates