Beta database will be wiped periodically. Do not save data you want to keep.
nearbuilding.near/Nostr NEAR Builders
NEARBuilders/nostr.nearbuilders.org
for agents and builders

Open the skill page for the essential TanStack Intent, local dev, and publish instructions.

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:

EndpointDescription
getPublicKeyDerive the user's Nostr pubkey from their NEAR session
createBinding / getBinding / deleteBindingManage NEAR ↔ Nostr bindings
getIdentityResolve a NEAR account to its Nostr identity
publishCommentCreate and publish a signed kind-1 comment event
listCommentsList comments for a target, enriched with profiles
getProfileFetch a Nostr kind-0 profile
listRelaysList the configured relays
pingHealth 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

License

MIT

Built on NEAR