4Stem Band Player is a static SvelteKit app with no backend, so the entire development workflow runs locally. The steps below take you from a fresh clone to a running dev server, then through type checking, testing, and a production build.Documentation 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.
Install prerequisites
You need the following tools installed on your system before starting:
- Node.js 18 or later — required to run Vite and the SvelteKit build
- git — to clone the repository
- ffmpeg (optional, but required for
npm run songs:peaks) — used by the peak-generation script to extract waveform data from MP3 files
Install dependencies
Start the development server
0.0.0.0 so it is also reachable from other devices on your local network.Both
npm run dev and npm run preview bind to 0.0.0.0, making the server accessible on your local network — useful for testing on a physical phone.Explore the demo songs
The five bundled demo songs are already in
Select a song from the dropdown in the header. The app fetches and decodes all stems, then displays waveforms for each one.
static/songs/ with pre-generated waveform peak files and are ready to play immediately:| Folder | Title | Artist |
|---|---|---|
Bambola | La bambola | Patty Pravo |
GloryBox | Glory Box | Portishead |
IkesRap2 | Ike’s Rap 2 | Isaac Hayes |
SendHLTMe | Send His Love to Me | PJ Harvey |
YouMightThink | You Might Think | The Cars |
Regenerate peaks and manifest (optional)
If you add or modify song files, run the preparation script to validate folders, generate any missing waveform peak files, and rebuild To force-regenerate every peak file even if the source MP3 has not changed:
static/songs/manifest.json:Run the type checker
svelte-kit sync followed by svelte-check against tsconfig.json. The project currently reports zero Svelte errors and zero warnings.Run the test suite
Build for production
@sveltejs/adapter-static (configured in svelte.config.js) to prerender every route to static HTML and emit all client assets. The build writes the deployable output to public/, and also copies static/songs/ content into public/songs/ so the artifact is fully self-contained.Preview the production build
public/ output directory, with the same 0.0.0.0 binding as the dev server.All npm Scripts
| Script | Description |
|---|---|
npm run dev | Start the Vite dev server (binds to 0.0.0.0, port 5173) |
npm run build | Compile and write the static site to public/ |
npm run preview | Serve the production build locally (binds to 0.0.0.0, port 4173) |
npm run check | Run svelte-kit sync and svelte-check for type and template errors |
npm test | Run the full Vitest test suite (17 files, 100 tests) |
npm run test:unit | Alias for npm test |
npm run songs:prepare | Validate songs, generate missing peaks, regenerate the manifest |
npm run songs:release | Run songs:prepare, then check, test, and build |
npm run songs:manifest | Regenerate static/songs/manifest.json only |
npm run songs:validate | Validate song folder completeness without making changes |
npm run songs:peaks | Generate waveform peak JSON files (requires ffmpeg on PATH) |