Files
Musify/web-player
Admin 7b1b81c45a web-player: single source of truth for theme, no light-mode flash
Remove the duplication of the ~18 per-hue dynamic tokens between
theme.css and buildThemeTokens(): theme.css now only defines fixed
neutrals, surfaces, layout and z-index; hue/mode-dependent values
come solely from tokens.ts, injected via SSR as an inline <style> in
+layout.svelte (tokensToCss helper) and reapplied on every hue
change. app.html sets data-theme before first paint by reading
localStorage, removing the dark flash when light mode was saved.

The two inline-style backgrounds become @utility
app-backdrop/app-vignette; the main's bottom padding becomes
@utility app-main, driven by --mf-dock-h via [data-has-track].

Note: <style>{expr}</style> doesn't interpolate in Svelte (it
compiles as component-scoped CSS) — the SSR block is injected with
{@html `<style>${css}</style>`} since the content is fully generated
(no user input).

Verified in the browser: --mf-accent/--mf-bg resolve correctly during
SSR, data-theme='light' applies before the first render with no
flash.
2026-09-20 22:26:37 +02:00
..
2026-09-09 23:18:42 +02:00

web-player

Musify's web client: SvelteKit 2 (adapter-node), Svelte 5 runes, Tailwind 4, TypeScript. Authentication is server-side OIDC against Zitadel (openid-client and jose) with an encrypted session cookie; the backend is called from load functions and form actions through a typed openapi-fetch client.

Development

npm install
npm run dev      # :5173

Configuration lives in .env (template in .env.example). Bring the infrastructure stack up first (see ../deploy/README.md) and copy the WEB_CLIENT_ID / WEB_CLIENT_SECRET it writes to deploy/.env into this .env once, then run the dev server.

npm run check    # svelte-check — must be clean before closing a change
npm run lint     # prettier --check . && eslint .
npm run format   # prettier --write .
npm run build    # production build into build/
npm run gen:api  # regenerate src/lib/api/schema.d.ts from the running API

Production

Built and run as a container by the production stack — see ../deploy/README.md. There the same variables come from deploy/.env.prod through compose instead of from .env.

Conventions and the design system are documented in CLAUDE.md and in the musify-web skill.