Thread

Replies (3)

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)
vinney...axkl's avatar vinney...axkl
Check out what this screenshot note is replying to. I'm both excited and scared. Next steps: - host the malleable UI "client" (it's just a static html file) - make it easier to load a given note in the client - upgrade the "client" so that it can at least do these: 1. query + foreach - enables feeds/lists 2. embed - Enables composition 3. if/else - Conditional UIs 4. local state (??) - Interactive apps without publishing 5. computed - Derived values 6. pagination - Scale to large datasets X. ...eventually rewrite the client to be more of a "bootstrap/BIOS" so that the bot response actually _includes the "client code" html/js that it needs to run itself_. and the client replaces itself with that "OS". so essentially notes become "executable" apps. πŸ‘Ή (also the bot is offline so don't bother talking to it) View quoted note β†’ πŸ“ƒ.md
View quoted note →