What it does

After the April 2024 Hualien earthquake, 172 mobile base stations went offline in Taiwan, mostly in Hualien and Yilan (National Communications Commission, via CNA, 2024-04-03). Where the towers are down, two people a metre apart cannot send each other a text.

Handshake sends up to 140 bytes from one device to another by sound: two tones at 1800 and 2400 Hz, 100 baud, a CRC-16, and an optional rate-1/2 convolutional code with soft-decision Viterbi decoding. It runs in the browser, works offline after the first load, and needs no account or server. The interface is a séance board: the ring of the planchette is the measured share of energy on the two tones, and a failed decode shows the real reason instead of a guess.

How it was built

  • Three specs (requirements, design, tasks) generated with Kiro, reviewed by hand before coding; the review caught a receiver that could not find frames starting mid-symbol and a design that compared modes at four times the air time.
  • TypeScript and Vite, no UI framework. Web Audio AudioWorklet for the speaker and microphone, BroadcastChannel for a two-tab demo on one laptop, a service worker for offline use.
  • 107 automated tests in Vitest, most of them fast-check property tests: under any noise the decoder returns the exact message or a failure, never different words.

What is measured

On a simulated channel, 100 trials per cell, at the same length of sound: error correction decodes 97/100 at −16.5 dB where slowing down decodes 58/100, and 62/100 at −18 dB where slowing down decodes 11/100.

Over the air

Measured on one desktop, speaker to USB microphone in the same room: 5 of 5 messages decoded in the default "Robust, slow" mode (error correction at 50 baud, about 12.7 s of sound each), each on screen within a second of its sound ending, with no wrong message accepted. Fast mode, without error correction, decoded 0 of 5 in the same room. An earlier run at lower speaker volume decoded 0 of 10. Phones are not measured yet; every result goes into the field log, never estimated.

Tools used (as the rules require)

  • AI tools: Kiro (specs, steering, hooks); Claude Code by Anthropic (code, review, tests); Windows speech synthesis (video narration).
  • Libraries: TypeScript, Vite, Vitest, fast-check, @fontsource/im-fell-english. No runtime dependencies.
  • Platform APIs: Web Audio (AudioWorklet), BroadcastChannel, Service Worker. Hosting: Vercel.
  • The project was started on 2026-11-12, after GenHacks opened. It is also entered in Kiroween 2026.

Built With

  • claude
  • fast-check
  • kiro
  • typescript
  • vercel
  • vite
  • vitest
  • web-audio-api
Share this project:

Updates

Submission history