SwissKnife Docs
Understand SwissKnife

Architecture

How SwissKnife is assembled, served and deployed.

SwissKnife is a single client application. It has no application API, database or authentication service.

Browser
  → React application
    → images: Canvas 2D
    → audio / video: FFmpeg WASM (single thread, sequential queue)
    → FFmpeg core: /ffmpeg/ffmpeg-core.js and /ffmpeg/ffmpeg-core.wasm

In Docker production:

Unprivileged Nginx (port 2501)
  → static files from dist/
  → SPA fallback to index.html
  → COOP / COEP / CSP headers (SharedArrayBuffer)

Verified stack

LayerCurrent choice
InterfaceReact 19, strict TypeScript
BuildVite 6, Tailwind CSS 4
ImagesCanvas API
Audio / video@ffmpeg/ffmpeg 0.12 and local @ffmpeg/core 0.12.6
ContainerNode 22 Alpine build stage, Nginx unprivileged 1.27 Alpine at runtime
ChecksESLint, Vitest (npm test), tsc --noEmit

Two distinct artifacts

ArtifactCommandPurpose
Standard productnpm run buildDocker, GHCR and normal deployment
Public demonpm run build:demoPublic Vercel demo only

The Dockerfile runs npm run build. The product repository's vercel.json runs npm run build:demo. Do not swap them.

Repository Compose files

FileImage source
docker-compose.ymlghcr.io/lucas-lepajollec/swissknife:latest
docker-compose.build.ymllocal build from the Dockerfile

The default homelab installation pulls the published image instead of rebuilding the checkout every time.

On this page