BaoBuzz
Android Live Score Companion App
Architecture at a Glance
Three APIs, One Pipeline
api-sports.io
req/day free tier — live scores & standings
football-data.org
req/min free tier — backup standings
OpenFootball
No auth — quiz & historical data
Overview
The Football Companion
BaoBuzz is a modern Android live score application that serves as a football companion, delivering real-time match data, interactive content, and seasonal analytics through a polished Jetpack Compose interface.
The app provides football enthusiasts with a centralized hub for league standings, daily trivia, historical context, and player statistics — all powered by multiple football data APIs with intelligent caching and rate-limiting strategies.
Interface
App Screens
Home
Leagues
Quiz
Quiz Results
Season Comparison
Settings Technical
Architecture & Stack
MVVM + Clean Architecture
Repository Pattern with cache-first data strategy across ~130 Kotlin files.
- UI Layer: Jetpack Compose with StateFlow observation
- ViewModel: StateFlow-based state management
- Repository: Cache check → API call → Room persistence
- Core: DI configuration, domain models, navigation
Technology Stack
Data Flow
Features
Core Implementation
Live League Standings
Real-time competition tables sourced from multiple football data APIs with automatic fallback and intelligent rate limiting.
- Multi-API integration (api-sports.io, football-data.org, OpenFootball)
- Custom ApiRequestTracker for rate-limiting across free-tier APIs
- Keyed LazyColumn implementations for efficient list diffing
Interactive Daily Quiz
Multiple-choice trivia with score tracking and animated transitions.
- OpenFootball API (no auth)
- DataStore score persistence
- Compose animated transitions
Season Comparison
Side-by-side statistical analysis with custom chart components.
- Custom Compose charts
- Multi-season data aggregation
- Stability annotations for minimal recomposition
League Personalization
Onboarding flow for customizing preferred competitions.
- DataStore preference persistence
- Navigation Compose 2.7
- Coil 2.5 for badge images
Performance
Optimization & Data Sources
File-Level Composables
All composables at file level — eliminates re-creation during recomposition cycles and reduces memory overhead.
Keyed Lazy Lists
All LazyColumn/LazyRow use unique identifiers for efficient diffing and optimal scroll performance.
Stability Annotations
40+ immutable data classes annotated — 30-50% reduction in unnecessary recomposition cycles.
External Data Sources
api-sports.io
PrimaryLive scores, standings, and player metrics. 100 req/day free tier.
football-data.org
SecondaryBackup standings and fixtures. 10 req/min free tier.
OpenFootball
HistoricalQuiz and comparison data. No auth required.
Challenges
Problems Solved
Multi-API Rate Limiting
Free-tier APIs (100 req/day, 10 req/min) required careful request management to avoid hitting limits.
Solution: Custom ApiRequestTracker with intelligent rate-limiting, automatic API source failover, and cache-first architecture.
Recomposition Performance
Complex UI with real-time data caused excessive recomposition, impacting scroll performance and battery.
Solution: Stability annotations across 40+ data classes, file-level composables, and keyed lazy lists — 30-50% recomposition reduction.
Architecture
Project Structure
Core Module
- api/ — Retrofit service definitions
- cache/ — Caching & data freshness logic
- database/ — Room DAOs & entities
- di/ — Hilt DI modules
- domain/ — Business models & use cases
Feature Modules
- home/ — Dashboard with live match data
- leagues/ — League selection & standings
- stats/ — Player statistics & metrics
- quiz/ — Daily trivia & scoring
- comparison/ — Season analytics & charts
Takeaways
Key Learnings
- Compose Performance — stability annotations and file-level composable patterns for measurable recomposition reduction in data-heavy UIs.
- Multi-API Architecture — resilient data layer with automatic failover and rate-limit awareness across free-tier APIs.
- Cache-First Strategy — Room-backed caching enabling zero-cost API operation with intelligent invalidation.
- Glassmorphic Design — custom Material 3 theme with glassmorphic utilities for a distinctive visual identity.
Interested in the code?
BaoBuzz is open source. Explore the architecture, patterns, and implementation details.