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:

  1. Sign in with GitLab OAuth.
  2. Save & Sync clones the template and your config repo.
  3. Edit the Core / Worlds / Schedule / Theme tabs — changes autosave.
  4. Preview runs a live dev server that hot-reloads as you edit the config.
  5. 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
bash

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.