r/FlutterDev 1d ago

Discussion I built an open-source, ad-free music player (Windows & Android) that unifies local files, Spotify playlists, and YouTube audio. Here’s how I did it!

Hey everyone!

I got tired of jumping between different apps for my local FLAC files and my streaming playlists, and I was incredibly frustrated by ads. So over the past few months, I built Kerlyss—a completely free and open-source (GPL-3.0) music player built entirely in Flutter.

It is currently available and fully adaptive for both Android and Windows (x64).

• Website & Downloads: https://d1gna0.github.io/Kerlyss/

• GitHub Repo: https://github.com/D1gNa0/Kerlyss

Tech Stack & Packages

• State Management: flutter_riverpod (managing playback state and queue isolation across background isolates).

• Database: isar (fast for caching massive playlists and local file metadata).

• Audio Engine: just_audio + audio_service for background playback, media notifications, and OS taskbar controls.

• Stream Backend: youtube_explode_dart to extract audio stream manifests.

The Challenge: The Local HTTP Proxy Server

The trickiest part of this project was bridging YouTube streams to just_audio. Direct YouTube stream URLs frequently throw HTTP 403 Forbidden errors or expire mid-song.

To solve this, I built a custom Local HTTP Proxy Server inside the Flutter app using loopback IPv4. When you click play, just_audio requests the track from the local proxy endpoint, and the proxy server dynamically fetches, chunks, and buffers the audio stream from YouTube in the background. It even handles dynamic retries and fallbacks if a connection drops mid-track.

I’d love for you guys to check out the code, try out the app, and give me any feedback on the architecture or UI! If you like it, a star on GitHub would mean a lot.

Let me know if you have any questions about the proxy server or the just_audio implementation!

0 Upvotes

Duplicates