clone

nostr relays on demand at <name>.bind.ws: claim one with your key, pay in zaps past the free allowance

relay-templates: default resets rules and leaves feature settings unchanged

Dami committed 61fa41e
commit
61fa41e9033a4a27579cd4617de0d000876590c9
parent
5fa7a165078c20aa1033b3e6c18771abbf210ada
author
Dami <dami.etoile@gmail.com>
5 files changed, +12 -7
Mdocs/01-relay-configuration.md2+-
Mrelay-templates/01-default.jsonc5+++--
Mrelay-templates/README.md8++++++--
Msrc/gen/templates.ts2+-
Mtest/object/presets.test.ts2+-
M docs/01-relay-configuration.md +1 -1
@@ -73,7 +73,7 @@ Three features add bounded services beside the relay feed. **Sites** is on by de
7373 7474 ### Presets7575 76-Above the rules form, one button per preset applies a template from the repository's `relay-templates/` folder: writes, reads, the directory, the features, the kind rules and the keep-for rules together. Limits, identity, people and bans stay. **Default** is what a fresh claim has. **Outbox** is only you writing, anyone reading, private kinds refused. **Inbox** takes notes, replies, reactions, comments, reports and zaps from anyone and keeps them 90 days. **Private** is only you writing and only members reading, every kind, forever. **Chat** is the members-only group: private messages, chat and threads, directory hidden. Your own profile and lists always land, whatever the kind rules say. Names are cheap, so one name per role is the way to run all four.76+Above the rules form, one button per preset applies a template from the repository's `relay-templates/` folder: writes, reads, the directory, the features, the kind rules and the keep-for rules together. Limits, identity, people and bans stay. **Default** restores open writes and reads, a public directory, every kind and indefinite retention. It leaves feature settings alone, so applying it after **Quiet** keeps the features switched off. **Outbox** is only you writing, anyone reading, private kinds refused. **Inbox** takes notes, replies, reactions, comments, reports and zaps from anyone and keeps them 90 days. **Private** is only you writing and only members reading, every kind, forever. **Chat** is the members-only group: private messages, chat and threads, directory hidden. Your own profile and lists always land, whatever the kind rules say. Names are cheap, so one name per role is the way to run all four.7777 7878 Four more presets make single-purpose names: **Media** (members upload files; the only events accepted are profiles and Blossom server lists), **Search replica** (a read-only copy of another relay's searchable kinds, refreshed every six hours), **Articles** (long-form and profiles only, mirrored daily from a source if one is given) and **DM inbox** (anyone drops gift wraps, only members read). The replica presets take a source relay URL in the field next to the buttons; applying a preset again replaces the standing pull rather than adding one, and applying a preset with no source removes it. The pull appears in the Jobs table on the Data tab.7979
M relay-templates/01-default.jsonc +3 -2
M relay-templates/README.md +6 -2
@@ -7,7 +7,7 @@ copy as the start of your own.
77 88 | Template | Choose it when |99 |---|---|10-| [default](01-default.jsonc) | you want a plain relay: anyone writes, anyone reads, everything kept. What a fresh claim has. |10+| [default](01-default.jsonc) | you want a plain relay: anyone writes, anyone reads, everything kept. Feature settings stay as they are. |1111 | [outbox](02-outbox.jsonc) | it is where your own public notes and articles live, for the world to read. |1212 | [inbox](03-inbox.jsonc) | it is where people reach you: replies, reactions, zaps and reports, kept 90 days. |1313 | [private](04-private.jsonc) | only you write and only your devices or a trusted few read: drafts, wallets, app data. |
@@ -31,7 +31,11 @@ A template is a relay configuration (`$schema` names the copy served at
3131 `template` block for the title and the blurb, and the rules sections only:3232 policy, kinds and retention. People, bans and addresses are never in a3333 template, and a section a template leaves out is left alone when it is34-applied. The number in the file name is the order the console shows them in.34+applied. Default resets the write, read, directory, kind and retention rules;35+it leaves feature settings alone. Applying Default after Quiet keeps the36+features switched off. It is a rules reset, not a full relay reset.37+38+The number in the file name is the order the console shows them in.3539 3640 `npm run build:templates` folds the folder into `src/gen/templates.ts`, which3741 the relay serves as its presets; `npm run typecheck` checks every file here
M src/gen/templates.ts +1 -1
M test/object/presets.test.ts +1 -1