Back to Projects
BaoBuzz App

BaoBuzz

Android Live Score Companion App

Kotlin 1.9.20 Jetpack Compose ~130 Kotlin Files 2025

Three APIs, One Pipeline

100

api-sports.io

req/day free tier — live scores & standings

10

football-data.org

req/min free tier — backup standings

OpenFootball

No auth — quiz & historical data

Request Rate Check Cache Hit? API Call Room Persist UI Update

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.

App Screens

BaoBuzz Home Screen Home
BaoBuzz Leagues Screen Leagues
BaoBuzz Quiz Screen Quiz
BaoBuzz Quiz Results Quiz Results
BaoBuzz Season Comparison Season Comparison
BaoBuzz Settings Settings

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

Language Kotlin 1.9.20
UI Compose + Material 3
DI Hilt with KSP
Network Retrofit 2.9, OkHttp 4.12
Storage Room 2.6, DataStore
Kotlin Compose Material 3 Hilt Retrofit Room Coroutines StateFlow

Data Flow

UI (Compose) ViewModel Repository Cache Check API Call Room Persist

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

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
Primary

Live scores, standings, and player metrics. 100 req/day free tier.

football-data.org
Secondary

Backup standings and fixtures. 10 req/min free tier.

OpenFootball
Historical

Quiz and comparison data. No auth required.

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.

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

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.