# music — frontend spec React (vite). Dark theme by default, blue accent. Web UI is v1; backend is API-first so a mobile app can reuse the same endpoints later. ## Theme - **Dark by default.** Blue accent (`--accent: #2D7FF9` or similar; pick one and define tints like kdrive's accent system). - Reuse the design-token approach from kdrive (CSS vars, Geist font). This is a distinct app with its own palette but shared visual language. - Animations: tasteful — now-playing bar slide-up, queue/lyrics panel slide-in, album art crossfade on track change, subtle hover/press states, progress bar smoothing, shuffle/loop button state transitions. ## Layout - **Left sidebar**: nav (Artists / Albums / Songs / Favorites / Recently played / Vibe), profile/avatar (opens settings modal). - **Main**: list/grid views per section. - **Bottom now-playing bar** (persistent): cover thumb, title, artist + feats, prev / play-pause / next, volume slider, shuffle toggle, loop toggle (off → all → one), progress/seek bar, lyrics button, queue button. ## Views ### Artists - List/grid of artists (image if enriched, else monogram). Click → artist page: header (image, name, genres), albums, all tracks. ### Albums - Grid of album covers (sort: name / year / artist). Click → album page: cover, title, artist, year, ordered tracklist, play / shuffle album. ### Songs - Virtualized list (library can be large): title, artist, album, duration, play count, favorite toggle. Sort by title/artist/added/plays. Fuzzy search box. ### Favorites / Recently played - Favorites: from `/api/favorites`. Recently played: from `/api/history`. ### Vibe - "Start a vibe" from current track / an artist / a genre. Calls `/api/vibe`. Shows the mixed queue; recommendation candidates are visually tagged subtly (small dot/"suggested") but interleaved, not grouped. ## Player controls (now-playing bar) - **Global shuffle button** (prominent, maybe in topbar or sidebar too): one tap → `GET /api/shuffle/all` → loads entire library shuffled as queue, starts playing. The headline feature. - **Prev / Play-Pause / Next**. - **Loop toggle**: cycles off → loop-all (current queue/album) → loop-one (single track). Distinct icons per state. - **Volume slider**. - **Seek bar**: draggable, shows elapsed/total. - **Cover + title + artist + feats**: feats rendered subtly after artist (e.g. "Artist · feat. X, Y"). - **Lyrics button**: opens lyrics panel. - **Queue button**: opens queue panel. ## Playback engine (client) - Web Audio / `