Browser voice rooms: walk a pixel-art map and hear people by distance, peer-to-peer over WebRTC.

Landing page with a live, walkable room
Voice rooms and video calls make everyone talk over everyone: one shared channel, no sense of space, and no natural way to drift in and out of conversations the way you would at a real party. Peer-to-peer voice also normally means anyone can be heard by anyone, and the server ends up either relaying all the audio or knowing nothing about who is behaving badly.
Built and deployed a full-stack social audio app where each room is a small pixel-art world: you walk an avatar around, hear people by distance, and get private conversation zones, with voice and chat travelling directly between browsers while the server only handles signaling, accounts, and moderation.
Talk Space is a pnpm + Turborepo monorepo with a React 19/Vite web app and an Express 5 + Socket.IO API. Every room is a tile map rendered by a custom 2D canvas engine; voice, chat and avatar positions flow peer-to-peer over WebRTC, so the server never carries audio. It only authenticates sockets, tracks who is in which room, and relays the connection handshake. The deployed system runs the web app on Netlify, the API on Render, live room state on Upstash Redis and accounts/reports on Neon PostgreSQL.
Key technical achievements include:
hearingGain function gives full volume within 2 tiles, quadratic falloff out to 7 tiles, and silence beyond; people in the same audio zone hear each other at full volume while a zone is isolated from everything outside it. Because the function is symmetric, both sides of a conversation always agree on whether they can hear each other.GainNode (iOS Safari treats <audio>.volume as read-only), smoothed over ~60 ms so walking past someone fades instead of clicking, with a muted media-element workaround for Chromium's WebRTC-to-WebAudio quirk. Voice is also not sent at all to peers who are out of earshot.NetworkManager/PeerLink pair implements WebRTC's 'perfect negotiation' pattern (a deterministic polite/impolite side resolves two people joining at the same instant), buffers early signals, redials failed links with exponential backoff, and keeps a reliable data channel for chat plus an unreliable one for positions. Linking policy sits behind a single shouldLink function, so the full mesh (8 people per room) can later be swapped for a sparser topology.tokenVersion counter to revoke every token at once, and better-auth used only for the Google OAuth handshake. Users can block, report or (as host) remove people; reports land in an admin queue with dismiss, strike, suspend and ban actions, and a ban disconnects the user's live sockets across all instances.