You talk, therefore I am.
Comments on any web page, in a Chrome side panel. There is no boca server and no account: comments live on public Nostr relays, and anyone with a Nostr client can read and answer them.
Live at iguigova.github.io/boca.
Click the boca button and the side panel opens beside the page. It shows the comments on that page and follows you as you switch tabs.
- A page is its URL, normalized and without the
#fragment, as NIP-73 names web content. - A comment is a NIP-22
event of kind 1111. Its root is the page, an
Itag of kindweb. A reply also names the comment it answers. Other clients that write NIP-22 web comments show up in boca, and boca's show up in them. - The relays are
nos.lol,relay.primal.netandoffchain.pub(RELAYSinsrc/relay.js). A page's comments are asked for from all three when the panel shows the page, and a comment is sent to all three. The panel says which relays did not answer. - Your key is made in the browser the first time the panel opens and
stays in the extension's local storage. It signs your comments, and its
first eight hex digits are the name others see. Under Your key you
can show it as an
nsecto keep a copy, or paste annsec(or 64 hex digits) to post as another key. - A signer extension you already use can sign
instead (NIP-07).
A signer offers
window.nostronly to web pages, so boca asks it through the page in the active tab. Choosing it asks Chrome for access to web pages, and everything the signer returns is checked before it is used. - Muting an author hides their comments. The mute list is your NIP-51 list, kind 10000, saved to the relays, so it follows your key to other devices and other Nostr clients. A change keeps the hashtags, words and private items other clients put in the list.
What leaves your computer, and what does not, is stated in PRIVACY.md.
Add it from the Chrome Web Store, or build it and load it unpacked:
npm ci
npm run buildThen open chrome://extensions, turn on Developer mode, choose
Load unpacked and pick the dist folder. Chrome 123 or later, for the
CSS light-dark() that brand.css's colours use.
- A comment cannot be edited or deleted once a relay has it.
- boca's key lives only in this browser profile. Removing the extension or
clearing its storage makes a new key and a new name, unless you kept the
nsec. - A signer extension is reached through the page in the active tab, so it works only on pages where that signer runs.
- A relay keeps what it chooses. Comments can disappear if every relay drops them.
- Comments are plain text, as NIP-22 requires: links are not clickable and markup shows as typed.
- Names are key digits, not profiles.
npm test # the suite, failing below 100% line coverage of src/
npm run build # dist/: the bundle, static/, ../brand.css and ../brand.js
npm run package # boca.zip, for the Chrome Web StoreThe build copies ../brand.css, the base style of every page I make, and
../brand.js, the theme switch beside it. On my machine each is a symlink
into the iguigova.github.io clone; anywhere else, fetch them first, as CI
does: curl -fsS https://iguigova.github.io/brand.css -o ../brand.css, and
the same for brand.js.
The code is plain ES modules in src/. The runtime dependencies are
@noble/curves and @noble/hashes, for the Schnorr signatures and the
sha256 ids, and @scure/base, for nsec and npub.
The icon is public domain, from publicdomainvectors.org.
MIT. See LICENSE.