MyBBM
- Kotlin
- Jetpack Compose
- Android Room
- Supabase
Android fuel-efficiency calculator and trip-cost estimator built on a hybrid offline-first architecture, synced with regional fuel-price data in Supabase.

WHY & HOW IT WAS BUILT
Drivers and logistics riders across East Kalimantan frequently travel through inter-city corridors where cellular coverage drops out. Existing fuel-consumption calculators either required a constant network connection to fetch fuel tier prices (Pertalite, Pertamax, Dexlite, Bio Solar) or relied on purely manual entry that quickly drifted out of date whenever regional price adjustments occurred.
MyBBM was engineered around a strict offline-first single source of truth (SSOT) using Android Room on the client and Supabase (PostgreSQL) on the backend. All trip-cost calculations, vehicle tank profiles, and odometer logs read and write directly against local Room tables exposed as Kotlin Flow streams to Jetpack Compose screens, while a background worker synchronizes regional fuel-price deltas whenever connectivity returns.
ARCHITECTURE
Unidirectional offline-first data flow: Jetpack Compose collects immutable state from ViewModels backed by Android Room DAOs, while background coroutines reconcile regional fuel-price updates from Supabase REST/PostgreSQL kept warm by scheduled GitHub Actions heartbeats.
JETPACK COMPOSE UI
Reactive state collectors & trip calculator
ANDROID ROOM (SSOT)
Local SQLite Flow<List<FuelPriceEntity>>
DELTA SYNC ENGINE
Kotlin Coroutines resilient background sync
SUPABASE POSTGRESQL
Regional fuel price tiers + GitHub Actions heartbeat
Key Outcomes and Learnings
- Sub-16ms instant trip-cost calculation regardless of cellular coverage along East Kalimantan corridors
- 100% offline reliability with automatic background delta sync when network connectivity is restored
- Zero unplanned backend cold-pause incidents via scheduled GitHub Actions heartbeat checks
- Treating local Room tables as the sole source of truth eliminates race conditions between optimistic UI state and slow mobile networks
- Encoding timestamped regional price snapshots lets users see exactly when their fuel tariff cache was last verified