README.md raw

smesh

smesh

nostr relay + client — one language, no frameworks, no npm

moxie is a Go derivative that compiles to native binaries and ES modules. No Google Go toolchain. No node. No build pipeline.

What is this

Smesh is a self-hosted Nostr stack: relay, web client, and browser signer extension. Everything is written in moxie, a Go derivative that targets native binaries (relay) and JavaScript ES modules (browser).

The client runs entirely in the browser. The relay is a dumb pipe. Crypto happens client-side. Key material never leaves the browser.

Architecture

smesh relay (native binary)
  Serves static files, WebSocket, Blossom
  AUTH, search, CRUD — that's its scope
          │
          │ HTTP / WS
          ▼
Browser
  ├── sm3sh app (.mjs)         ← feed, messages, profiles, relay management
  │     └── signer modal       ← vault unlock, identity management
  │
  ├── service worker (.mjs)    ← relay proxy, IDB cache, subscriptions
  │
  └── signer extension (MV2)   ← NIP-07, vault (Argon2id + AES-256-GCM),
        ├── background page          key store, signing, NIP-04/44
        ├── content-script.js        permission evaluation
        ├── injected.js              management API
        └── prompt.js

Build

Requires moxie (compiler) and moxiejs (JS backend) built from the moxie repo.

# relay
make build-relay

# web client + service worker
make dev

# signer extension (.xpi)
make build-ext

# everything
make build

Packages

PackageDescription
pkg/relayHTTP/WebSocket server, pipeline, rate limiting
pkg/storeAppend-only event storage with WAL and indexes
pkg/nostrEvent types, filters, tags, codecs, crypto (secp256k1, schnorr)
pkg/syncNegentropy set reconciliation
pkg/grapevineWeb-of-trust graph evaluation
pkg/crawlerRelay discovery and event harvesting
pkg/blossomMedia storage (BUD-01/02/06)
web/appBrowser client (compiled to .mjs)
web/swService worker (compiled to .mjs)
web/signer-bgExtension background (compiled to .mjs)
web/commonShared types, crypto, jsbridge stubs, relay pool

Vault format

The signer extension uses the Plebeian/Smesh vault format:

Argon2id runs via WebAssembly (hash-wasm). Source in web/wasm/argon2-src/.

Principles

License

MIT