Building & Deploy
Building & Deploy
The site is a static SvelteKit app. Most streamers never run these commands directly — the GUI builds, previews, and deploys the site for you — but the underlying workflow is straightforward.
The GUI workflow
From the GUI's Website tab:
- Sign in with GitLab OAuth.
- Save & Sync clones the template and your config repo.
- Edit the Core / Worlds / Schedule / Theme tabs — changes autosave.
- Preview runs a live dev server that hot-reloads as you edit the config.
- Deploy builds the static site and publishes it to your GitLab Pages branch.
Building by hand
Working from a template checkout with the pnpm toolchain:
pnpm install
# Dev server against the checked-in example config (dev-config/):
pnpm dev
# Production build against a real config directory:
CAPYSTREAMA_CONFIG_DIR=/path/to/config pnpm build
# Preview the built site:
pnpm preview Other useful scripts: pnpm check (typecheck) and pnpm gen:types (regenerate
the shared data-model bindings). The build uses @sveltejs/adapter-static, so the
output is a fully prerendered bundle ready to serve as static files. A build with
no config — or no site.yaml — fails by design.
Nix
The template repo provides a Nix flake. nix run .#gui builds a capystreama GUI with the website feature compiled in and
points it at the local template checkout, so you can develop the template against
a real GUI. nix run .#gen regenerates the Go + TypeScript model bindings.
Deploy target
The site deploys to GitLab Pages as static files. The schedule's timezone conversion runs entirely in the viewer's browser, so no server is required — Pages just serves the prerendered output.