Field Notes — NostrClay demo A

Czy to działa?

A malleable HTML file whose host is Nostr. Everything below lives in this document’s markup.

Approach A — whole-document rewrite. Every save serialises this entire page, pushes it to Blossom as one content-addressed blob, and republishes the nsite manifest that points at it. The file on disk is always the current state, so curl and crawlers see exactly what you see.

Why this works

The DOM is the database. A save is one blob and one replaceable event — no backend anywhere in the loop.

Versions are free

Blobs are immutable, so a kind-5128 snapshot event pins a version by naming a set of hashes. Nothing is ever overwritten.

Checklist

Log

This block is one editable container, so it behaves the way a document should: Enter starts a new paragraph. Select any text and a toolbar appears — its first control is the block menu, which turns the current paragraph into a heading, a list, a quote or a code block.

Shortcuts work too: ⌘B ⌘I ⌘K, ⌘⇧8 for a bulleted list, ⌥1⌥3 for headings. Or type # , - or > at the start of a line.

Whatever you write here is markup in the file after a save — open the saved bytes and the paragraphs are just paragraphs.

Hello everyone!

Hello, this is supercool. Who else can edit this?

Hi, I was here..

Even me! Even me!


cool!

saved 24 609 B · b8209f2cc464…

Sign in to edit

This document is owned by one npub. Anyone can read it; only the owner's signature can rewrite it.

The key stays in this tab’s memory and is written nowhere — but you are typing it into a page served by a gateway you don’t control. Amber signs without ever handing the key over; prefer it for anything you care about.

Version history

Every save files a kind-5128 snapshot. Each one names an immutable set of Blossom hashes, so any version can be read back byte-exact.