Vellum/internal
mithral 051169a18a Documentation, and make a fresh clone actually work
Docs
- docs/ARCHITECTURE.md: how the pieces fit and why. The request path, the six
  enforced layers, the data model, the scanner, the job queue, direct-play
  playback, and the three protocol surfaces over one application.
- docs/decisions/: seven ADRs with the alternatives that were rejected —
  SQLite-with-a-seam, direct-play-only, mark-missing-never-delete, the modular
  monolith, the one item-access chokepoint, the table-backed queue, and
  fixed-width timestamps.
- README: the layout section was stale (it predated catalog, home, scanner,
  providers, engine, probe, playback, apitoken, arch and the dto packages) and
  now lists what exists, plus links to the new docs.

Two real bugs, both found by verifying the docs instead of trusting them

1. The CLI could not run on a fresh install. `Config.Validate` created the data
   and config directories, but the CLI never called it, so `vellum user add` —
   the recovery path when you are locked out — failed with "unable to open
   database file" until the server had booted at least once. Split the directory
   creation into `Config.EnsureDirs`, call it from the CLI, and keep the media
   root check out of it: an admin command must not fail because a library is
   unmounted. The CLI tests now point DBPath inside DataDir, exactly as
   LoadConfig derives it, so they exercise the fresh-install path; removing
   EnsureDirs fails three of them.

2. A fresh clone could not build at all. `//go:embed all:dist` fails to compile
   when web/dist is absent, and web/.gitignore expected a `dist/.gitkeep` that
   was never created. Added it, so a clone builds and the server logs
   "web UI not embedded; run the frontend build to include it" — the intended
   behaviour for someone who only wants the API.

Also: the httpapi tests depended on a built frontend and FAILED rather than
skipping, so the suite was red on any fresh clone. findAsset and readAsset now
skip with a message naming the missing step. They still RUN when a bundle is
present (verified: zero skips here), so they have not been quietly disabled.

Verified from a simulated clone of tracked files only: go build exit 0, 25
packages pass, the server boots and applies all 12 migrations, and the CLI
creates a user and takes a backup. gofmt clean, vet exit 0, svelte-check 0/0.
2026-10-12 00:18:11 -04:00
..
apitoken Waves 9-10: Jellyfin and Subsonic clients can browse and play 2026-10-11 15:05:43 -04:00
arch Guard the storage seam against erosion 2026-10-12 00:06:01 -04:00
auth Wave 2: correctness and security 2026-10-11 13:31:34 -04:00
catalog Phase 3: a storage seam behind catalog, and one consumer threaded onto it 2026-10-11 16:16:07 -04:00
cli Documentation, and make a fresh clone actually work 2026-10-12 00:18:11 -04:00
core Documentation, and make a fresh clone actually work 2026-10-12 00:18:11 -04:00
engine Waves 7-8: playback engine selection, and missing files you can see 2026-10-11 14:36:55 -04:00
home Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
httpapi Documentation, and make a fresh clone actually work 2026-10-12 00:18:11 -04:00
httpx Phase 1: accounts, sessions, per-library grants 2026-10-09 16:31:24 -04:00
jellyfin Close the Jellyfin test gap 2026-10-11 16:10:58 -04:00
jobs Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
library Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
media Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
metadata Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
modules Phase 1: one item-access seam, and architecture rules that fail the build 2026-10-11 15:47:18 -04:00
natsort Phase 6a: directory grouping, audiobooks and music playback 2026-10-09 21:20:47 -04:00
playback Phase 3: a storage seam behind catalog, and one consumer threaded onto it 2026-10-11 16:16:07 -04:00
probe Waves 4-6: audio depth, ffprobe facts, and direct-play video 2026-10-11 14:14:32 -04:00
progress Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
providers Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
scanner Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00
search Wave 3: search depth, transfer size, and the Home screen's tests 2026-10-11 13:46:18 -04:00
stream Waves 4-6: audio depth, ffprobe facts, and direct-play video 2026-10-11 14:14:32 -04:00
subsonic Phase 2: split the fat packages along real boundaries 2026-10-11 16:03:10 -04:00