MLB Sluggers Hackathon Submission 🏆⚾
💡 Inspiration
We were inspired by our own children, Harrison (6) and Liviana (10), who ask us questions about everything from baseball to the meaning of life. We thought it would be great to design a product that would be fun for both of them to learn more about baseball.
⚾️📖 What It Does
Sluggers is a mobile application designed to engage children aged 8–11 with the excitement of Major League Baseball. The app transforms raw MLB gameplay data into professionally edited, kid-friendly highlight stories. Users can select their favorite teams and watch personalized highlight reels narrated in English, Spanish, or Japanese.
✨ Key Features:
- Real-Time Recaps -- Game data is processed and available within minutes of transitioning to a Final status.
- Personalized Game Highlights -- Kids can follow their favorite team and watch AI-narrated, illustrated game recaps.
- Playful, Story-Driven Narration -- Each game highlight is crafted into a narrative that makes baseball easy to understand.
- Multi-Language Support -- AI-generated text and audio narration in English, Spanish, and Japanese for an inclusive experience.
- Engaging Visuals -- Google's Imagen AI generates 3D Animated style animal characters to represent MLB teams.
- Safe & COPPA-Compliant -- No tracking, ads, or user data collection, designed specifically for children.
🔧 How We Built It
Sluggers combines AI-driven storytelling, real-time game data processing, and a scalable backend infrastructure to deliver an immersive experience.
📱 Frontend (Mobile App)
- Framework: Kotlin Multiplatform Mobile (KMP) for cross-platform support.
- Android: Jetpack Compose for dynamic UI.
- Ready for iOS Dev: Kotlin Multiplatform supports cross platform development in both Android and iOS
- Key Features:
- Users can select their favorite MLB team and view kid-friendly summaries of each game
- Fetches highlight data dynamically from the backend - summaries are available within minutes of game end.
- Cloud Scheduler + Pub/Sub automates scheduling highlight generation based on game schedule
🚀 Backend (API & Processing)
Technologies Used
- Framework: Flask API handling
/teams,/highlights, and AI processing jobs. - Database: Google Firestore stores highlights, teams, and game statuses.
- Hosting & Deployment:
- Google Cloud Run: Runs the backend API in a scalable serverless environment.
- Google Cloud Functions (Pub/Sub): Automates game status polling and AI processing.
- Google Container Registry (GCR): Stores Docker images before deployment.
- Security & Authentication:
- Uses Google Cloud Service Account for secure Firestore access.
- Data Processing & Scheduling:
- Google Pub/Sub triggers AI workflows when a game is marked as "Final".
🤖 AI & Data Processing
- Gemini 2.0 – Generates game highlight narratives from MLB play-by-play data.
- Google Text-to-Speech (TTS) – Converts AI-generated scripts into expressive multilingual audio.
- Imagen 3 – Creates vivid imagery of real MLB plays featuring fun animal characters.
- MLB StatsAPI Integration – Fetches live game data for real-time highlights processing
🔄 Data Flow
- Game Data Processing
- When a game ends, the backend fetches play-by-play data and determines key moments.
- The highlight generator structures this into a data object of the most engaging plays.
- AI-Powered Content Generation
- Gemini 2.0 creates structured narratives for kids.
- Imagen 3 generates 3D animated style concept art for each scene.
- TTS converts text into natural-sounding, kid-friendly audio in three languages.
- Highlight Delivery
- The completed highlight JSON object is stored in Firestore.
- The mobile app fetches and presents the highlights in an interactive UI.
🚀 Future Enhancements
- Infrastructure + Cleanup
- Add translation strings for mobile app (Translations were implemented for API delivered assets such as captions and audio)
- Batch predictions for async processing
- Prompt template garden
- Streamline the Pub/Sub workflow and move all generative tasks to Cloud Functions
- Auth issue between flask API and Cloud Function
- Feature Work
- Video Stories using Veo 2 – Using a combination of Veo and Imagen (pending availability)
- Privacy Enhancements - Expand COPPA compliance related features to prepare for features to further personalize the app experience
- Push Notifications – Let users subscribe to get notified when new highlights are available with minimal data collection
- Interactive Features – Add Mini-games & trivia to keep kids engaged between games
- Custom Avatars & Team Assets – Let kids choose from pre-generated team-specific assets.
🔗 Links
- Video Demo
Built With
- android
- gemini
- google-cloud
- imagen
- kmp
- kotlin
- pubsub
- python
- vertex

