NEAR-powered identity and decentralized comments on the Nostr protocol, deployed at nostr.nearbuilders.org.
This is a child project of the everything.dev runtime platform. It extends the dev.everything.near runtime (bos://dev.everything.near/everything.dev, platform 2.0.0-rc.24) and composes a host, UI, API, and a nostr plugin. bos.app.ts is the authored descriptor; its published config is on-chain, inspectable, and verifiable on NEAR. bos.dev.ts holds dev-only overrides and is never published.
What it does
- NEAR ↔ Nostr identity — derive a Nostr pubkey from a NEAR session and store an on-chain binding between a NEAR account and a Nostr pubkey.
- Decentralized comments — publish signed kind-1 comment events to public relays and list replies targeting builders, projects, scopes, and submissions — no central database required.
- Relay native — connect through public relays (Damus, nos.lol, Primal), with kind-0 profile resolution straight from the network.
Architecture
The nostr plugin (plugins/nostr) is a Module Federation remote exposing a typed oRPC contract:
| Endpoint | Description |
|---|---|
getPublicKey | Derive the user's Nostr pubkey from their NEAR session |
createBinding / getBinding / deleteBinding | Manage NEAR ↔ Nostr bindings |
getIdentity | Resolve a NEAR account to its Nostr identity |
publishComment | Create and publish a signed kind-1 comment event |
listComments | List comments for a target, enriched with profiles |
getProfile | Fetch a Nostr kind-0 profile |
listRelays | List the configured relays |
ping | Health check |
The UI (ui/src) also ships a client-side Nostr layer (ui/src/lib/nostr) for direct relay interaction, plus a testbench at /nostr behind a NEAR-authenticated route.
Structure
.
├── bos.app.ts # Authored runtime descriptor (published on-chain)
├── bos.dev.ts # Dev-only overrides (never published)
├── api/ # Reference API workspace (oRPC)
├── ui/ # Frontend (React + TanStack Router)
│ └── src/lib/nostr/ # Client-side Nostr helpers (keys, relays, bindings)
├── plugins/nostr/ # The Nostr plugin (oRPC contract + services)
└── packages/client/ # Typed Nostr client for external consumers
Quick Start
cp .env.example .env # First time only
pnpm install
pnpm run dev
Requires Node 24, pnpm and a NEAR wallet to exercise the authenticated flows. Do not use bun: CI fails on any bun.lock.
Check Status
bos ps # List running processes
bos status # Project health check
bos info # Show configuration
Testing & Quality
Before committing:
pnpm run test # Run all tests
pnpm run typecheck # Type check all packages
pnpm run lint # Run linting
Related Projects
- everything.dev — the parent runtime platform this project is built on
- better-near-auth — NEAR SIWN + gasless relay for Better-Auth
- near-nostr-sdk — SDK for NEAR ↔ Nostr integration
- nostr-msig — Nostr multisig
- nostr-testbench — Nostr testbench
License
MIT