BlissBox
A self-directed engineering study: building a complete media streaming client from first principles in Flutter — adaptive streaming, offline-first playback, and a modular Dart mono-repo
- Role
- Solo project · Design, architecture and implementation
- Timeline
- 2024–2025 · Self-directed study
- Platforms
- Android
BlissBox was a deliberate attempt to build a complete media streaming client from first principles, to understand the layers that commercial streaming apps hide behind an SDK. The questions were concrete: how does an adaptive streaming client actually work — how are HLS and DASH manifests parsed, variant streams selected, playback buffered and resumed? How much of a production-grade mobile client can one developer design, build and reason about end to end?
The answer took the shape of a modular Dart mono-repo of 18+ self-contained packages: a hand-written manifest parser, a media playback stack, a design system, localisation, and the dependency-injection wiring holding them together. Enforcing boundaries at the package level rather than by convention was the single most useful decision — each layer compiles and is testable on its own, and refactors stayed local. The study is the deliverable; the application is not distributed.
Modular Mono-Repo
18+ self-contained Dart packages covering the YouTube API engine, media playback stack, UI system, and localizations — wired together via dependency injection.
BlissBox App
Flutter · AndroidThe main consumer app implementing home, explore, search, library, player, download manager, and YouTube sign-in flows. Built with Clean Architecture and BLoC state management.
Streaming Engine
Dart package · youtube_musicA hand-written API client covering session handling, token generation, stream manifest resolution, search, browse and playlist operations — built without an SDK, to understand each layer.
Media Player Stack
Dart packages · media_player · hls · dashA custom platform-channel media player with a hand-rolled HLS and CMAF/DASH parser, lazy source loading, offline downloader, and audio-service integration for lock-screen controls.
Features
Home Feed
Personalised home screen with curated shelves, quick picks, mixes and new releases, driven by the browse endpoint the transport layer exposes.
Audio Player
Rich audio playback with dynamic album art, synced full-screen lyrics, queue management, shuffle, and repeat modes.
Video Player
Full-screen video mode that shares the same playback session as the audio player — switch modes instantly without buffering.
Audio-of-Video
Play only the audio track extracted from any music video, letting you listen to video-only releases as pure audio.
Lyrics
Synchronised, full-screen lyrics rendered in real time against playback position — a timing and state-sync problem as much as a UI one.
Search & Discovery
Instant search with smart suggestions across songs, albums, artists, and playlists, with a history view for quick re-access.
Explore & Moods
Discover new music through curated mood playlists, genre charts, and region-specific trending shelves.
Trending Charts
Region-specific top charts and trending music updated in real time, letting you always stay current with popular releases.
Artist Pages
Full artist profiles showing top songs, albums, singles and subscriber counts, assembled from the browse endpoints the transport layer exposes.
Playlists
Create and manage custom playlists with shuffle, queue reordering, and quick-add actions — synced with your Google account when signed in.
Library
Your personal library — saved songs, downloaded tracks, and followed playlists — all organised in one place and available offline.
Playback, Built from Scratch
The point of the exercise was to avoid wrapping an existing SDK. Every layer of the streaming pipeline — transport, manifest parsing, decode, playback — was implemented and reasoned about directly, which is where the learning was.
Client-Side Cryptography
A JavaScript runner abstraction (WebView, FlutterJS and process backends) to study how short-lived tokens and signature timestamps are produced client-side, and reimplement that flow in Dart.
Transport & Protocol Layer
A hand-written Dart client covering request construction, response parsing, pagination and cookie-based session management — an exercise in reading an undocumented API from the outside.
Adaptive Streaming Internals
Hand-rolled HLS and CMAF/DASH manifest parsers resolving multi-quality audio and video variants, feeding a native Android ExoPlayer integration over a custom platform channel.
Tech Stack
App
Native Layer
Data & Storage
Tooling
What I owned
- • Studied an undocumented web API from the outside and reimplemented its request construction, token generation and cookie-based session handling in pure Dart.
- • Designed and built a modular mono-repo architecture with 18+ Dart packages managed via Melos, keeping each concern (YouTube engine, media player, UI system) independently versioned.
- • Implemented a custom HLS and CMAF/DASH parser from scratch, enabling adaptive-quality stream resolution without any third-party media library.
- • Developed a native Android media player plugin in Kotlin/Java via Flutter platform channels, integrated with Android's audio_service for lock-screen and notification controls.
- • Built a JavaScript runner abstraction (WebView, FlutterJS and process backends) to study how obfuscated client-side cryptography produces short-lived tokens.
- • Designed the complete app UI from scratch — home, explore, search, player, library and artist pages — as an exercise in building a coherent design system end to end.
- • Implemented OAuth sign-in via WebView cookie capture and cookie-jar session management, enabling library sync and personalised recommendations.
- • Implemented an offline download manager with background download queuing, progress tracking, and local playback of downloaded tracks.