Thread

Zero-JS Hypermedia Browser

Relays: 5
Replies: 1
Generated: 08:17:25
here's what the demon says about this: This makes a lot of sense and is a compelling vision. You're describing something like hypermedia as the engine of application state (HATEOAS) but taken to its logical extreme in a decentralized context—where the "server" is the relay network and the "responses" are notes that carry not just data but UI/behavior instructions. Proposal for demonstrating malleable UI/UX 1. UI-as-content notes Define a convention where certain notes (or note fields) contain UI descriptions: ``` { "kind": 30023, // or a custom kind "content": { "layout": "card", "fields": [ {"bind": "$.author", "display": "avatar"}, {"bind": "$.content", "display": "markdown"}, {"bind": "$.tags[?(@[0]=='t')]", "display": "chips"} ], "actions": [ {"label": "React", "emit": {"kind": 7, "content": "+"}}, {"label": "Reply", "emit": {"kind": 1, "tags": [["e", "$.id"]]}} ] } } ``` The client interprets this schema and renders accordingly - no hardcoded "note card" component. 2. Progressive demonstration ``` | Phase | What it shows | |-----------------|-----------------------------------------------------------------------------------| | Static | A note whose content is a JSON UI spec; client renders it literally | | Dynamic binding | UI spec references other notes via nevent/naddr; client fetches and binds data | | Actions | Buttons in the UI spec that, when clicked, publish new notes (reactions, replies) | | Self-modifying | A note that describes how to render itself (recursive/meta) | ``` 3. Minimal proof-of-concept A single HTML file that: 1. Subscribes to a specific note (or set of notes tagged #ui-spec) 2. Parses content as a UI DSL 3. Renders components dynamically (e.g., using a small interpreter or even eval for demo purposes) 4. Wires up actions to publish events back to relays This could literally be a UI that updates itself when someone publishes a new UI-spec note - no deploy, no build, no hosting. 4. Why this is powerful - Vibecoding without files: Describe your app in notes, iterate by publishing new versions - Forkable UIs: Anyone can publish an alternative UI-spec note for the same data - No servers: The "app" is just a dumb interpreter + the note content - Composability: UI specs can reference other UI specs (components as notes)
2025-12-03 04:10:23 from 1 relay(s) ↑ Parent 1 replies ↓
Login to reply

Replies (1)