← All projects

Keystroke actively-building

Multiplayer typing races, live

Share a room code and race friends in real-time, no sign-up. A Redis leaderboard pushes rank changes as people type. The whole stack runs in Docker.

  • React
  • TypeScript
  • Express
  • Socket.IO
  • Redis
  • Docker

WHY THIS EXISTS

I wanted to actually learn Redis and sockets past the tutorial level, and a typing race is a good excuse — it needs a live leaderboard, fast state updates, and rooms that don't step on each other.


THE HARD PART

Every keystroke updating the leaderboard for everyone in the room would've drowned the client. I throttled progress updates instead of sending on every character, and used a Redis sorted set so rank changes stay cheap to compute even as more players join.


WHAT CHANGED IN MY HEAD

Not everything needs a database. Rooms are short-lived, so I kept the whole thing in Redis with no persistent storage — a deliberate choice, not a shortcut, once I actually thought about what the data needed to outlive.


WORTH POINTING AT

  • Redis sorted set leaderboard broadcasting live rank updates over Socket.IO
  • 8-character room codes with lookalike characters removed, resolved server-side so the client never handles raw contest IDs
  • No persistent database — an intentional call given how short-lived a room is
  • Full stack containerized with Docker Compose for dev/prod parity