MLB Fan Highlight Hub
The Fan Highlight Hub is a web application that allows users to explore the latest and trending news about MLB players and teams. It leverages the MLB API to gather real-time player and team information, and integrates with the MLB fan content interaction bucket. This data is aggregated into a BigQuery table, which powers various content features within the app.
Features & Functionality:
Home Page: Users can browse trending news for players and teams. News content is generated by querying the most popular players and teams from the fan interaction data. For example, the "Player News" section retrieves the 10 most-followed players and displays the most popular article for each, while "Team News" follows a similar approach. Trending news is based on overall fan interactions, and an AI model (Gemini) generates brief descriptions for each content piece.
Latest Games: The home page also features a section for recent games, displaying results from the 10 most recent matchups via the MLB API. Each game entry includes a summary generated by Gemini and a link to a video of the final play.
Player/Team Pages: Users can search for a specific player or team to access more detailed news and information. Clicking on a player from a team roster takes the user to that player's dedicated page, showing more granular details.
Favorites: Registered users can favorite players or teams, allowing for a personalized experience. Favorited content is displayed in a Daily Digest section that provides news and updates based on their selections.
Account Management: Users can create accounts, log in, and manage their favorite teams and players. New users are prompted to select favorites during the account creation process, though this step can be skipped.
Technologies Used:
Google Cloud Platform:
- BigQuery: Stores and processes fan interaction data and search results.
- Google Cloud Functions: Automatically runs searches and populates the BigQuery table based on popular players and teams.
Google Cloud Scheduler: Regularly triggers the data refresh process to ensure up-to-date content.
MLB API: Fetches player, team, and game data for use across the app.
YouTube Data API: Provides video content for game highlights and player/team-related content.
Gemini AI Model: Summarizes articles, game results, and video content into concise descriptions for a better user experience.
Data Sources & Processing:
Fan Interaction Data: A key component of the project is the use of the MLB fan content interaction bucket, which is consolidated into a BigQuery table. This data is used to generate popular content on the home page and across various sections of the app.
YouTube API Integration: For personalized daily digests, the app uses the YouTube API to fetch relevant video content based on the user's favorite teams or players. The results are passed to the Gemini model for summary generation and stored in BigQuery for future use.
Findings & Learnings:
Throughout the project, I learned the importance of optimizing data retrieval for a seamless user experience. By pre-processing and storing content related to popular players and teams, I was able to reduce wait times for users when generating their personalized content. Integrating multiple APIs, such as the MLB and YouTube APIs, presented challenges around data synchronization and processing, which was resolved by leveraging Google Cloud’s suite of services. Additionally, working with Gemini for AI-generated summaries provided a valuable learning experience in AI integration, improving content accessibility and enhancing user engagement.
Built With
- google-bigquery
- google-buckets
- google-cloud-functions
- google-cloud-scheduler
- google-gemini
- javascript
- mlb-api
- mongodb
- node.js
- react.js
Log in or sign up for Devpost to join the conversation.