diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 126637c..984fec6 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -660,6 +660,7 @@ Principles carried from the prototype: the checker must be independent of the co ### 11.1 Deployment on NixOS [PROPOSED] - **Service** [FIXED, Q20; research: `docs/research/q20-nix-packaging.md`]: NixOS module `services.fffVtt` in `nix/module.nix`, defining: package from `nix/package.nix` (`buildNimPackage`; dependencies from committed `nix/lock.json` generated by `nim_lk`; mummy tag `0.4.8`; nixpkgs input pinned to match devbox Nim 2.2.12; fallback: vendored deps via `nimFlags --path:`), a systemd unit, state dir, options for `publicOrigin`, `port`. Imported from the owner's server NixOS config, like `foundryvtt.nix`. - Unit hardening: `DynamicUser` or dedicated user, `StateDirectory=fff-vtt`, `ProtectSystem=strict`, `ProtectHome`, `NoNewPrivileges`, `PrivateTmp`, `RestrictAddressFamilies=AF_INET AF_INET6`, `MemoryMax`. Add `AF_UNIX` only if the FFF sidecar (section 9, option b) is chosen; revisit at Q19. Listen on `127.0.0.1:` only [MEASURED prototype binds 127.0.0.1]. + - `fff-vtt gm-key` (3.2) must run as the service user (e.g. `sudo -u fff-vtt gm-key`, or a wrapper in the module), so the DB and its WAL files stay owned by that user; with `DynamicUser` the module needs a fixed user name or a wrapper. [FIXED, owner decision 2026-11-14, #13] - `Restart=on-failure`; `TimeoutStopSec` short; SIGTERM handler flushes (4.4). - **Client build**: Vite `dist/` produced by Nix (or CI), served by nginx from the store path. Hashed assets, long cache; `index.html` no-cache. - **nginx** (shape of the vhost, adapt to the existing server config; reference only, I did not read the owner's NixOS repo for this doc): @@ -759,6 +760,8 @@ Each is small, ends with a green gate, and no milestone depends on browser UI be - **M7 - Real-world pass.** - Scope: real-network latency/throughput run, iOS/Safari check (if available), one real session with the owner's table, collect SLOW lines. - Accept: documented numbers; defects triaged to issues; go/no-go for v1. +- **M3 build slices** [FIXED, owner decision 2026-11-14, #13]: vertical slices, each runnable end-to-end with its own test. Order and blocking: each slice blocked by the previous, except 9 (blocked by 5 only) and 10 (blocked by 1-9). Open technical details (DDL, property-schema registry format, config keys, redaction mechanism) are decided by the builder inside the slice that needs them and recorded here as FIXED (owner-delegated). + 1. Bare server (#16) 2. Getting in (#17) 3. Talking safely (#18) 4. Walls and doors (#19) 5. Tokens and sight (#20) 6. Explored persistence (#21) 7. Token details (#22) 8. Characters and names (#23) 9. Map tiles (#24) 10. Finish line (#25). - **Post-v1 candidates**: FFF seam implementation (section 9), drawings/pings/ruler, chat/dice (order decided at M7, Q8), light sources, browser upload UI (Q5), multi-scene (Q3), vision deltas/binary protocol (Q16). ---