← Work
02

Undercover

A real-time multiplayer social deduction game for the browser.

Year2024
RoleDesign · Development
CategoryGame · Full-stack
Undercover — screenshot
Context

Undercover is a party game where players deduce who holds a different secret word. The web has no great version of it. I built one.

Challenge

Real-time game state synchronization across multiple players, graceful handling of disconnects, and a UI that feels fast on any device.

Key Decisions

FastAPI + Socket.IO

Python FastAPI for game logic and HTTP, Socket.IO for real-time bidirectional events. SQLite persists state across disconnections.

React + Framer Motion

Clean component structure with smooth phase transitions. TailwindCSS for rapid, consistent styling.

Stack
ReactViteTypeScriptTailwindCSSFramer MotionPythonFastAPISocket.IOSQLite
Results

88 commits. Online multiplayer and local pass-and-play. Multiple word themes. Persistent state via SQLite.

Learnings
  1. 01Game state machines are a useful mental model for any complex UI with multiple modes.
  2. 02WebSocket-based UX requires careful thought about latency and reconnection states.