Run, build & test locally
Requirements
Section titled “Requirements”- Node.js 24 (
.node-versionin the repository) - pnpm 10 (
packageManagerinpackage.json) - To run GPU tests or
vj:preview, Nix (the dev shell inflake.nixprovides Chromium and the required libraries)
The tech stack is Vite + React 19 + TypeScript. Rendering and audio analysis are plain TypeScript classes that do not depend on React (src/render/, src/audio/, src/scenes/, src/synth/), and React handles only the UI and settings. The only runtime dependencies are React and valibot; no rendering library such as three.js is used.
Starting
Section titled “Starting”pnpm installpnpm dev- The dev server starts over HTTPS with a self-signed certificate (
@vitejs/plugin-basic-ssl). The URL is usuallyhttps://localhost:5173/. The browser shows a warning the first time, so proceed via “Advanced” → “Proceed to …”. - It is also exposed to the LAN (
server.host: true). The microphone (getUserMedia) only works in a secure context (HTTPS or localhost), so it is HTTPS to let you try it from other LAN devices. - To control it from the CLI, start
pnpm bridgein another terminal and open with?bridge=1(Remote control).
pnpm build # tsc -b && vite build (includes type checking)pnpm preview # preview the build locallyStatic files are output to dist/. To serve from a subpath, specify it like BASE_PATH=/<path>/ pnpm build.
pnpm test # vitest (the full unit test suite)nix develop -c pnpm test:gpu # tests that use the GPU (WebGL2)pnpm test:watch # watch modelint / format
Section titled “lint / format”pnpm lint # oxlint --type-awarepnpm lint:fixpnpm format # oxfmtpnpm format:checkCI (.github/workflows/ci.yml) runs the format check, lint, the build (including type checking), unit tests, and GPU tests.
Other scripts
Section titled “Other scripts”| Script | Details |
|---|---|
pnpm vj:preview |
Renders a Patch to a PNG (vj:preview / vj:validate) |
pnpm vj:validate |
Validates a Patch locally (same as above) |
pnpm measure:coverage |
Measures each Generator’s screen coverage on a real GPU and rewrites src/synth/coverage.generated.ts (nix develop recommended) |
pnpm knowledge:check |
Validates the format of the knowledge bundle in knowledge/ |
Deployment (hosted version)
Section titled “Deployment (hosted version)”The hosted version is served on Cloudflare Workers (wrangler.jsonc, worker/).
A single Worker handles serving the built app (dist/) and the WebSocket relay at /room/<id> (the Durable Object RelayRoom).
Deployment is done through the Git integration of Cloudflare Workers Builds, which runs pnpm run build at build time.