Commit Graph

2 Commits

Author SHA1 Message Date
37dd74c30d Refactor server monolith into focused modules with sound-only communication
Split 783-line src/server/index.tsx into:
- src/server/audio.ts: ggwave init, playback, mic listener
- src/server/game.ts: pure game logic, returns GuessResult
- src/server/terminal.ts: console output, startup, handshake routing
- src/pages/phone.tsx: Forge components + serialized client JS

Phone page is fully standalone after load — all communication via ggwave
audio (HELLO/HEY BUDDY handshake, guess responses). Added sendAndWait()
for clean half-duplex request/response flow with configurable timeout.
Server waits 500ms before replying to give phone time to switch to listening.
Added TLS support for getUserMedia on mobile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:57:18 -07:00
8e3179f7d3 Add ggwave audio calculator POC and documentation
Includes a working Bun server and iOS Safari calculator UI that uses data-over-sound
encoding/decoding via the ggwave library. Phone encodes expressions as audible chirps,
Mac server decodes via microphone, evaluates, and sends result back via SSE. Tested
reliably with ambient noise using Studio Display microphone.

Includes gotchas documentation covering iOS audio, macOS mic permissions, WASM heap,
and sample rate requirements.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-11 19:08:51 -07:00