House Impostor — guide

House Impostor

Live-action Among Us inside your house. No GPS indoors (it cannot tell a bedroom from a bathroom, let alone a floor). Instead the house is a graph of rooms joined by doors, and the server — never the phone — decides who is where:

Play

iPhone caveat, stated plainly

Web Bluetooth is not in any iOS browser (Apple has not shipped it as of 2026). iPhone players either tap doors (fully playable) or open the same URL in the free Bluefy browser, which has Web Bluetooth, to get beacon tracking. Android: Chrome works as-is. iOS freezes BLE when the screen sleeps — keep the screen on during a round.

Files

server.js       authoritative engine: rooms, graph, RSSI, roles, tasks, votes
house.json      the house: rooms/floors/doors/levels/tasks (host can edit in-game)
public/         index.html app.js style.css config.js (no build step)
esp32/room_beacon/room_beacon.ino   beacon firmware (Arduino IDE, NimBLE-Arduino)
sim.js          28 headless checks: fake phones + fake beacons vs a real server
deploy-on-box.sh  idempotent deploy for the aaPanel box

Run

PORT=8322 node server.js
node sim.js          # spawns its own server on :8399

Deploy (aaPanel box, done this way already)

tar czf house-among.tgz -C /srv/slchat/ws/u3/c167 house-among
# scp via jumpbox to [email protected], then:
tar xzf house-among.tgz -C /tmp && bash /tmp/house-among/deploy-on-box.sh

The script installs everything into the aaPanel site folder itself (/www/wwwroot/amongus.cubamclean.com, the vhost root — same folder as the old project, visible in the panel’s file manager): public/* at the root plus server.js, house.json, sim.js, esp32/ alongside. It bumps asset ?v= hashes (the vhost caches .js 12 h and Cloudflare happily caches that), installs systemd unit house-among (port 8322, paths inside the site folder), drops the WebSocket/beacon proxy into aaPanel’s extension dir (never edits the vhost), verifies /, /api/rules, /health and a real 101 upgrade.

Beacon setup (later, optional)

  1. Arduino IDE + esp32 board package + NimBLE-Arduino library.
  2. In room_beacon.ino: WiFi creds, SERVER_URL = http://192.168.1.7/api/beacon, ROOM = "bed1" (one per board). Flash, plug into a USB brick, place in the room.
  3. The Setup screen lists beacons reporting in within seconds.
  4. Players running Chrome/Bluefy tap “Pair my beacons” once per nearby beacon.