4Stem Band Player compiles to a fully static site — no Node server, no API routes, and no database. The production build writes everything the browser needs intoDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/cocreating/4StemPlayer/llms.txt
Use this file to discover all available pages before exploring further.
public/, which you can serve from Vercel, Netlify, Cloudflare Pages, an S3-backed CDN, or any plain static file host.
Building for Production
Run the production build with:@sveltejs/adapter-static (configured in svelte.config.js) to prerender every route to static HTML and emit all client assets into public/. The build step also automatically copies the contents of static/songs/ into public/songs/, so the deployable output is fully self-contained.
svelte.config.js adapter settings
public/, with no SPA fallback (the app is a single prerendered route).
Output Directory Structure
Afternpm run build, the public/ directory contains everything the host needs to serve:
| Path | Contents |
|---|---|
index.html | Prerendered app shell |
_app/ | SvelteKit client JavaScript, CSS, and immutable hashed assets |
songs/manifest.json | Song catalog loaded at runtime |
songs/<SongFolder>/song.json | Per-song metadata |
songs/<SongFolder>/*.mp3 | Audio stem files |
songs/<SongFolder>/*.peaks.json | Precomputed waveform peak data |
songs/<SongFolder>/lyrics.md | Song lyrics |
manifest.webmanifest | PWA web app manifest |
service-worker.js | PWA service worker |
Deploying to Vercel
The repository includes avercel.json that points Vercel to the correct output directory. No additional Vercel dashboard settings are needed beyond connecting the repository.
vercel.json
buildCommand to run npm run build and then serves the resulting public/ directory as a static site. Push to your connected branch and Vercel handles the rest.
Your static host or CDN must serve all file types in
public/ without blocking — including .mp3 audio files, .json metadata and peak files, and .md lyrics files. Some CDN configurations restrict non-HTML MIME types by default; ensure audio/mpeg, application/json, and text/markdown (or text/plain) are permitted.Deploying to Other Static Hosts
Any host that can serve a directory of static files will work. Point your host’s output directory setting topublic/ and set the build command to npm run build. Specific examples:
PWA and Service Worker
The player ships a service worker (src/service-worker.ts) that is registered in production only. On install, it precaches the compiled app shell and all static assets so the UI loads instantly on repeat visits. Audio stems under /songs/* are cached cache-first at runtime, meaning a song that has been played once is fully available offline without a network connection.
The static/manifest.webmanifest enables the app to be installed to a phone home screen and launched in standalone mode (no browser chrome). Ensure your host serves manifest.webmanifest with the application/manifest+json content type for the install prompt to appear.