Skip to content

Architecture decisions ​

Decisions are recorded as ADRs in two places with separate numbering. docs/adr/ holds the decisions for the web app and the ones that span several apps. apps/server/docs/adr/ holds the server's. The domain terms they use are defined in the glossaries listed in CONTEXT-MAP.md.

Web app and cross-app (docs/adr/) ​

ADRDecision
0001Blossom for media storage: content-addressed blobs can be mirrored and found on any server, unlike NIP-96 URLs.
0002Browser transcoding (WebCodecs in Web Workers) is the primary encoding path; a DVM and plain upload are optional fallbacks.
0003Applesauce is the Nostr library; RxJS is accepted only where Applesauce needs it.
0004One monorepo with npm workspaces: apps/* plus internal packages/core (no React) and packages/widgets, imported by subpath; the server embeds the site, Studio and embed player.

Nostube Server (apps/server/docs/adr/) ​

ADRDecision
0001The relay is ported into the server instead of embedding nostr-rs-relay; Almond stays a pinned library dependency.
0002Admin login: a mandatory password, an optional NIP-07 key login, one server-side session.
0003TLS modes proxy, files and local-ca (ACME later), and one canonical origin.
0004App, Blossom and relay share one origin; Blossom and the relay are mounted at the root.
0005The public config (/api/config, contract v1) is strict and fail-closed; the site reads it before loading anything.
0006The relay accepts visitor comments, replies, reactions and their deletions, but only on locally known videos.
0007Managed signer: the server keeps the creator key as a NIP-49 ncryptsec, unlocked by a local key file.
0008A signed-in visitor's profile is always looked up on public discovery relays; videos and embeds stay on the instance.
0009A durable outbox copies the instance's own events and blobs to mirror relays and Blossom servers the owner chose.
0010Public config edits apply while running; only start-time wiring (writers, storage, mirrors) needs a restart.
0011NIP-56 reports are a fifth accepted visitor kind, reviewed by the owner in the Studio.
0012Reach: a private instance publishes nothing; a public one announces its channel profile, relay list and Blossom list.
0013Site hosting is independent of reach; a managed channel can publish its site as a NIP-5A nsite.
0014An optional, opt-in import of public interactions reuses the relay's admission rules (concept accepted, not yet implemented).

Released under the MIT License.