DEV Community

Daivik Dudeja
Daivik Dudeja

Posted on Originally published at github.com Fully Autonomous

I Built an Offline-First Music Player in React 19 & TypeScript (No Subscriptions, Zero Telemetry)

Streaming services are great, until you just want to listen to your personal collection of lossless FLACs, audio stems, or offline music without:

Monthly subscription paywalls
Unwanted podcast recommendations crowding your feed
Mandatory internet connectivity
Telemetry, analytics beacons, and tracking scripts

Over the past few weeks, I built VYBE — an open-source, studio-grade, offline-first music player crafted with React 19, TypeScript, and the Web Audio API, running across Windows (Electron), Android (Capacitor), and the Web.

Here is a breakdown of the architecture, audio DSP engineering, and offline persistence challenges under the hood.

🏗️ Architecture & Tech Stack
Core Framework: React 19 + TypeScript 5.7
Styling & Motion: Tailwind CSS + custom GPU glassmorphism
Audio DSP Graph: Web Audio API (AudioContext, BiquadFilterNode, GainNode, AnalyserNode)
Metadata Engine: Multi-threaded ID3 & Vorbis tag parsing via music-metadata
Offline Storage: IndexedDB (raw audio blobs & track cache) + LocalStorage (app state)
Cross-Platform: Electron 45 (Windows desktop app) & Capacitor 8 (Android)
🎧 Real-Time 6-Band Parametric Equalizer

Most web audio tutorials stop at the basic tag. But building an audiophile player requires full control of the raw audio pipeline.

Using Web Audio API's BiquadFilterNode, VYBE routes audio through a serialized DSP node graph:

The Serialized DSP Audio Graph:

Audio Source Element
⬇️
6-Band Biquad Filters (60Hz, 150Hz, 400Hz, 1kHz, 2.4kHz, 15kHz)
⬇️
Stereo Panner & Channel Balance Node
⬇️
Dual Gain Crossfader & Dynamic Peak Normalizer
⬇️
AnalyserNode (Real-Time Visualizer Frequency Data)
⬇️
AudioContext Destination (Speakers / Headphones)
The 6 Frequency Bands:

Each band provides discrete gain controls ranging from -12dB to +12dB:

60 Hz (Low shelf): Sub-bass kick & rumble
150 Hz (Peaking): Bassline warmth & punch
400 Hz (Peaking): Mid-range body & instruments
1.0 kHz (Peaking): Vocal presence & articulation
2.4 kHz (Peaking): Attack & percussion clarity
15.0 kHz (High shelf): High-end air & shimmer
💾 Solving the "Offline in Browser" Problem (IndexedDB)

Running in the browser is straightforward; persisting hundreds of megabytes of local audio files across tab refreshes with zero cloud uploads is not.

When a user imports an audio folder into the browser player:

music-metadata parses artist, album, track numbers, duration, and embedded APIC cover art on client threads.
The raw file buffer is stored as a binary blob inside an IndexedDB object store (audio_blobs).
The metadata structure is indexed inside tracks_meta.
On subsequent page visits, the app hydrates audio tracks using object URLs (URL.createObjectURL(blob)), letting you play your entire library completely offline in airplane mode.
🎨 Visuals: Frosted Acrylic & Adaptive Density Zoom

A music player should be beautiful to look at on a secondary monitor while coding:

Transparent Frosted Theme: Real-time Gaussian blurs on the active album artwork combined with CSS backdrop filters.
Adaptive Density Zoom: Supports discrete UI scaling from 70% to 130% (Dense, Default, Spacious) mapped to Ctrl + and Ctrl - keyboard shortcuts.
Pure AMOLED Black: A zero-pixel-light mode for OLED displays and maximum battery savings.
Synced LRC Lyrics: Real-time karaoke-style synchronous lyrics with auto-scroll and manual time-offset fine-tuning (±0.5s).
🚀 Live Demo & Open Source

VYBE is 100% free, open-source, and offline.

🌐 Live Web Player: https://daivikopx.github.io/VYBE-Music-Player/
💻 GitHub Repository: https://github.com/DaivikOPX/VYBE-Music-Player
💾 Windows (.exe) & Android (.apk): Available in GitHub Releases

I would love to hear your feedback on the audio pipeline, performance, or ideas for features you'd like to see next! If you enjoy the project, dropping a ⭐ on the repository means a lot!

Top comments (0)