Online Chess Platform
Design a real-time online chess platform using PostgreSQL, Redis Pub/Sub, and WebSockets. Users can create games, join through invite links or matchmaking, play timed chess, reconnect, and review game history. The server validates moves, enforces turns and clocks, and handles checkmate, draws, resignations, and timeouts. Use PostgreSQL as the source of truth with exactly these tables: | Table | Purpose | |---|---| | accounts | User accounts and player identity. | | games | Game ID, participants, settings, invite token/link, status, and current_version. | | game_metadata | Immutable ful…
