DEV Community

ChessDada
ChessDada

Posted on

I built a free chess platform that brings back Yahoo Chess (Node.js + Socket.IO + chess.js)

TL;DR: I built ChessDada — a free multiplayer chess platform inspired by old Yahoo Chess. No signup, no download, just instant browser-based chess. Built with Node.js, Socket.IO, and chess.js.

The Problem

Modern chess sites are bloated. Chess.com forces you through signup. Lichess defaults to account creation. The "5-second click and play" experience that made Yahoo Chess legendary in the 2000s is essentially gone.

I wanted to bring it back.

The Stack

No frameworks. No SSR. Just a simple persistent WebSocket connection per player and an event-driven game state machine.

What It Does

  • Free multiplayer chess with instant matchmaking — click "Play" and you're in a game in about 5 seconds
  • No signup required — guest play with provisional ratings
  • Multiple time controls: Bullet (1+0), Blitz (3+0, 5+0), Rapid (10+0, 15+0), Classical (30+0)
  • Multiple rooms: Beginner, Intermediate, Advanced, Blitz, Bullet, Classical
  • Real-time chat in every room and at every table
  • Spectator mode to watch ongoing games
  • Chrome Extension and Android APK also available

Architecture Decisions That Mattered

1. Server-Side Move Validation

Every move is validated server-side using chess.js before broadcasting to opponents. Client-side validation is for UX only — the server is the source of truth. This prevents cheating attempts via DevTools.

2. Game State In Memory + DB Snapshots

Active games live in a Map<tableId, gameState> for sub-100ms response times. Periodic snapshots go to MySQL for crash recovery. When the server restarts, paused games can be restored.

3. Reconnection Handling

WebSocket disconnects happen constantly (mobile networks, sleep mode, tab switching). I built a reconnection grace period — players have 30 seconds to reconnect before the game is forfeited. Game state is restored on reconnect including the move history and clock.

4. Room Categorization Instead of Matchmaking Queue

Instead of an Elo-based matchmaking queue (complex, requires lots of players to work well), I went with the Yahoo model: room-based browsing where you pick a room matching your skill/style and sit at any open table. Simpler, more transparent, and feels more "chess club" than "matchmaking algorithm".

What I Learned

1. Real-time multiplayer is hard. Race conditions in seat assignments, reconnection edge cases, simultaneous resign-and-move scenarios — every edge case I thought I had handled spawned three more.

2. Mobile WebSockets need defensive coding. Mobile browsers aggressively kill background tabs. I had to add heartbeats, exponential backoff reconnection, and "are you still there?" prompts after long idle periods.

3. Users don't read. No matter how clearly I labelled "Stand Up" (leave the seat) vs "Resign" (lose the game), people clicked the wrong one. I added confirmation modals.

4. SEO for a tool/app site is brutal. Chess news articles rank on Google. The actual game pages don't. So I started a chess news blog on the same domain to drive traffic that converts to players.

What's Next

  • Tournament mode with Swiss pairing
  • Puzzle training section
  • Better AI opponent (currently uses a simple minimax for casual practice)
  • Native iOS app

Try It

If you've got 30 seconds, click here and play a game. No signup, no email, no nonsense.

Always happy to hear feedback — especially from devs who've built real-time multiplayer apps. What edge cases did I forget?


ChessDada is a solo project. Feedback welcome on Twitter, GitHub, or in the comments below.
webdev
showdev
javascript
node

Top comments (0)