Souspli

Souspli / Docs / Design notes

Design note — 2026-07-25. A decision record, written when this was built and kept as written. It uses the code's names (thing, shell, cage — see the glossary) and may describe things that have since changed. Current documentation: building.

Build brief — packaging: installers for testers (phase 8)

Why

Phase 7 gave a tester something to do (author → sign → share a .thing); this phase gives them something to install. The concept can only be tested by people who are not running pnpm dev, so the deliverable is a double-clickable installer for macOS, Windows, and Linux. This is the last thing between the working end-to-end loop and real hands on it.

The principle

The packaged app is the shell, and packaging must not lie about that. The repo built two Electron entries — the phase-1 cage harness (out/main/index.js) and the shell (out/main/shell/main.js). An installer that launched the harness would ship a demo, not the product. So package.json main now points at the shell; every launch path — pnpm dev, pnpm start, electron ., and the installer — agrees, and the harness moves to an explicit pnpm dev:cage.

No source mutation during a build. electron-builder's extraMetadata.main would let main stay the harness and be overridden only in the package — but with the app dir at the repo root it rewrites the real package.json in place (stripping scripts/devDeps) and does not reliably restore it. Making main correct at the source sidesteps that entirely. A build must never leave the tree dirty.

Testers carry no toolchain. better-sqlite3 is native; each platform's installer must contain a copy built against that platform's Electron ABI. That is a packaging-time responsibility (npmRebuild + asar-unpack), never something we ask a tester to do.

Scope

Out of scope (later)

Verification

Fully verifiable for Linux in-repo; macOS/Windows rely on their CI runners.