- JavaScript 88%
- CSS 6%
- HTML 4%
- Shell 2%
pirate-radio #
The pirate radio model: a social network on AT Protocol records, with no server that collects everyone's posts.
Everyone runs their own small station (a single-user PDS on Cloudflare). Likes and replies are sent to the other station as postcards, and the receiver checks the sender's station before counting them. Stations that share a frequency list show the same timeline. No AppView, no Relay, no PLC.
Originator: Nighthaven (@moja.blue) · follows the crystal radio model
Four parts #
| Part | What it is |
|---|---|
| Station | A single-user nano-pds. Your records in your D1, your identity as did:web. |
| Programme | /feed.json. Your records in JSON Feed, each with its at-uri and an ECDSA signature. |
| Postcard | /inbox. "I wrote a like/reply", "I deleted it", "my programme changed". The receiver fetches the record from the sender and verifies it before counting. |
| Receiver | /timeline. Collects every programme on the frequency list and sorts by time. |
A like is a reverse lookup ("who liked this?"), which in ATProto normally needs a server that sees every PDS. Here the person who likes sends a postcard, so the post's own station can count it.
The rules are in SPEC.md (Japanese: SPEC.ja.md). A plain explanation for a general reader: The Pirate Radio Model (Japanese: 海賊ラジオモデル).
Not a new protocol #
The postcard is Webmention, and the "programme changed" notice is WebSub. The IndieWeb has used both for years. This repository brings that pattern to signed ATProto-shaped records and runs it with no AppView and no relay. SPEC 10 compares it with IndieWeb, ActivityPub, Red Dwarf and Nostr.
Try it #
Two stations run on Cloudflare: nano-a.soiree.blue and nano-b.soiree.blue. Anyone can read their timelines; writing needs each station's key.
On your machine:
cd worker && ./tools/two.sh
node tools/try.mjs
two.sh starts two stations on ports 8801 and 8802 and makes their keys. try.mjs posts, likes, replies, sends a fake postcard and deletes a like, and checks the counts on both sides (8 checks).
Deploy your own station #
npx wrangler d1 create nano-pdsand put the id inworker/wrangler.jsonc- Set
ROSTERto the stations you want to share a timeline with.ORIGINmay stay empty; the station uses the URL it is called at node tools/keygen.mjs > .dev.vars, thennpx wrangler deploy --secrets-file .dev.vars
Two stations on the same Cloudflare account need global_fetch_strictly_public (already in wrangler.jsonc) to reach each other.
Files #
| Path | What it is |
|---|---|
| worker/src/index.js | The station. No dependencies. |
| worker/src/d1-budget.js | A daily cap on D1 writes |
| worker/public/ | A small page for trying it: timeline, post, like, reply, thread |
| worker/tools/ | Key generator, two local stations, and the 8 checks |