ChessMate is a real-time, peer-to-peer multiplayer chess game built for instant, low-latency play — no login required. Just register your name, invite a friend, and start playing in seconds.
Designed with performance and simplicity in mind, ChessMate combines custom-built chess logic, Redis, and WebSockets to deliver a smooth, sub-10ms latency experience right in your browser.
-
🧑🤝🧑 Instant Peer Connection
Players can join by simply entering a name and requesting their friend's name — no login or signup needed. -
⚡ Ultra-low Latency
Real-time gameplay with <10ms delay using Redis and Socket.IO for state synchronization. -
🧠 Fully Custom Chess Logic
All chess rules and piece movements — including check, checkmate, castling, and en passant — are implemented from scratch without external chess libraries. -
🎨 Interactive Frontend with chessboard.js
Visual game board using chessboard.js for a polished interface. -
🗂️ Session Management with Redis
Player matching, game state management, and messaging handled efficiently through Redis.
- Frontend: HTML, CSS, JavaScript, chessboard.js
- Backend: Node.js
- Real-Time Communication: Socket.IO
- Data Store: Redis
- Player A registers with a name and enters Player B’s name to request a match.
- Redis temporarily stores both players' session info.
- A WebSocket connection is established via Socket.IO once both players are matched.
- Players exchange moves in real time with minimal latency.
- Each move triggers a full validation cycle, including:
- Piece legality
- King safety (no illegal check-exposing moves)
- Checkmate and stalemate detection
git clone https://github.com/Dharshan-K/dhaChess
cd chessmate/Frontend
npm install
create .env with redis credentials
cd chessmate/Backend
npm run server