Inspiration
Picture a university field day with medics, access volunteers, facilities staff and a supply team all working the same site. The moment the network drops, most coordination tools stop being useful, because every decision was waiting on a central service that nobody can reach. People do not stop needing help when that happens. A wheelchair user is still stuck at the north gate, and the one evacuation chair is still in somebody's hands.
We wanted to answer a harder question than how to sync data later. When a group loses its shared view, who may still act, what is safe to promise, and how do we reconstruct what really happened once contact returns?
What it does
AfterLink Continuity keeps a shared mission moving after the network fails. Four teams run as independent actors, each with its own signing key, its own log and its own decision engine, and they coordinate directly over peer connections.
The experience puts you in the role of the outage. On a living festival map you kill the HQ tower, cut the links between teams and watch them carry on. Requests are still claimed and finished because each team decides locally from what it knows. Hover over a team and the map shows what that team knows, rather than an all-seeing view.
When the network splits, both groups keep working, but a scarce resource can only be promised once. The group without the evacuation chair receives a clear refusal and a next step. A signed update can then cross the gap as real QR frames, carried by a person. When contact returns, histories merge, and the debrief shows what happened while headquarters could see nothing. Anyone can then check the run with the built-in verifier.
Voice is part of the field workflow. ElevenLabs speaks briefings and team radio, with clips cached so they still play in a dead zone. An n8n workflow takes in requests from the outside world, triages them with Claude, retries delivery and keeps failed requests for later. Claude can also turn an organiser's plain description into a draft mission, which is validated and needs human approval before it grants any rights.
How we built it
AfterLink is a TypeScript monorepo. Every action is an Ed25519-signed event in a per-actor hash chain, and the same envelope travels over WebRTC data channels or QR frames. Lamport clocks give a deterministic causal order, so replicas holding the same events derive the same state.
Exclusive resources are numbered tokens issued by a signed mission capsule. Only the current holder can commit or offer a token, and an offered token stays locked until the recipient answers. A lost acknowledgement therefore leaves a token visibly in transit and never refunds it automatically. For each resource r, the system maintains
$$ \text{committed}(r) + \text{held}(r) + \text{inTransit}(r) = \text{issued}(r) $$
There is no leader. Each actor runs the same deterministic planner over its own view, and concurrent claims resolve by a deterministic tie-break. The solo demo runs four real device contexts in one page, and headquarters is a dedicated Web Worker, so breaking the network really terminates it. The front end uses React, Vite and a canvas map, and a small Hono relay handles signalling, Claude, ElevenLabs and n8n intake. None of those services sits in the local decision path.
Challenges we ran into
The hardest problems came from honest failure cases. Merging is easy for notes, but an exclusive promise cannot be merged after the fact, so we designed authority to prevent double allocation during a partition.
Our adversarial tests kept finding real faults. A device restored from an old backup could reuse a sequence number and spend the same right twice, which led us to add a signing gate and fork detection. Hostile event bodies could crash a replica, and an early debrief figure claimed more than the events supported, so we tightened the numbers until each traced back to the log.
WebRTC needed care too. Established data channels survive the loss of signalling, but new connections cannot start without it, so we had to be precise about what breaks and when.
Accomplishments that we're proud of
In real Chromium, we terminated the signalling hub and all 12 directed peer links stayed up, delivering 2,400 of 2,400 test messages. The project runs over 1,000 automated tests, alongside a separate adversarial suite that explores interleavings of the rights protocol. We also compare AfterLink against a central dispatcher and a last-write-wins task board under the same seeded fault schedules.
Most of all, we are proud that the failure is real. A cut link closes a connection, a killed tower terminates a process, and a QR carry decodes real pixels.
What we learned
We learned that a safe refusal can be a success. A system that says "I cannot promise that, here is what you can do next" is more useful in a crisis than one that always says yes.
We also learned to separate what software can guarantee from what it cannot. A signature proves who said something, and it does not prove a chair is physically there. Keeping digital rights and physical reality apart made the design more honest.
Resources used
| Resource | Used |
|---|---|
| Claude API credit | $23.50 credits |
| ElevenLabs credits | 11,500 credits |
| n8n executions | 360 of 1,000 on the trial |
| Automated tests | 1,078 in the main suite, plus a separate adversarial suite |
| Hosting | GitHub Pages and Render free tier, $0 |
What's next for AfterLink Continuity
Next we want to rehearse with real volunteer teams on physical phones at a live event, and to strengthen recovery for wiped devices. We also plan to let two isolated devices reconnect by QR with no server, and to add robots and sensors as ordinary peers with bounded authority.
Built With
- anthropic-api
- canvas
- claude
- ed25519
- elevenlabs
- github
- github-actions
- hono
- indexeddb
- jsqr
- n8n
- noble-curves
- node.js
- playwright
- pwa
- qr-code
- react
- render
- typescript
- vite
- vitest
- web-workers
- webrtc
- websockets
