Skip to main content

Decisions (locked)

Rendered from corpus/wiki/decisions.md · updated 2026-11-02

This page is generated from the project corpus and rewritten on every docs build. Edit the source in corpus/, not here.

Settled choices from the grill session. Don't relitigate without an explicit revisit + a log.md note.

Bar for a new entry — all three must hold: hard to reverse · surprising without context · a genuine trade-off with real alternatives. Record the call, the date, what was rejected, and why; the why is the load-bearing part, because a decision without one can only be obeyed or broken, never revisited intelligently. Everything below carries its rationale in the right-hand column — keep it that way. Terminology that a decision settles belongs in glossary.md, not here.

#DecisionRationale
D1EPUB→PDF is export-only, never a reading path REVISED 2026-08-25 → D34Reason was "conversion discards reflow" — direction-specific, and it inverts for PDF→EPUB, which adds reflow. Convert is now symmetric and produces a readable linked row
D2Single-user, no auth REVISED 2026-07-07 → D28Still single-user, still no accounts — but the public deployment is now gated behind one shared password (see D28).
D3No persistence — upload → read → gone on refresh REVISED 2026-07-07 → D24Superseded: the app now keeps a persistent library (server-side SQLite). Reading position is still session-only per D9.
D4Backend = one stateless /convert route REVISED 2026-07-07 → D24Superseded: backend now also owns the library (CRUD + file/cover storage). /convert still exists and is still stateless.
D5Calibre ebook-convert for conversionBest fidelity; acceptable to require the binary for a personal app
D6EPUB render = react-reader / epub.jsDe facto standard, React wrapper, fast to Kindle-like reflow
D7PDF render = react-pdf (PDF.js)Clean React API, keeps custom chrome control
D8TanStack Router + QueryRouter for views; Query useMutation for the one convert call
D9Zustand for in-memory reader stateResets on refresh — intended. PARTIALLY REVISED 2026-07-08 → D31: reading position now persists per-user server-side; theme/font/chrome state remains in-memory. (pageMode persists to localStorage — the reading-mode toggle of 2026-07-13.)
D10Monorepo = npm workspacesNo pnpm/Turborepo; apps/web, apps/api, packages/shared
D11packages/shared holds Zod contractSingle source of truth; client + server can't drift
D12Formats = PDF + EPUB only for v1Matches the two reading paths; MOBI/AZW3 deferred
D13Detection = extension/MIME only (no magic bytes)Spoofing isn't a threat for a personal tool
D14CORS + VITE_API_URL (no Vite proxy) REVISED 2026-09-27 → D54Explicit base URL, deploy-ready
D15Convert limits: 50MB / 60s / structured errors / no queue 60s REVISED 2026-08-25 → D34 (50MB cap and "no queue" stand)A conversion is now an async job with a 24h reaper, one at a time, cancellable — a synchronous 60s cap cannot hold a real PDF→EPUB
D16Tailwind + Base UIFast chrome; unstyled accessible primitives keep the Kindle look
D17Local dev only — npm run dev, no Docker/deploy REVISED 2026-09-06: atrium is deployed to the estate VPS by vps-deploy, behind Caddy on the shared origin, and since 2026-09-06 the API ships as a container (infrastructure/Dockerfile, infrastructure/docker-compose.yml, commit 6dc88fe); npm run dev stays the local loop (D54)Personal tool. Revised because the app runs in production now; the container moved Calibre off the shared VPS and into this repo
D18No bookmarks/highlights in v1Pointless without persistence
D19In-book search IS in v1Kept during scoping
D20Tailwind v4 (with @base-ui/react)Matches Base UI's documented examples; greenfield 2026 build
D21Pinned exact dependency versions (no ^/~), latest stableReproducible installs; ranges had already drifted (TS ^5.7.3→5.9.3). Drift corrected 2026-10-03: carets had crept back in apps/api, apps/web and all of apps/docs (two had already moved past their declared version); each is pinned to what the lockfile resolved, and sharp is one 0.35.4 copy across api, docs and astro
D22Base UI = @base-ui/react (not @base-ui-components/react)@base-ui/react@1.6.0 is current; the -components name is legacy/stuck
D23Node ≥22 (.nvmrc 22.23.1, engines >=22) REVISED 2026-10-03: Node 24 — .nvmrc 24.14.1, engines >=24, @types/node 24.19.1Was "dev box is 22.23.1; pinned to installed version". That premise lapsed: the dev box runs 24.14.1 and the container builds and runs on node:24-bookworm-slim, so the pin and the typings described a runtime nobody ran, while the native modules (better-sqlite3, sharp) were only ever exercised on 24. Rejected: staying on 22, which would mean changing the production base image to match a pin. Taken on the brief's recommendation in an unattended run; confirmed by the owner 2026-10-04
D24Persistent library via SQLite in apps/api (better-sqlite3) SYNCHRONOUS-API CLAUSE REVISED 2026-08-30 → D47Reverses D3. User wanted a saved library of covers. Single-user local file DB; synchronous API is simplest for one user. Still no auth (D2 holds). SQLite and better-sqlite3 both stand — the driver never changed. What D47 revises is the reason: queries are now built and run through Knex, so the API is promise-based. That reason was load-bearing in more places than it looked (two single-flight guards depended on read-then-write being uninterruptible) — see D47.
D25Thumbnails stored on disk, not in the DBapps/api/images/thumbnails/<id>.jpg; DB stores only the path. Keeps the DB small/fast, lets HTTP layer cache + serve covers cheaply. Originals live alongside at apps/api/library/<id>.<ext>. Both dirs gitignored.
D26Covers extracted server-sideEPUB: OPF manifest cover image. PDF: render page 1 to a JPEG thumbnail. Missing cover → typographic fallback tile in the UI (see design.md).
D27wiki/design.md is the enforced design system ("Quiet Paper") REVISED 2026-08-24 → D33Merged from the Stitch exploration + existing --reader-* tokens. All apps/web work must conform; conformance checklist lives in design.md and is enforced via CLAUDE.md.
D28Platform password via APP_PASSWORD env REVISED 2026-07-08 → D30 (the platform password of 2026-07-07; revised D2)Single shared password, no accounts. API-enforced onRequest guard; stateless token = sha256hex(password) via Authorization: Bearer or ?token= (cover <img>s can't send headers); token persisted in localStorage; env unset → auth off + loud startup warning (dev stays frictionless) REVISED 2026-07-08 → D29: APP_PASSWORD is now required; there is no open mode. Token redacted from request logs. No expiry/rate-limit/sessions — single-user tool.
D29Env is validated + required at startup (2026-07-08; revised D28's open mode; APP_PASSWORD since removed from the contract by D30 — the remaining vars PORT/HOST/MAX_UPLOAD_MB/CONVERT_JOB_TIMEOUT_MS and the three WARD_* are required + validated in config.ts; CONVERT_TIMEOUT_MS was dropped 2026-10-03, with the synchronous convert route D34 retired)All .env vars are now REQUIRED, not defaulted. The API validates them with a zod schema at import (apps/api/src/config.ts) and vite.config.ts checks VITE_API_URL; any missing/blank/malformed value aborts startup (process.exit(1) / thrown) with a clear message — no silent fallback. Removes the old "APP_PASSWORD unset → API open" path (the foot-gun that motivated this: the app booted open with an empty library and never prompted). Single root .env, loaded via process.loadEnvFile (API, best-effort so a process manager can inject vars instead) + Vite envDir (web); .env.example documents the full contract. Optional deploy overrides LIBRARY_DATA_DIR/BASE_PATH stay non-required.
D30Per-user accounts replace the shared platform password SUPERSEDED 2026-09-06 → D53 (atrium moved to Ward; every mechanism below is deleted); REVISED 2026-10-13 → D58: accounts are atrium's own again, with Ward as a linked second way in (built on Ward's vendored library, not on the mechanisms below) (2026-07-08, commit 7caaa42; revises D2/D28/D29)The shared APP_PASSWORD is gone. Auth is now per-user: operator-seeded accounts (no self-registration — apps/api/scripts/seed.ts, copied from seed.example.ts; passwords scrypt-hashed with a per-password salt in password.ts), opaque server-stored sessions (sessions table; login trades username+password for a random 32-byte token via POST /auth/login; /auth/logout revokes it). Clients present the token as Authorization: Bearer <token> or ?token=<token> (cover <img> tags can't send headers). An app-wide onRequest guard (registerAuthGuard) rejects any non-allowlisted request without a live session (401); allowlist = POST /auth/login, GET /auth/status, GET /health, OPTIONS. Auth is always on (no open mode; /auth/status always returns {required:true}). Unknown-username login spends a dummy scrypt hash so timing can't reveal account existence. The library is still shared across users (no per-book ownership); only identity + reading progress are per-user (D31). APP_PASSWORD removed from the env contract (D29).
D31Per-user reading progress + exact resume position (2026-07-08, commit 207cf7b; revises D9 for position, and the books.progress column of D24)Reading progress + the exact resume position are per-user, not global. reading_progress table: (user_id, book_id) PK → progress (0..1, drives the cover bar) + locator (opaque resume position: PDF page number string / EPUB CFI) + updated_at, both FKs ON DELETE CASCADE. GET /library merges the caller's progress rows into the shared book list; PATCH /library/:id/progress upserts the caller's row (a null locator is COALESCE-preserved so a bar-only update can't wipe the saved position). Supersedes D9's "reading position is session-only" (theme/font/chrome state stays in-memory) and the legacy global books.progress column. On open, each reader resumes from the user's saved locator (per-user, from the library) or the start.
D32The product is "Atrium", a media gallery + Notes (2026-07-20; evolves the D27 design system)Renamed from "ebook-reader" → Atrium; it's a media gallery (books/music/video) with a Notes tab, not a book reader. User-facing surfaces (wordmark, <title>, PWA manifest, favicon, README, root package name, design-system name) are renamed; the internal npm scope @ebook-reader/* and the books/library code nouns are deliberately kept (renaming = ~40-import churn + native-module reinstall, zero user value). Design evolved not pivoted (D27): the calm/serif/tonal system stays; book-only metaphors dropped; --paper*/--reader-* token identifiers retained (renaming churns every className). IA is per-type areas (/books /music /videos /notes + /→/books) via nav tabs, replacing the single unified gallery + in-header media-type filter; per-media card shapes (book 2:3, music square, video 16:9). Notes (2026-07-20): per-user paged notebooks stored server-side (notes table), vector ink via perfect-freehand (pinned, self-hosted — no whiteboard SDK), ink + movable text boxes, online-only v1. Deploy sub-path cutover (2026-07-20): the public path is now /atrium/ (was /ebook-reader/) — a vps-deploy config change only (the web app is fully BASE_PATH-parameterized, zero app-code churn); the API server dir / pm2 name also move to atrium-*. localStorage survives (origin-keyed → no logout); the installed PWA re-scopes. See the vps-deploy teardown phase for the one-time server migration.

| D33 | "Reading Room" replaces Quiet Paper as the enforced design system (2026-08-24; revises D27 and D32's "evolved not pivoted" clause; retires library grouping's grouping UI) | Chosen from three costed directions after a mockup review — see the design study. Rejected: Vault (near-black, cinematic, artwork-as-palette — strongest for mixed media and the only one that made music a first-class citizen, but a full repaint that also forced the reading themes to be redesigned, ~7–9 briefs); Index (dense keyboard-first archive on a command bar — fastest at scale, but cover art all but disappears, and the library isn't yet large enough to need it). Reading Room fixes the same four IA faults for roughly half of Vault's cost while keeping the warm, typographic character the product already had. What it locks: (a) one home, no tabs — kind is a filter chip with a count, not a route, reversing D32/the per-type areas's promotion of a filter to navigation; (b) Continue is the hero, labelled in time remaining; (c) tint carries kind — four paper tints replace format badges as the primary kind signal; (d) playback persists in a dock that survives navigation (borrowed from the rejected Vault — a genuine capability gap, not paint); (e) type is Newsreader + Archivo, retiring Playfair Display, Source Serif 4 and Inter (three self-hosted families → two, a payload reduction); (f) dark goes warm (#141310, not #181818) so cover art doesn't read sour; (g) Notes stays its own destination, outside the media grid — a notebook is authored, not collected; (h) Shelves ⇄ Stacks grouping is removed (library grouping's UI; its backfilled author/series/subject columns stay populated and feed search + chips instead). The --reader-* three-theme architecture and the --paper/--ink/--accent token identifiers survive unchanged (D32's no-churn principle). Motion idiom is Motion Primitives, with anime.js only on the progress rail; SmoothUI rejected as a near-total overlap with Motion Primitives. |

| D34 | Convert is symmetric, library-attached, and produces a readable linked row (2026-08-24, the convert work of 2026-08-26; revises D1 and D15) | Grilled with the owner over five rounds. Convert is now one verb for either direction — PDF→EPUB or EPUB→PDF. A conversion is its own books row linked to its source by converted_from, not an alternate file on the source's row: per-format resume positions and "which format did I last use" then fall out of the existing reading_progress rows for free, the reader needs no variant parameter (you just open a different book id), and a third format later is another row rather than another column pair. The cost is one FK plus WHERE converted_from IS NULL on three list statements — and since search is client-side over the loaded list, search/grouping/chips/counts inherit the hiding for free, so one book stays one card. Revises D1 ("EPUB→PDF is export-only, never a reading path"): D1's reason — "conversion discards reflow" — is direction-specific and inverts for PDF→EPUB, which adds reflow, so a converted book is now read in-app. The stateless /convert route, its temp-file machinery, and the web convert client are retired; the EPUB reader's Download-as-PDF is reimplemented as convert-then-download, losing no capability. Revises D15 (60s synchronous, no queue): conversion is an async job with a 24-hour ceiling — a last-resort reaper, not a UX guard — cancellable, one at a time per account (a refusal, so "no queue" survives), reaped to failed on restart rather than auto-resumed (auto-resume turns one bad row into a boot loop). The client polls at a flat 30s driven by the row's status, not a client-side started-it flag, which is what makes "start it, refresh, come back hours later" behave identically. Rejected: one row with a sibling file (needed a locator column, a last-variant column, and a variant param threaded through the reader); a separate "reflow" term for the new direction (the owner wanted one word); a 10-minute ceiling; tapered polling. Quality caveat, recorded because it is the reason the source stays reachable: Calibre's own manual calls PDF "a really, really bad format to use as input" with output "anywhere from decent to unusable" — multi-column interleaves, headers/footers pollute the body, no OCR. Hence: never auto-convert on upload, always keep the source one tap away, and warn (never block) when the output looks scanned. | | D35 | Profiles are an identity boundary inside an account — explicitly not a security one (2026-08-24, the profiles work of 2026-08-25; revises D30, D31 and D9; amended 2026-10-13 by D58 — unchanged: profiles stay inside an account, and the account is now a local user again, whose id is the old Ward subject for every account that existed under D53; amended 2026-09-06 by D53 — profiles survive intact and stay atrium's, but the account above them is now a Ward subject and the active-profile column moved to profile_selections) | Owner's framing: "an account is like a household, while profiles are for different persons from the household. They can change freely the profile." So an account is the household and keeps being the security boundary (D30's scrypt + opaque sessions, unchanged); a profile is a person in it. Free switching — no password, no PIN — means anyone holding a live session can become any profile on that account; this is the design, not a gap, and it is recorded because the tempting later mistake is to treat a profile as a permission. Housemates needing real separation need a second account. Revises D31: reading progress and the resume locator move from user scope to profile scope (a reading_progress rebuild — SQLite cannot ALTER a composite PK); revises D30's "only identity and progress are per-user" to add notes and preferences; the library stays shared across profiles as it is across users. Revises D9 ("display state is device state") for preferences only: theme, font settings, page mode and TOC sidebar move server-side into one JSON blob on the profile row, so they follow a person between devices — mirrored to localStorage as a synchronous boot cache, since a server-fetched theme otherwise paints wrong and snaps. Reading position stays D31's locator, not a preference. Why not just more accounts? D30 already gives multi-account + shared library + per-user progress; the entire delta is friction — one tap versus a password, a button versus scripts/seed.ts over SSH — and on a shared tablet that friction is the whole feature. Rejected: a per-request profile header (media tags cannot send headers — the codebase already fell back to ?token=, so it would need a query-param twin); minting a token per profile (logs other tabs out); always showing the picker (a tax on the 90% of loads that are one person on their own phone) and never showing it (a tablet with no session expiry silently attributes everyone's reading to whoever used it last — hence the 24h idle re-prompt, measured device-side). Cap of five profiles; offline blobs stay device-scoped; no kids/content-restriction concept. |

| D36 | Atrium is a personal cloud space, not a media gallery (2026-08-24, the first LaTeX plan of 2026-08-26; supersedes D32's framing clause) | Owner, on why LaTeX belongs here: "it is in Atrium for the same thing as notes. Maybe you are on the road and want to sync what's on your phone with what's on pc and vice-versa. It's like a personal cloud space." D32 called the product "a media gallery + Notes". Notes was the first thing that didn't fit "gallery"; LaTeX is the second, and two is a pattern — so the premise is recorded as your stuff, reachable from anywhere: media you collect plus documents you author. Practical consequences: authored destinations (/notes, /latex) sit outside the media grid and always will (D33's rule generalizes); a third authored thing needs no further premise debate; and PRODUCT.md is rewritten in the first LaTeX plan (2026-08-26) rather than drifting a third time. Rejected: a separate app sharing the design system — it would mean re-solving auth, profiles, deploy and design for one user. Everything else in D32 (the name, the kept internal book/library nouns, the /atrium/ deploy path) stands. | | D37 | LaTeX runs server-side on Tectonic; drafts and published documents are different things (2026-08-24, the first LaTeX plan of 2026-08-26; engine clause revised by D38) | ⚠️ The engine half of this decision is superseded by D38 (2026-08-26) — Atrium compiles LaTeX with its own TypeScript engine, not Tectonic. Everything below about drafts, publishing, versions and the editor still stands. The original engine reasoning is kept because it is what D38 had to answer. Grilled over three rounds. Engine (superseded): server-side Tectonic — a single self-contained binary that downloads packages on demand (~75 MB image) rather than a ~5 GB TeX Live install. Chosen on precedent and payload: D5 already accepts a binary dependency for a core capability, and the app's entire initial JS is 123 kB gzip after the work of 2026-07-13 spent their effort trimming it, so shipping a WebAssembly TeX engine to a phone reverses that work. Rejected: SwiftLaTeX/WASM — it buys offline compilation nobody asked for (v1 is online-only, matching Notes/D32), costs multiples of the whole 3 MB precached shell on the device least able to afford it, and is AGPL-3.0. Sandboxing is spec, not afterthought, because running code is what TeX is: shell escape (\write18) explicitly disabled rather than trusted to a default, every project path confined to its project directory (no absolutes, no .., no symlinks out), a short hard wall-clock timeout (a compile someone is waiting on has no reason to run long — unlike D34's 24h conversion ceiling), and a capped artifact size. Draft vs published: a draft is the live project, lives only in /latex, and is never shown in the gallery. Publishing compiles, refuses to publish a failing document, and produces one library entry that accumulates versions — pressing publish ten times gives ten versions on one card, never ten cards. Each version stores its PDF and a zip of the whole project, so a version can actually be rebuilt (figures included); books.file_path tracks the newest version so every existing consumer — file route, offline download, reader — works unchanged, with ?version= selecting an older one. A new version starts at page 0; reading_progress gains a nullable version_id so a stale locator is never applied to the wrong version (no PK rebuild). Deleting a version removes its files; deleting the library entry removes all versions; deleting the draft leaves the published entry alone — publishing is the act of making something independent. v1 is deliberately three features (multi-file projects, compile + preview, diagnostics with file and line); autocomplete, SyncTeX, collaboration, templates, rich-text and bibliography tooling are all out. Editor is CodeMirror 6, not Monaco (~10× the entry chunk for one destination, and not touch-credible) — phone support is light edits, not authoring. | | D38 | Atrium compiles LaTeX with its own TypeScript engine — a LaTeX subset, not a TeX reimplementation (2026-08-26; revises D37's engine clause) | Owner: "make our own wasm library for parsing Tex and generating pdf's from it. Let's drop the tectonic or other external library idea at all", then "i would like to not introduce another programming language like rust, maybe you can still use javascript?" — so Atrium writes its own engine, in TypeScript, and depends on no TeX at all. The scope line is syntax, not semantics. LaTeX is not a file format but a program: \catcode lets a document redefine what characters mean mid-parse, so there is no parser to write, only a macro-expansion machine that must then execute the LaTeX kernel. Measured 2026-08-26: tex.web is 25,010 lines of literate Pascal and the LaTeX kernel is 79 .dtx files / 4.81 MB before article.cls. Nobody has finished a from-scratch TeX; Typst's team looked and designed a new language instead, which is the decisive precedent. So we accept LaTeX-shaped documents and implement the commands ourselves — the same shape as LaTeX.js (MIT, maintained), which parses a documented subset and implements macros in JS rather than in TeX. This is only defensible because the first LaTeX plan's spec already says the owner has nothing to import: the engine must render what the owner writes, not what CTAN can produce. If a legacy .tex corpus ever appears, this decision is the first thing to revisit. Why TypeScript and why WASM became unnecessary: WASM was only ever needed to run someone else's C — SwiftLaTeX and BusyTeX are Emscripten ports of pdfTeX/XeTeX. Writing it ourselves, a TS library runs natively in Node and the browser with no toolchain, no .wasm, no glue. C was offered and declined: it would mean writing font parsing, PDF emission and math layout from nothing, because the C ecosystem's answer to all three is TeX. Rust was declined by the owner (no second language) and would have bought only speed. The JS stack carries the parts that are not the engine — @unified-latex (AST), fontkit (glyphs, subsetting), pdfkit (PDF bytes), hypher (hyphenation), mathjax-full (math). We write the parser bindings, macro layer, document model, box-and-glue layout, line and page breaking, and the diagnostics. The engine is a pure function with no I/O, which deletes D37's sandboxing spec rather than implementing it: \write18 cannot execute because no shell escape is written, and \input{/etc/passwd} cannot read anything because there is no filesystem — \input resolves against an in-memory file map or it is a diagnostic. What replaces the wall clock is a deterministic step budget (reproducible where a timer is not), plus output-size and page-count caps. The loud-failure contract is the spine: an unimplemented command produces a diagnostic with file and line saying so — never a silent skip, never a guess. A subset engine that renders quietly-wrong output is worse than no engine, because a dropped \thanks is a missing footnote in a published document. Costs accepted: the engine foundation (2026-08-26) is milestoned work, not a week; the repo gains its first test suite (golden layout dumps, not PDF bytes) because a typesetting engine without them is unmaintainable; and math ships as MathJax SVG embedded via our own SVG-path→PDF emitter, with TeX's own mlist atom-class layout deliberately deferred. Rejected: Tectonic (D37 — MIT, 10 MB binary, but XeTeX-only and a runtime dependency); MiKTeX (all three engines plus on-demand packages, but a system install with a shared package tree); TeX Live (apt's is 2021; full image 7.04 GB); SwiftLaTeX (its package server texlive.swiftlatex.com has no DNS and texlive2 returned HTTP 522 on 4/4 attempts on 2026-08-26, so it cannot compile at all without self-hosting an unmaintained 2022 server); BusyTeX (maintained, TeX Live 2026, but ~32 MB WASM + 90–400 MB of data, AGPL-3.0); and Typst (single Apache-2.0 binary, excellent — but it is not LaTeX, and the owner asked for LaTeX). | | D39 | Storage paths are derived, not stored; all three storage roots are redirectable (2026-08-27; closes every entry then open in open-questions.md) | Three problems, one cause: the API persisted absolute filesystem paths in books (file_path, cover_path) while two of its three storage roots — LIBRARY_FILES_DIR and THUMBNAILS_DIR — resolved from the API package's own location with no override, so LIBRARY_DATA_DIR sandboxed the database and nothing else. Pointing a test at a copied database therefore reached the real files, which is how the convert work's verification permanently destroyed one of the owner's books (2026-08-25; recovered only because a byte-identical orphan happened to be on disk). The mitigation until now was a practice — upload a throwaway fixture, never touch a pre-existing row — re-learned by each future agent from a comment block, which is not a control. The fix is both halves. All three roots become optional env overrides (deploy/test only, deliberately not added to D29's required contract), and every path is derived: an original from id + format, a cover from converted_from ?? id — the linked-row relationship D34 created, which already encoded cover ownership and so needed no new column. This was cheap because every write already derived its path; only reads consulted the column, making it a cache of a pure function whose sole capability was to disagree. It also fixes the portability bug open since 2026-07-07 (rows from an old checkout pointing at paths that no longer exist, unable to self-heal because file_path was NOT NULL). cover_path is dropped outright and hasCover becomes a disk check, so the database cannot drift from the disk — which deletes reconcileMissingCovers and clearCoverPath, machinery that existed only to repair a drift that stops being representable. Cost accepted: one stat per book per GET /library, a few milliseconds against a warm page cache, in exchange for removing a bug class. Also settled here: the offline store's persisted fraction is renamed to progress (IndexedDB v5), ending a two-name split that glossary.md had already resolved on paper; rejected was deferring it to "the next migration", since nothing scheduled one — that is the status quo wearing a note. | | D40 | Video covers are decoded in the browser, not by a server binary (2026-08-27, video covers of 2026-08-28; narrows the media library's apparent "no video covers") | Video was the only kind with no real cover. The media library (2026-07-16) reads as no video covers, ever, but what the owner actually declined was the ffmpeg binary dependency — server-side frame extraction was simply the only route on the table then. So this does not reopen that call; it takes a different route to the same feature. mp4/webm are accepted formats precisely because the browser plays them (D12, extended by the media library of 2026-07-16), so the uploading browser is already a video decoder: object URL → <video> → seek → drawImage → toBlob. No server binary, so the declined-ffmpeg decision stands. Capture happens in two places — at upload (~3 candidate timestamps, keep the highest luminance-variance frame, because one fixed seek lands on a black fade-in or a title card often enough to matter) and as a backfill on first playback. The backfill is not redundancy: it is what covers the existing library with no re-upload, and it is the iOS Safari mitigation — if an iPhone cannot paint a frame at upload, the cover appears the first time anyone plays that video on any device, where upload-only would leave both holes permanently. POST /library/:id/cover is last-write-wins, a dumb generic setter re-encoded through the existing sharp path (never storing client bytes as-is); the client guards on hasCover. Rejected: only-if-absent with a 409 — it blocks a legitimate replace to defend against a client bug, and forecloses a later "pick a different frame" affordance. The trust boundary is recorded as a non-question so it is not re-asked: books has no user_id, the library being install-wide with only progress and notes scoped (D35 — the account is the security boundary), so setting a cover is strictly less privileged than the delete route already unscoped; there is no ownership to check. A free win rides along: extract.ts gated embedded-picture extraction behind format === "mp3", discarding the covr atom music-metadata already parses for mp4. Split out: making coverless tiles distinguishable is coverless tiles (2026-08-29), deferred deliberately — it trades against D33's "tint carries kind", and is best judged once real covers exist. | | D41 | Math is MathJax v4's SVG output, gated down to the math work's declared subset (2026-08-29; revises D38's math clause) | D38 said math would ship as MathJax SVG via mathjax-full (3.2.2, 34.3 MB). Two things changed on measurement. The package is mathjax@4.1.3, not mathjax-full — mathjax-full never left beta on its 4.x line, so 3.2.2 is a frozen branch, while mathjax 4.x is the maintained distribution and exposes the same TeX→SVG conversion through init() + tex2svg() in Node. The real footprint is ~70 MB on disk, not 34.3 MB: mathjax is 20 MB and pulls @mathjax/mathjax-newcm-font at 50 MB. That is worse than the number the owner hesitated over and is recorded rather than glossed — but only ~1 MB actually loads (@mathjax/mathjax-newcm-font/svg.js); the bulk is duplicate mjs/cjs builds and the CHTML output this engine never uses, and it is server-side only, so the browser payload is still zero. The font improved by accident: v4 defaults to New Computer Modern, and the engine's text face is Latin Modern — both Computer Modern derivatives, so math and text sit together better than v3's MathJax-TeX font would have. fontCache: "none" inlines <path> data, so the SVG→PDF emitter needs paths and transforms but no <use>/<defs> resolution, which is a chunk of the math work's spec that simply disappears. The gating is the real decision. MathJax happily renders things the math work (2026-08-29) declared Out — \begin{cases}, \DeclareMathOperator — and it renders undefined macros as red text with no error at all, which would have put a silent wrong answer inside the one contract (D38's loud-failure spine) the engine exists to keep. Dropping MathJax's noundefined package turns those into catchable Undefined control sequence errors via the tex.formatError hook; on top of that, math is gated to the declared scope and anything outside it is a diagnostic, even when MathJax could have drawn it. Rejected: accepting MathJax's whole surface — it is cheaper and more capable, and it was the recommendation, but the owner chose the gate: a subset engine whose subset is not precisely knowable cannot honour D38's promise that an unimplemented construct says so, and "it happened to work" is not a contract. The cost accepted is a maintained allowlist and refusing constructs that demonstrably render. | | D42 | Coverless tiles vary by title initial — size and corner — and never by the ground (2026-08-29; interprets D33 rather than revising it; second axis corrected the same day) | D33 made tint carry kind, so the tempting fix for a wall of identical coverless tiles — a title-hash hue — would dilute the exact signal the tint was chosen for. Rejected on that ground. The shipped answer is a large, very low-contrast title initial bleeding past a tile edge, with its size and its corner varying by a deterministic hash of the title (six variants). Two axes, because an initial alone repeats quickly across a large collection — but both axes are on the letterform, and the tile's ground is untouched, so D33's tint test passes by construction. The original second axis was the ground's lightness, and it was measured and rejected within the day — that measurement is the durable part of this entry. Reading Room's kind tints are near-achromatic warm and cool greys (chroma 0.011–0.017), so the kind signal is inherently tiny: the closest pair, tint-book vs tint-music, sits 0.0194 apart in OKLab. A lightness ladder wide enough to separate two tiles swamps it — at the 20% mix first built, a single kind's own spread came to 0.1871, nearly ten times the distance between two different kinds. A grid would have read by lightness and not by kind: the exact D33 inversion coverless tiles (2026-08-29) exists to prevent. Sweeping the range found no working value — by 4% the spread (0.0374) still beat the kind signal while the per-step difference (0.0094) had already dropped below visibility. The window is empty because of the palette, not the arithmetic, and it stays empty until the tints themselves gain chroma (which is a D33 change, not a brief-43 one). The general rule this leaves: on a coverless tile, vary the foreground; anything that moves the ground competes with kind, and against this palette it wins. A process note worth keeping: the first build reported the tint test as passing, having checked swatches grouped by kind — same-step across kinds, and same-kind across steps, separately. That arrangement is precisely the one that hides the failure, which only shows up in the mixed grid the test actually describes. Rejected: a title-hash hue (breaks D33); ground lightness (measured above); a generated geometric mark (most distinctive, most code, most ways to look cheap across two themes). Recorded against the owner's explicit override of the evidence: coverless tiles's own step 1 said to close it if the count was tiny, and the real library holds 5 items, 0 coverless videos and 2 coverless audio rows. The owner chose to build for the library they expect rather than the one they have, so it is designed for scale. | | D43 | The npm audit is triaged on reachability, not on the advisory count (2026-08-29) | Thirteen high-severity advisories went to five, and the five that remain are deliberate, because two of npm audit fix --force's "fixes" are worse than the bugs. Taken: the five transitive no-breaking-change fixes; concurrently (dev-only); and adm-zip 0.5.18 → 0.6.0, which was not on the original list but earned it — extract.ts and convert-jobs.ts both call new AdmZip() on uploaded EPUBs, and an EPUB is a zip, so the crafted-archive 4 GB allocation is reachable from an ordinary upload. Left, with reasons: pdfjs-dist via pdf-to-img — the advisory is arbitrary JS execution on a malicious PDF, and pdf-to-img sets isEvalSupported: false, which is that advisory's documented mitigation, so it is not reachable; the only "fix" is a pdfjs 5→6 major bump under a package pinning ~5.6.205, and a blanket override would also drag react-pdf's own pdfjs (5.4.296, below the vulnerable range) across a major version and put the PDF reader at risk for nothing. And @xmldom/xmldom via epubjs/react-reader — both are already at their latest published versions, npm's suggested remedy (react-reader@0.20.4) is a downgrade across a major version of the EPUB reader that the EPUB reader, its parity pass, its open-cost fix and its Reading Room pass all ride on, and the flaw is XML-serialisation injection/DoS running client-side, in the reader's own browser, on books that reader uploaded themselves. Why this is written down: a bare advisory count invites the same forced upgrade every time someone runs npm audit, and re-deriving "this one is unreachable, that one is a downgrade" costs more than reading it. Revisit when react-reader publishes an epubjs 0.4.x line, or when pdf-to-img moves to a patched pdfjs. | | D44 | A note exports to PDF server-side, not from the browser (2026-08-30 | apps/web carries no PDF-writing library and three rounds of work on 2026-07-13 were spent trimming its payload, so adding one there pays a permanent browser cost for an occasional action. The server already had pdf-lib in the tree via @ebook-reader/typeset, and the math work of 2026-08-29 had already solved SVG-path→PDF once for MathJax output — the same problem, already answered in this repo. The editor's ×1000 viewBox ink is a vector description of the page, so nothing needs rasterising. Rejected: a client-side PDF library (payload, on a codebase that has spent three briefs shrinking it); routing note export through the LaTeX engine (it sets documents from LaTeX; a note is not one — borrow the emitter's approach, not its pipeline). PNG stays client-side, because the browser already holds the geometry and it needs no dependency on either side. The cost accepted is a second copy of the stroke-outline logic on the server, which the ink tools of 2026-08-30 then removed by hoisting the nib parameter table into packages/shared. | | D45 | An unknown ink tool reads back as pen, and that read is lossy (2026-08-30 | Widening the NOTE_TOOLS enum means a client on an older bundle meets a note it cannot parse, and a note that will not open is worse than a note that lost a nib style — so noteToolSchema is z.enum(NOTE_TOOLS).catch("pen"). The cost is real and was chosen with eyes open: notes-api.ts parses through noteSchema on every fetch and the editor autosaves from the parsed value, so a stale client that merely opens and touches a fountain-pen note rewrites it to pen permanently. This app precaches its bundle in prompt-mode (since 2026-07-16), so stale bundles are the normal state until a user accepts the update prompt — this is not a rare path. Rejected, and it was the recommendation: z.string() on the field plus a render-time lookup, which renders an unknown nib as pen while writing the original value back untouched, at the cost of a looser type at the schema boundary. The owner chose the enum. Revisit if anyone reports a nib silently reverting. A second ordering point was offered and not taken: shipping the tolerant parse in its own release before widening the enum, so cached bundles are protected first. | | D46 | Orphan thumbnails are reaped by a sweep on API startup (2026-08-30; runs against the grain of D39) | D39 deliberately deleted reconcileMissingCovers — the opposite direction, a row pointing at a missing file, stopped being representable once cover paths became derived. This is the surviving direction (a file with no row) and it needed its own small thing rather than a revival of that one. The trigger was an owner override of a safety recommendation, which is why it is recorded. An on-demand admin route was recommended, on the ground that a startup sweep deletes files on a boot nobody intended — the exact shape of the 2026-08-29 incident, and of the 2026-08-25 loss before it. The owner chose the startup sweep for self-healing with no ceremony. The guards are therefore load-bearing, not polish, and must not be optimised away: the keep-set is built from every row mapped through coverOwnerId (a converted book and its source share one thumbnail, so a filtered list deletes a live cover — and listBooks does filter conversions); only <id>.jpg names are ever deleted; a throwing query, a throwing directory read, or an empty keep-set against a populated table all delete nothing; and every deletion is logged by name. | | D47 | apps/api is modules → controller/service/model, and its data layer is Knex over better-sqlite3 (2026-08-30; revises D24's synchronous-API clause) | Owner's request, in two halves. The layering half is uncontroversial: 18 flat files became src/modules/<domain>/ (auth, profiles, library, catalog, notes, latex), each a controller that owns only HTTP, a service that owns the rules, and a model that owns the SQL — plus src/database/, src/common/, and app.ts split from index.ts. The 2,210-line db.ts is gone; it had held every row type, all 63 queries, the schema, every migration and the boot reapers, and it ran the lot as a side effect of import. The Knex half was flagged as a conflict before any code was written and the owner chose it anyway, which is why this entry exists. D24 named the synchronous API as its reason and Knex has no synchronous mode, so all 63 data functions became async and await propagated through every caller. The driver did not change — Knex runs on better-sqlite3, so its calls still execute synchronously on this thread inside the promise; what changed is that suspension points now exist between statements. That is the real cost, and it was not theoretical: three correctness properties held only because two statements could not be interleaved. (1) The conversion single-flight (D34 decision 6) read getRunningConvert() then wrote markConvertRunning(); two concurrent requests would both have started ebook-convert. Fixed by moving the decision into SQL — claimConvertSlot() is one atomic UPDATE … WHERE NOT EXISTS(…running…), so the answer no longer depends on scheduling. (2) The compile single-flight had the same shape; fixed by making the in-process claim the guarantee, with the check and the jobs.set in an explicitly marked region containing no await. (3) cancelAndSettleLatexCompile reads job.done, which was assigned after the status write — leaving a window where a live job's promise was null, so the delete path returned immediately while reporting that it had waited, then rm -r'd a tree the compile was about to recreate. Fixed by scheduling inside the atomic region. One window was accepted rather than closed and is documented at releaseCompileRow: the in-process slot frees before the row write lands, so a request arriving in between gets a stale, retry-able 409 — closing it would mean freeing the map only after the write, which reopens the convert work's Critical (a throwing write leaving the slot claimed forever). The migration story is one idempotent baseline, because there was never a numbered history to replay: db.ts ran CREATE TABLE IF NOT EXISTS plus hand-guarded ensure* calls on every boot, so a live database is already migrated with nothing recording that fact. Migrations after the baseline are ordinary forward migrations and must not be idempotent. Migrations are static imports, not a scanned directory (a directory source picks a loader by extension, which breaks across .ts in dev and .js in dist/), and the pool is pinned to one connection (foreign_keys is per-connection; knex.transaction() holds a connection — one connection is what restores the exclusivity better-sqlite3 gave free). Rejected: doing the layering first and Knex as a separate brief (recommended, on the ground that apps/api has no tests, so 440 KB of rewritten call sites are verified by typecheck and manual exercise alone — the owner chose one pass); using Knex only as a query builder with .toSQL() executed synchronously through better-sqlite3, which would have preserved D24's property at the cost of losing Knex's transactions and migrations. The honest caveat: this was verified, not tested. Fresh-database and live-database-copy migrations were inspected column by column, 128 live requests exercised every route group, and the two single-flight guards were confirmed under six-way concurrency — but none of it is committed as a suite. apps/api having no tests is now the largest gap in the repo, and it is much cheaper to close than it was. | | D53 | Identity moves to Ward; atrium keeps profiles and nothing else REVISED 2026-10-13 → D58 (accounts and sessions are atrium's again; the guard shape, the dropped ?token= and the profiles below all stand) (2026-09-06; supersedes D30, amends D35, D29 and D9's log-redaction note) | Atrium no longer authenticates anybody. The users and sessions tables, password.ts, auth.service.ts, auth.model.ts, auth.controller.ts, scripts/seed.ts, GET /auth/status, POST /auth/login and the whole shared auth contract in packages/shared are deleted. Identity is Ward (wzd_auth/corpus/wiki/overview.md): the browser holds a ward_session cookie at Path=/ on the shared origin, and an app-wide onRequest guard verifies it locally (EdDSA, pinned algorithm, JWKS from /ward-api/.well-known/jwks.json) then asks Ward whether the session is live, caching that answer 30 seconds. Atrium's rule that no route does its own auth survives unchanged — that shape was the good part of D30. Three outcomes, three codes, and the middle one is new: 401 (no/dead session → the client navigates to /ward/login?next=/atrium/), 403 (a live Ward session holding no atrium grant — a grant is the estate's security boundary, so an account alone confers nothing; this must not redirect, because signing in again cannot fix it), and 503 (Ward unreachable, or atrium's own app key refused — the request fails closed, and is deliberately never reported as "signed out"). ?token= is gone, and its deletion is the concrete payoff of the one-origin topology: it existed only because cover <img> and <audio>/<video> tags cannot send an Authorization header, and a Path=/ cookie is sent on those requests automatically — so a session token no longer appears in any URL, browser history or request log, and app.ts's redaction serialiser went with it. Profiles are untouched (D35 stands): they stay atrium-local, Ward does not know they exist, switching still needs no password, and only their key changed — profiles.user_id → profiles.subject. The active profile was sessions.active_profile_id, and there is no sessions table now, so it moved to profile_selections (subject, sid) keyed on the token's refresh-family claim, which preserves per-device switching exactly. "Every account has a profile" became lazy: it was a boot sweep over users, and atrium cannot enumerate Ward's accounts — Ward reports who this request is, never who exists — so the guard provisions a Default on a subject's first request, which is also the only moment atrium can observe a superuser having issued a grant. Atrium hand-writes its Ward client (modules/ward/) rather than importing a shared package; see wzd_auth/corpus/wiki/integrating.md for the contract and why. This migration destroys every atrium account, by decision — the estate chose a full prune over a mapping that would have had to be invented at cutover time, and the cascade takes profiles and everything under them. Take a database copy first; there is no down that can bring a password hash back. Owner, 2026-10-04 (the cutover prune's gate): the rows the cutover orphaned are pruned as written, after a copy of the production database; re-pointing them to the new Default profile was offered and declined. | | D54 | Development runs on one origin, like the deploy (2026-09-27, option A of the local dev loop, built 2026-10-03; revises D14; amended 2026-10-13 by D58: the /ward + /ward-api proxy is gone, the /atrium-api one stays and carries Ward's callback) | D14 chose CORS and an explicit VITE_API_URL with no Vite proxy, for an explicit, deploy-ready base URL. That reason predates D53: the deploy is one origin and the session is Ward's cookie, and cross-origin development diverges from it exactly where it hurts. The browser refuses credentialed responses without Access-Control-Allow-Credentials, Ward's ?next= only returns to a path on its own origin, and Ward refuses /refresh and /logout from any Origin but its own. So the web dev server now serves the app under /atrium/ (BASE_PATH) and proxies /atrium-api to the API with the prefix stripped, as Caddy's handle_path does, and /ward + /ward-api to WARD_PUBLIC_ORIGIN, locally Ward's container in wzd_auth/infrastructure/local. VITE_API_URL stays explicit and absolute (http://localhost:5173/atrium-api), which keeps D14's one real benefit and leaves the deployed bundle unchanged. The proxy rewrites Origin to Ward's only for requests from a page on the dev server itself; anything else keeps its Origin and Sec-Fetch-Site, so Ward's same-origin check still refuses cross-site requests. Rejected: option B, keeping D14 with a credentialed CORS allowlist and a configurable Ward origin (VITE_WARD_ORIGIN): dev stays cross-origin unlike the deploy, the login origin needs app code, and refresh and sign-out would still fail Ward's same-origin check. Rejected in advance by the brief: a dev-only auth bypass, which is a switch that turns authentication off. Chosen by the owner for every Ward app in the estate at once. | | D55 | The Discord bot is its own Ward account, and its jukebox role is an allowlist atrium enforces (2026-10-08, grilled with the owner; the first role atrium reads; amended 2026-10-13 by D58: the role is one string in atrium's own account row, jukebox or full access, and the bot needs a local jukebox account it signs into with POST /atrium-api/auth/login, since atrium no longer reads Ward's cookie) | just-a-bot plays atrium's music (the Jukebox, glossary-jukebox.md), so it needs a credential atrium accepts. The owner asked that the bot "can only use its own profile". A profile is not a security boundary (D35), so that only holds if the bot has its own Ward account. It signs in without a browser through Ward's existing /login and /refresh: the refresh token travels in the JSON body, and Ward lets requests with no Origin through on purpose. It has to log in again at least every 30 days, because a refresh family's lifetime is absolute. Its atrium grant carries the role jukebox, and atrium treats an account whose only atrium role is jukebox as a route allowlist. It may list music, stream a Track's file and cover, and call the bot-facing Jukebox endpoints. Every other route returns 403, including uploads, deletes, notes and profile switching. Why the allowlist: the library has no owners. DELETE /library/:id checks nothing, so a full grant would let a leaked bot password wipe the library. Until this decision any non-empty atrium grant meant full access and requireAtriumRole() had no caller. Rejected: a profile inside the owner's account, because the bot would hold the owner's session and could read their notes. A full grant, for the reason above. A secret that only atrium knows, because it reverses D53's "atrium authenticates nobody". A new long-lived machine token from Ward, which is cleaner but is a Ward feature nobody else needs yet. Revisit it if a second headless client appears. | | D56 | The Jukebox's Playlist is the music library, not a list anyone curates (2026-10-08, grilled with the owner) | The owner wanted a Winamp-style page where people upload songs, delete songs and step through them, and said the playlist is "the list of songs available to the discord bot". They also said the bot plays anything in the music library and nobody manages a separate list. Both hold only if the Playlist is the library. So there is no playlist table. A Player walks every audio item in artist, album, track-number order, or shuffled, and its Queue is the only list people edit. Consequence chosen with eyes open: delete on the Jukebox page is the ordinary library delete. The Track is gone from the home grid and for every account. The Jukebox page asks for confirmation first; the home grid's own Remove has none today (LibraryHome.tsx calls the delete straight from the tile menu). Upload there is the ordinary library upload, MP3 only. Rejected: a per-Player playlist like a real Winamp list, where delete only removes the entry and the file stays. It is safer, but someone has to fill it, which is the curation the owner said nobody does. Revisit if the library grows music nobody wants on Discord. A "hidden from the Jukebox" flag on a library item is the cheap first step, before a real list. | | D57 | Atrium owns every Player's state, and the bot long-polls for commands (2026-10-08, grilled with the owner) | The Jukebox page has to steer a bot that accepts no incoming connections. just-a-bot has no port and no Caddy route, and its deploy stack says so on purpose. So atrium keeps each Player in SQLite: voice channel, current Track, position, paused, shuffle, repeat, Queue and play history. The bot keeps one request open to atrium, and atrium answers it as soon as a command arrives. The bot reports its status on its own requests, and asks atrium which Track is next. Discord's slash commands go through atrium's API too, so a Player has exactly one writer and survives bot restarts and deploys. The page polls every 1 to 2 seconds, the pattern atrium already uses for compile status. Audio does not travel on this connection. The bot fetches each Track from GET /library/:id/file on its own request. A skip must never wait behind megabytes of audio, and the long-poll answers one command and ends. Rejected: the bot owning the Queue and holding a WebSocket that atrium relays. It is instant, but atrium has no realtime channel, and the Queue would vanish on every bot deploy unless the bot saved it to its JSON files. Also rejected: the bot opening a port for atrium to call, which undoes its no-inbound property and adds a second credential to manage. | | D58 | Accounts are atrium's own again; "Sign in with Ward" is a linked second way in (2026-10-13, Ward's estate-wide decision in wzd_auth/corpus/wiki/decisions-oidc.md, built by Ward's the Gutenberg discover page of 2026-07-16; revises D30 and D53, amends D35, D54, D55) | The owner wanted every app to have its own login page, in its own design, and to keep working while Ward is down. Atrium's accounts, scrypt passwords, lockout and opaque sessions now live in its own database again, but the code is Ward's shared library, vendored into apps/api/vendor/ward and apps/web/vendor/ward (never edited; upgraded by copying a newer build), so atrium writes no password or session code of its own. The session is an atrium_session cookie, HttpOnly, SameSite=Lax, Path=/atrium-api: narrower than Ward's old Path=/, and still enough for cover <img> and media URLs, because apiUrl() builds every one under the API prefix, so no ?token= returns. "Sign in with Ward" is an OpenID Connect code flow the library finishes, with its callback at /atrium-api/auth/ward/callback; a Ward-originated session is checked with Ward every 30 s, and refused with ward_unavailable while Ward is down, while a password session is never checked. The guard keeps D30's shape: the library's onRequest hook first, then atrium's own (the D55 allowlist, the active profile). Existing data: every profiles.subject became a local user whose id is that subject, linked to it, so no row was rewritten; the column keeps its D53 name, because renaming it would touch every profile query for no change in behaviour. Atrium never stored Ward usernames or roles, so a migrated account is named user-<first 8 characters of the subject> and gets full access (member); it has no password until its owner sets one in Settings. Roles: one string per account: jukebox (D55) or anything else, full access; a first Ward sign-in maps Ward's role the same way. No Register page: accounts come from npm run seed:user or from a first Ward sign-in by someone Ward holds a grant for. Rejected: keeping Ward as the only way in (D53), which makes atrium unusable whenever Ward is; a second database connection for the library, which would block the event loop on SQLite's lock while a Knex transaction is open (it shares Knex's single connection instead); renaming profiles.subject. | | D59 | After the Jellyfin study: no ffmpeg, upload only, 50 MB stays, online metadata only when asked (2026-10-28, grilled with the owner; reaffirms the media library of 2026-07-16 and D15) | The Jellyfin study (2026-10-09, jellyfin-comparison.md) left four questions; the owner answered all four. ffmpeg stays out: no transcoding and no remux; video is what the browser plays (mp4, webm), and D40's browser-made covers stand. Live transcoding would eat a small shared VPS's CPU and grow the image. Upload is the only way in: no watched folder and no import command. D39 derives every stored path from the id, so a folder could only be copied in anyway, and files arrive from any device through the browser. MAX_UPLOAD_MB stays 50: films (1–4 GB) do not go in Atrium. The VPS has about 20 GB free, shared with mail and every app, and nothing is backed up. Metadata comes from the file, plus a lookup the user asks for: a Look up action on one item queries MusicBrainz and the Cover Art Archive for music and Open Library for books (shortlist 6), keyless, never automatic; film lookups need a TMDb key and are out until the owner registers one. Rejected: remux-only ffmpeg; full transcoding; a watched folder; a one-off import command; automatic online matching; a 500 MB or multi-GB ceiling. |

After-conversion UX (D1 detail)​

Two buttons only: Download (save the PDF) and Go back (return to uploader). No "read in new tab" — to read a converted PDF, the user re-uploads it (which routes through the normal PDF reading path).