# theme-common TODO ## Active (none — crate is stable, consumed by audiofiles + goingson) ## Future — Unified theme library + per-user MNW theming **Scope:** One canonical theme library serving every app under Make Creative (audiofiles, goingson, balanced_breakfast, MNW server-rendered UI), plus a Fan+ perk that lets MNW users override the platform default CSS per-account. **Why:** - Today every app maintains its own theme folder: `Apps/audiofiles/crates/audiofiles-browser/themes/` (28 themes), `Apps/goingson/src-tauri/frontend/themes/helix/` (9 themes), `MNW/shared/themes/` (28 themes). Drift is inevitable; theme counts are already wrong in 5+ docs. - A unified library shipped from `MNW/shared/themes/` (or a successor crate here in `theme-common/`) would centralize the source of truth and let documentation point at one directory. - Theming the MNW default CSS per user is a natural Fan+ benefit: pay tier gets a theme picker + custom CSS slot stored against the account, applied via `` injected into every authenticated page render. **Pieces to design:** - Single canonical theme TOML schema (audit existing helix-format vs MNW theme TOMLs for shape divergence). - A loader contract every app already supports (theme-common already does this for native apps; MNW server-side rendering needs an equivalent for CSS variable injection into Askama templates). - Per-user storage: new column on the users table (or a separate `user_themes` table) holding either a theme ID + custom CSS overrides, or a full custom theme blob (with size cap and validation). - Fan+ gating: theme picker visible to all signed-in users (apply a built-in theme); custom CSS slot gated behind Fan+ status. - CSS sanitization for the custom-CSS slot — accept only declarations, no `@import`, no `url()` to off-origin, no `expression()` (defunct but defensive). Probably easier to whitelist a CSS property allowlist than to sanitize freeform. - Migration path: drop hard theme counts from app READMEs in favor of "see the themes directory" (already done for the launch). **Not Monday work.** Surfaced here so it's tracked. The Monday docs drop hard counts and point at directories — that posture is already correct for whenever this lands. **Key paths:** - `MNW/shared/theme-common/` (this crate — likely host for the canonical loader) - `MNW/shared/themes/` (current cross-app theme store) - `Apps/audiofiles/crates/audiofiles-browser/themes/` (consumer; would migrate) - `Apps/goingson/src-tauri/frontend/themes/helix/` (consumer; would migrate) - `MNW/server/templates/` (would gain user-CSS injection hook)