Sleep Cast
Bedtime Audio Stories, Ambient Sounds & Relaxation Platform
Freemium bedtime storytelling and ambient relaxation mobile platform featuring RevenueCat subscription tiers, background audio stream engine, and offline listening.
Executive Product Overview & Scope
Sleep Cast (formerly Fact360) helps users fall asleep through soothing voice narrations, ambient soundscapes, and sleep science stories. The app operates on a freemium model with premium story unlocked via RevenueCat subscriptions. As the Flutter Developer, I re-engineered the audio playback architecture, fixed critical background playback memory leaks, and managed Google Play Store deployment.
Core Engineering Contributions & Technical Execution
Key Technical Features & Highlights
The Engineering Challenge
Audio decoders and stream subscriptions were leaking in memory when users rapidly skipped between stories in the playlist, eventually triggering Android OS Out-of-Memory (OOM) background kills. In addition, subscription status occasionally desynchronized between offline sleep sessions and online restarts.
The Architectural Solution
Architected a unified singleton `AudioPlaybackService` with strict mutex locks, explicit stream subscription cancellation, and automated controller teardown. Connected RevenueCat's local entitlement cache to the audio playback gate, validating subscription status offline for up to 30 days while scheduling silent background checks on reconnection.
Tangible Results & Measurable Impact
Achieved 99.9% crash-free sessions on Google Play Store across tens of thousands of continuous audio listening hours. Completely eradicated background audio memory leaks and delivered a seamless 4.9/5 user rating.