- commit
- 3dec5e11a43810325a337887616f0a45be16a14c
- parent
- 13c475ab71618445128f2c3cc34a614d0b342431
- author
- Dami <dami.etoile@gmail.com>
| M | README.md | 8 | ++++---- |
| M | docs/ | 2 | +- |
| M | docs/ | 2 | +- |
| M | docs/ | 3 | +++ |
@@ -15,11 +15,11 @@ That answers with a relay at a memorable name, open to anyone for 14 days. Claim
1515 1616 ## What a name gives you1717 18-- **A relay.** The standard protocol plus search, counts, sync, expiry, deletion, proof of work and an HTTP door for scripts. Works with every client.19-- **A community.** Members, invite links, an invite tree, moderators, a signed roster and one NIP-29 group per relay, so group-aware clients show it as a place.18+- **A relay.** The standard protocol plus search, counts, sync, expiry, deletion, proof of work, a discovery record for relay directories and an HTTP door for scripts. Works with every client.19+- **A community.** Members, invite links, an invite tree, moderators with a log of what they did, a signed roster and one NIP-29 group per relay, so group-aware clients show it as a place.2020 - **A site.** Notes and articles as pages with link previews, an Atom feed, and a card with a QR of the group address.2121 - **A file host.** Blossom and NIP-96 on the same bucket, with mirroring, pre-flight checks and file reports.22-- **A console.** Seven tabs on the relay's own page, signed by a browser extension or a remote signer app on a phone. Presets set up an outbox, an inbox, a private relay, a chat, a search replica or a media host in one click.22+- **A console.** Nine tabs on the relay's own page, signed by a browser extension or a remote signer app on a phone. Presets set up an outbox, an inbox, a private relay, a chat, a search replica or a media host in one click.2323 - **Jobs.** Pull another relay in, keep a standing mirror, fetch your own history from your relay list, rebroadcast to other relays, and dump everything to a file on a schedule.2424 - **Your own domain.** `wss://relay.example.com` onto your relay with one CNAME.2525 - **Succession.** Name an heir. If your key goes silent, the relay warns you for a month and then hands itself over.@@ -47,7 +47,7 @@ It runs on Cloudflare Workers with one Durable Object per name, SQLite inside it
4747 **For developers**4848 4949 - [Architecture](docs/10-architecture.md): routing, the object, storage, alarm, jobs, identity, groups.50-- [Hosting bind.ws](docs/11-hosting-bindws.md): run your own on your own domain.50+- [Hosting bind.ws](docs/11-hosting-bindws.md): run your own on your own domain, and watch it through logs, traces and metrics.5151 - [Develop and extend](docs/12-develop-extend.md): layout, tests, adding methods and NIPs, the console.5252 - [Costs and margins](docs/15-costs-and-margins.md): what a relay costs the host, what fuel charges, the weekly check against the bitcoin price.5353 @@ -43,7 +43,7 @@ A moderator who signs in on the relay's page sees the People and Moderation tabs
4343 4444 ## Keeping order4545 46-Three tools for the noise a bigger relay attracts, all on the Rules and Moderation tabs. **Blocked words** refuse any content that contains one, from anyone but you and your moderators. **Ban and erase** removes a person together with everything they wrote and uploaded. **Hide after N reports** takes an event out of view once that many different people have reported it, until a moderator looks. The [configuration guide](01-relay-configuration.md) has the details.46+Three tools for the noise a bigger relay attracts, all on the Rules and Moderation tabs. **Blocked words** refuse any content that contains one, as a plain word or a pattern, in the content and, when you switch it on, in the tags, from anyone but you and your moderators. **Ban and erase** removes a person together with everything they wrote and uploaded. **Hide after N reports** takes an event out of view once that many different people have reported it, until a moderator looks. The [configuration guide](01-relay-configuration.md) has the details.4747 4848 ## Groups in clients4949 @@ -49,7 +49,7 @@ The read path is one gate too, `Settings.mayRead`, given the pubkeys a caller ha
4949 5050 ## Storage and media5151 52-SQLite tables: `events`, `tags` (single-letter tags only), an FTS5 `search` table keyed by row id, `vanished` tombstones, plus the settings tables and `jobs`, `dumps` and `usage`. Two platform details shape the SQL:52+SQLite tables: `events`, `tags` (single-letter tags only), an FTS5 `search` table keyed by row id, `vanished` tombstones, plus the settings tables and `jobs`, `dumps`, `usage` and the `audit` log. Two platform details shape the SQL:5353 5454 - Statements take at most 100 bound parameters, so id and author lists bind as one JSON parameter expanded with `json_each`.5555 - There are no PRAGMAs, so cascading deletes are triggers.@@ -18,6 +18,7 @@ src/
1818 settings.ts policy, members, bans, kind rules, retention, export/import1919 roles.ts who may do what: owner, moderator; one table for NIP-86 and NIP-292020 groups.ts NIP-29, one group per relay: joins, leaves, moderation events21+ audit.ts the moderation log: one row per change from manage.ts or groups.ts2122 presets.ts rule bundles, one click each, some with a standing pull2223 manage.ts NIP-86 methods over NIP-982324 domains.ts custom hostnames: the Cloudflare client and the KV mapping@@ -28,6 +29,7 @@ src/
2829 qr.ts a QR encoder for the card and the console2930 fuel.ts meters, prices, receipts, LNURL3031 identity.ts relay keypair and NIP-43 roster32+ nip66.ts the relay's NIP-66 discovery record about itself3133 blossom.ts BUD-01/02/04/06/08/09 on R23234 nip96.ts NIP-96 door to the same bucket and table3335 bridge.ts HTTP bridge@@ -79,6 +81,7 @@ Most NIPs land as their own module, wired in from `relay.ts` with one import and
7981 |---|---|---|8082 | 29 groups | `groups.ts` | the write gate in `relay.ts`, before the client policy |8183 | 43 roster | `identity.ts` | `publishMembership` in `relay.ts` |84+| 66 discovery | `nip66.ts` | `publishDiscovery` in `relay.ts`, from `publishMembership` and the alarm |8285 | 46 transport | one kind in the write gate and the read gate | `relay.ts` |8386 | 86 methods | `manage.ts` with `roles.ts` | the RPC route |8487 | 96 files | `nip96.ts` over `blossom.ts` | one path line in `fetch` |