Let's Talk Resume
Portfolio / Case Studies / TuneBox

TuneBox

A cross-platform mobile audio player client featuring playback controls, playlist management, and a decoupled Provider state architecture.

Role Full Stack Development Intern
Category Mobile App Architecture & Audio Playback
Timeline SVYPE Internship · May 2026 – Jul 2026
Core Stack Flutter · Dart · Provider · REST APIs

Problem & Challenge

Mobile audio applications encounter common state challenges: background execution transitions, mini-player state synchronization, and coupling audio playback logic directly into UI widgets creates tangled state bugs.

The engineering challenge was to architect a reusable, modular audio service in Flutter that handles playback controls, notification controls, and playlist queues while dramatically simplifying screen rendering code.

Technical Approach & Architecture

We restructured the application around an isolated state management pattern powered by Provider and Dart asynchronous streams:

  • Decoupled Audio Manager Service: Encapsulates player lifecycle events, headphone unplug events, audio focus loss (such as incoming telephone calls), and notification service synchronization.
  • Reactive State Management: Replaced scattered setState() calls across multiple player screens with a centralized AudioPlayerProvider, preventing unnecessary widget rebuilds during position updates.
  • Structured Playlist Management: Structured clean playlist models and track queues for sequential, shuffle, and repeat modes.
  • REST API Gateway Integration: Structured clean data contracts for catalog search, artist discography fetches, and personalized user library syncing.
TuneBox Audio Stream & State Architecture
Flutter UI Layer (Player Screen & Mini-Player)
Listens to Provider streams; dispatches play/pause/seek events via strict actions
↓
AudioPlayerProvider (Central State Store)
Coordinates playback state, track indices, shuffle algorithms, and volume normalization
↓
Native Audio Service Handler (Android/iOS)
Manages OS media sessions, lockscreen art, and audio focus interrupt logic
↓
Audio Stream Service
Streams chunks via HTTP and maintains playback buffer stability

Engineering Challenges & Solutions

1. Codebase Simplification & State Consolidation

Initially, player logic, seekbar animation interpolation, and playback state handling were duplicate-implemented across the full-screen player and persistent mini-player.

Solution: Extracted an atomic AudioControlService singleton that exposed pure reactive streams. Both the full player and mini-player subscribe to the same underlying stream through a unified controller, reducing UI logic complexity and completely eliminating UI state drift between views.

2. Smooth Scrubbing on Audio Streams

Rapid seekbar dragging on remote audio streams resulted in multiple overlapping range requests, causing audio stuttering on mobile devices.

Solution: Implemented debounce handling on seek gestures. The UI visual slider updates smoothly during interaction, while audio repositioning requests are dispatched only once user touch interaction completes.

Key Features & Capabilities

  • Continuous Background Playback: Audio delivery with native lock screen controls and headphone button response.
  • State & Codebase Optimization: Streamlined architectural complexity through modular Provider state consolidation.
  • Playlist & Queue Management: Seamless queue management with shuffle and repeat playback modes.
  • Cross-Platform Parity: Responsive design and fluid ergonomics across iOS and Android.