Inspiration

Phones are full of sensors, but using them as game controllers in a web page is awkward. You usually need an app. On iPhone you need HTTPS and a tap for every permission, and the page stops when the screen locks. We wanted to solve that once, as a kit, and prove it with two very different apps.

What it does

Haunt Kit turns any phone into a motion, sound and touch controller for a web app. A player scans a QR code and taps once. Tilt, shakes, microphone loudness and taps reach the app. Nothing to install.

Séance Party is a Halloween party game for 1 to 8 players on a big screen. In Ouija Planchette, everyone's tilt is averaged to steer one planchette. In Hold Still, you dance while the ghost looks away and freeze when it turns. In Banshee Scream-off, the loudest sustained scream wins. AI ghost bots let you play alone, and the game works with no relay at all. Steady is a home physical-therapy rep counter. It counts shoulder raises and bicep curls out loud and shows your angle. It says "Too fast" or "Not full range" when that applies. It keeps your history on the phone and makes a printable report for your therapist. It has large text, a high-contrast theme and a voice-only mode. It is not a medical device, and it says so. For developers, a few lines of code (createRoom, createMockRoom) give your app phone input. You can also describe a new gesture in a spec file, and a Kiro hook builds the detector and its tests.

How we built it

A TypeScript monorepo with React and Vite. A relay on Cloudflare Workers, with one Durable Object per room. A player who drops reconnects as the same ghost for 60 seconds. Every message is checked with zod, and a phone can't send input as another player. Gesture detectors are pure functions that run on the phone, so only events are sent when raw data isn't needed. Privacy by design: microphone audio never leaves the phone, only a loudness number does. Steady's data stays on the device. A design system with three themes (haunted, lantern, high contrast), checked for WCAG AA contrast. A Séance MCP server lets Kiro read live phone sensors, record motions and replay them as fake players.

Challenges we ran into

iPhone rules: HTTPS, permissions from one tap, and the page pausing on screen lock (we use wake lock and auto-rejoin). Our team only has iPhones, so we built a desktop simulator and "ghost players" that replay recorded sensor data, and ran the browser tests on Safari's engine (WebKit). Property-based tests found real bugs: a sensor batch that could pass validation but exceed the 16 KB message limit, a proto key that silently changed a message, and bots that could never spell BOO because a letter can't be picked twice in a row. Our first deploy looked green while three pages had silently failed. We rewrote it to stop on errors and to check every page.

Accomplishments that we're proud of

It works for a judge testing alone: bots, a practice mode, a demo person in Steady and a desktop simulator. Over 500 unit and property tests, about 90 browser tests on Safari's engine and Chromium, accessibility checks on every screen, and tests against the deployed sites. Tested on a real iPhone.

What we learned

Plant a bug on purpose to check that a test can fail. Several of our first tests couldn't. Synthetic data lies. Our own recordings of a real phone showed our simulated gravity had two signs wrong, and every earlier test had passed anyway.

What's next for Haunt Kit

Test on real Android phones (we only have iPhones), add more minigames and exercises, and package the kit for other developers.

How to use it:

No login or account is needed. Everything is free and public.

Links

  1. Test with no phone (2 minutes)
  2. Open Séance Party. Click "Fill to 4", then "Start the séance". Four AI ghost bots play the games.
  3. Open Steady. Click "I understand", choose "Shoulder raise", then click "Try the demo". Turn your sound on to hear it count reps.

  4. Play yourself on a computer, no phone

  5. In Séance Party click "Join from this computer" and type a name.

  6. Move the mouse to tilt. Press H to hold still and S to shake.

  7. Test with a phone (best experience, iPhone or Android)

  8. Open Séance Party on a laptop or big screen.

  9. Scan the QR code with the phone camera.

  10. Tap "Enter the séance" and allow motion and microphone access.

  11. Press Start on the laptop. Tilt the phone to steer the planchette, freeze when the ghost turns, and scream in the last game.

  12. Lock the phone screen for 5 seconds. It should rejoin as the same ghost.

  13. To try Steady on the phone, open https://kirohauntkit-steady.pages.dev, pick Shoulder raise, tap Start, hold still for 2 seconds, then raise your arm 5 times. It counts out loud.

Notes

Built With

  • axe-core
  • cloudflare-pages
  • cloudflare-workers
  • devicemotion-api
  • durable-objects
  • fast-check
  • github-actions
  • indexdb
  • kiro
  • model-context-protocol
  • node.js
  • playwright
  • pnpm
  • react
  • screen-wake-lock
  • speech-synthesis
  • typescript
  • vite
  • vitest
  • web-audio-api
  • websockets
  • zod
Share this project:

Updates

Submission history