2.2 KiB
player — Jellyfin music player in Jai
This is a vibe-coded project. Pure AI-assisted work. Take agency, but check ai/ for current direction before making big calls.
What this is
A desktop music player that talks to a Jellyfin server. End goal: looks like a ridiculous 2000s audio player that shipped on a CD-ROM with an album — chunky skinned UI, neon gradients, glossy buttons, a spectrum visualizer behind the now-playing screen, music-reactive shaders, artist art front and center.
Build
cd /home/katajisto/player
/home/katajisto/bin/jai/bin/jai-linux build.jai
./build/player
build.jai is a metaprogram. It points the import path at ./modules (vendored: Jaison) and falls back to the standard Jai modules at /home/katajisto/bin/jai/modules.
Code layout
src/main.jai is intentionally tiny — it just #loads an index.jai from each subfolder. Each subfolder owns its surface area:
core/— app state, window, frame loop, timejellyfin/— HTTP client (libcurl), auth, library browsing, image fetch, stream URLsaudio/— Sound_Player wrapper, queue, FFT analysis for the visualizerui/— theme, fonts, andviews/(one file per screen)gfx/— custom shaders, texture loadingutil/— log, helpers
Each folder has an index.jai that #loads every file in that folder. To add a file, drop it in and add a #load line.
Dependencies
- Simp (Jai stdlib) — rendering
- GetRect_LeftHanded (Jai stdlib) — UI widgets
- Sound_Player (Jai stdlib) — audio playback (ALSA on linux, CoreAudio on mac)
- Curl (Jai stdlib) — HTTP to Jellyfin
- Jaison (vendored) — JSON
- stb_image (Jai stdlib) — single-header PNG/JPG decode for artist images
- stb_vorbis (Jai stdlib) — OGG decode for the (only) audio path
Cross-platform target: linux + macOS.
AI notes
See ai/ for live design notes:
ai/aesthetic.md— visual directionai/architecture.md— code layout rationaleai/decisions.md— decision logai/todo.md— running todo / scratch
Update ai/decisions.md when you make a non-obvious choice. Update ai/todo.md when you punt on something.