A real-time multiplayer chess application built using React, Node.js, and Socket.IO. The platform enables synchronized gameplay through private rooms, configurable timers, and AI-based practice powered by Socketfish.
CheckMateX is designed to deliver a low-latency, real-time chess experience over the web. It supports both multiplayer gameplay and AI-based practice. The system ensures consistent game state synchronization across all connected clients using WebSocket-based communication.
- Real-time multiplayer gameplay using Socket.IO
- Private room creation and joining via secure PIN
- AI-based practice using Socketfish integration
- Configurable timers for competitive matches
- Multiple chessboard themes
- Server-side move validation and game state management
- Scalable and modular architecture
- React (Vite)
- Tailwind CSS
- Socket.IO Client
- JavaScript (ES6+)
- Node.js
- Express.js
- Socket.IO
checkmatex/
├── public/
│ └── logo.png
│
├── server/
│ ├── config/
│ │ └── socket.js
│ │
│ ├── controllers/
│ │ ├── gameController.js
│ │ └── roomController.js
│ │
│ ├── services/
│ │ ├── chessAiService.js
│ │ ├── chessService.js
│ │ ├── roomService.js
│ │ └── timerService.js
│ │
│ ├── sockets/
│ │ ├── game.socket.js
│ │ ├── room.socket.js
│ │ ├── timer.socket.js
│ │ └── index.js
│ │
│ ├── utils/
│ │ ├── constants.js
│ │ ├── generatePin.js
│ │ ├── logger.js
│ │ └── validateMove.js
│ │
│ ├── app.js
│ ├── server.js
│ ├── index.js
│ ├── .env
│ ├── package.json
│ └── package-lock.json
│
├── src/
│ ├── components/
│ │ ├── ChessBoard/
│ │ │ ├── ChessBoard.jsx
│ │ │ ├── BoardTheme.css
│ │ │ └── index.jsx
│ │ │
│ │ ├── Controls/
│ │ │ ├── ThemeSelector.jsx
│ │ │ └── TimeSelector.jsx
│ │ │
│ │ ├── Room/
│ │ ├── Timer/
│ │ │ └── Timer.jsx
│ │ │
│ │ └── UI/
│ │ └── LoadingOverlay.jsx
│ │
│ ├── pages/
│ │ ├── Game.jsx
│ │ ├── Home.jsx
│ │ └── NotFound.jsx
│ │
│ ├── socket/
│ │ └── socket.js
│ │
│ ├── store/
│ │ ├── gameStore.js
│ │ ├── roomStore.js
│ │ └── timerStore.js
│ │
│ ├── utils/
│ │ ├── chessConfig.js
│ │ └── constants.js
│ │
│ ├── App.jsx
│ ├── App.css
│ ├── index.css
│ └── main.jsx
│
├── index.html
├── README.md
├── .gitignore
├── eslint.config.js
├── vite.config.js
├── postcss.config.js
├── tailwind.config.js
├── package.json
└── package-lock.json
The application follows a modular client-server architecture:
- The frontend manages UI rendering, user interactions, and socket communication.
- The backend is responsible for room management, move validation, timer synchronization, and AI computation.
- Socket.IO enables bidirectional communication for real-time updates.
- The system is divided into controllers, services, and socket layers to maintain separation of concerns.
- AI-based gameplay is handled via
chessAiService.js, integrating Socketfish for move generation.
git clone https://github.com/your-username/checkmatex.git
cd checkmatexFrontend:
npm installBackend:
cd server
npm installcd server
npm startnpm run devApplication URL:
http://localhost:5173
Create a .env file inside the server directory:
PORT=5000
CLIENT_URL=http://localhost:5173
- Spectator mode
- Match history with PGN export
- User authentication and player profiles
- Online matchmaking system
- Deployment and scalability improvements
Manish Kumar Sah B.Tech Computer Science and Engineering Lovely Professional University
This project is licensed under the MIT License.
If this repository adds value to your learning, consider giving it a ⭐ to show your support.