music on atproto
plyr.fm
frontend#
SvelteKit with bun (not npm/pnpm).
key patterns:
- state: global managers in
lib/*.svelte.tsusing$staterunes (player, queue, uploader, tracks cache) - components: reusable ui in
lib/components/(LikeButton, Toast, Player, etc) - routes: pages in
routes/with+page.svelteand+page.tsfor data loading - design tokens: use CSS variables from
+layout.svelte- never hardcode colors, radii, or font sizes (seedocs/frontend/design-tokens.md)
gotchas:
- svelte 5 runes mode: component-local state MUST use
$state()- plainlethas no reactivity (seedocs/frontend/state-management.md) - toast positioning: bottom-left above player footer (not top-right)
- queue sync: uses BroadcastChannel for cross-tab, not SSE
- preferences: managed in UserMenu (desktop) and ProfileMenu (mobile) components, not dedicated state file
- keyboard shortcuts: handled in root layout (+layout.svelte), with context-aware filtering