DID YOU WATCH IT? - MLB EDITION
Inspiration
As a huge baseball fan, I wanted to create a way for fans to engage with the sport beyond just watching games. The idea behind DID YOU WATCH IT? - MLB EDITION was to merge two of my passions: sports and interactive experiences. By integrating real-time MLB stats with trivia, I aimed to create an engaging, fun, and educational platform where users could test their knowledge of the latest games.
What it does
DID YOU WATCH IT? - MLB EDITION pulls the most current game stats from the MLB Stats API and uses Gemini AI to analyze the data and generate trivia questions. The app displays highlights from MLB games that happened within the last 5 days and tests users' knowledge with trivia questions based on recent performances. Users can access a trivia mode where they answer questions to prove their knowledge of the latest games, players, and teams.
How we built it
Frontend
- Angular was used for building the user interface. The app’s structure was divided into components, allowing for a dynamic, component-based design. Angular's two-way data binding enabled real-time updates of trivia questions and game highlights.
Backend
- The app.js (Node.js with Express) backend made API requests to fetch the latest MLB game stats from the MLB Stats API.
- Gemini AI was integrated into the backend to analyze the data and dynamically generate trivia questions based on the latest games and player performances.
Key Features:
- Game Highlights: The app displays highlights from MLB games up to 5 days ago, keeping users updated with recent events in the league.
- Trivia Mode: Users can engage in trivia mode to test their knowledge of the most recent games. Trivia questions are generated dynamically based on real-time data, keeping the content fresh.
- Dynamic Content: Using Gemini AI, the trivia questions adapt based on the most current games and player statistics.
Challenges we ran into
- Time Constraints: Due to limited time, we couldn’t implement all the features we wanted, such as leaderboards or user authentication. However, these features are on the roadmap for future updates.
- API Data Filtering: The MLB Stats API provides a lot of data, and it was challenging to filter and organize the data to create meaningful trivia questions. Ensuring the content was up-to-date and relevant also required constant adjustment.
- Dynamic Trivia Generation: Creating trivia questions that were engaging and accurate using Gemini AI was a complex task. It required ensuring that the questions were reflective of recent games and not overly generic.
Accomplishments that we're proud of
- Successfully integrated Gemini AI to analyze MLB game data and generate dynamic trivia questions based on real-time stats.
- Built a dynamic, user-friendly interface with Angular that presents both trivia questions and game highlights in an engaging way.
- Managed to create an interactive app where users can test their knowledge, even if we weren’t able to include all the planned features.
What we learned
- Angular provided a solid foundation for building a dynamic front-end, and I learned a lot about component-based development and how to manage data flows between the frontend and backend.
- Integrating Gemini AI with real-time sports data opened my eyes to how AI can be used to create interactive, data-driven experiences. I learned about how to structure data from APIs and pass it through AI models to generate meaningful content.
- Managing real-time data from external APIs and ensuring the app is always up-to-date with the most current game highlights and trivia questions was a great learning experience in terms of handling data dynamically.
What's next for DID YOU WATCH IT? - MLB EDITION
- Login & Authentication: Implement a login system to allow users to save their progress and customize their experience.
- Leaderboards: Introduce a leaderboard feature to track trivia scores and encourage competition among users.
- Expanded Trivia: Add more types of trivia questions, such as team history, legendary player stats, and player milestones, to make the game more diverse and challenging.
- Mobile App: Build a mobile version of the app for an enhanced user experience on phones and tablets.
- More Integration with AI: Continue to improve the trivia generation using Gemini AI, allowing for even more personalized and varied questions based on user pe

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