diff --git a/CLAUDE.md b/CLAUDE.md index 682e5fc..e01c6f8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,7 +17,29 @@ Requires a `.env` file with `VAPID_PUBLIC_KEY` and `VAPID_PRIVATE_KEY` for web p Bliss is a browser-based low-code platform where users build mini web apps ("Structures") entirely through a `/workshop` UI. Each Structure has routes, templates, and SQLite databases — all stored in the main app database and executed at runtime via Node's `vm` module. -## Architecture +## Design philosophy: this is a hypermedia homestead + +Bliss templates are not a web-app-with-an-API. There is no client-side framework, +no JSON contract, no build step — the HTML *is* the application, and it composes +by embedding more HTML (see "page-nesting primitive" below). Every template you +write or edit should lean into that instead of fighting it: + +- **Prefer `<%~ %>` (raw) over `<%= %>` (HTML-escaped) in Eta templates, always, + unless you are interpolating into an HTML attribute value.** Attribute values + (`id="..."`, `data-*="..."`, `href="..."`, `style="..."`, `value="..."`) are + the one place escaping is not optional — an unescaped `"` there breaks the tag + itself, not just a security nicety. Everywhere else (text content, `