Commit Graph

7 Commits

Author SHA1 Message Date
4ce9471a8e Auto-generate self-signed TLS certs on startup
getUserMedia requires HTTPS, so generate certs if missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:44:36 -07:00
4b8ca04f25 Make TLS optional when certs don't exist
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:39:21 -07:00
7cce1f6bbd Merge probablycorey/refactor-server-split
Resolve conflicts: accept server split, apply hint reorder
to terminal.ts, add JSX pragma to phone.tsx

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:34:28 -07:00
11366d62b2 Add bunx support for easy sharing
- Add bin entry and CLI shim for `bunx baudy`
- Add JSX pragmas so hono/jsx resolves without tsconfig
- Add bunfig.toml, .npmignore for publishing
- Reorder error hints to prioritize headphone disconnect

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:33:34 -07:00
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
5ac02af171 Add ggwave guessing game demo
Phone UI sends number guesses via ggwave audio chirps through the air,
server decodes from mic, responds with Higher/Lower via SSE + audio.
Includes loopback audio test on startup, QR code for phone, stepped
terminal UX, chunked victory message, and timeout error handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 09:57:48 -07:00
18b08aeba2 init 2026-03-11 14:06:19 -07:00