Skip to main content

max / makenotwork

shared/theme-common: track unified theme library future project Adds todo.md scoping the cross-app theme library + per-user MNW custom CSS as a Fan+ perk. Not Monday work — future planning only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-06-01 02:01 UTC
Commit: 4541ebc3ac890a0180541f12e3bc68b267f3d3d0
Parent: 3dc8dca
1 file changed, +31 insertions, -0 deletions
@@ -0,0 +1,31 @@
1 + # theme-common TODO
2 +
3 + ## Active
4 +
5 + (none — crate is stable, consumed by audiofiles + goingson)
6 +
7 + ## Future — Unified theme library + per-user MNW theming
8 +
9 + **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.
10 +
11 + **Why:**
12 + - 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.
13 + - 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.
14 + - 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 `<link rel="stylesheet">` injected into every authenticated page render.
15 +
16 + **Pieces to design:**
17 + - Single canonical theme TOML schema (audit existing helix-format vs MNW theme TOMLs for shape divergence).
18 + - 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).
19 + - 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).
20 + - Fan+ gating: theme picker visible to all signed-in users (apply a built-in theme); custom CSS slot gated behind Fan+ status.
21 + - 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.
22 + - Migration path: drop hard theme counts from app READMEs in favor of "see the themes directory" (already done for the launch).
23 +
24 + **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.
25 +
26 + **Key paths:**
27 + - `MNW/shared/theme-common/` (this crate — likely host for the canonical loader)
28 + - `MNW/shared/themes/` (current cross-app theme store)
29 + - `Apps/audiofiles/crates/audiofiles-browser/themes/` (consumer; would migrate)
30 + - `Apps/goingson/src-tauri/frontend/themes/helix/` (consumer; would migrate)
31 + - `MNW/server/templates/` (would gain user-CSS injection hook)