A full-featured multiplayer and AI-powered Chess game built using the MERN stack with real-time WebSocket communication. This project supports multiple modes including AI vs Human, Local 2-Player, and Online Multiplayer with matchmaking, chat, and timers.
-
Play vs Computer (Stockfish)
- Features: Undo, Resign
-
Play Local (Two players on one device)
- Feature: Undo
-
Play Multiplayer
- Random or Invite Code-based matchmaking
- Real-time Chat
- Offer/Accept/Reject Draw
- Timer Mode (1, 3, 5, 10, 30 minutes)
- Invite Code Generation and Entry
- Requires Login (or Guest access)
- Common features in all three- Move history, Move history navigation
- Login and Signup with Play as Guest options
- Chessboard with drag-and-drop and click-to-move
- Real-time multiplayer via WebSockets
- Mobile-friendly responsive UI
- Sound effects
- Complete input validation on server side and client side
git clone https://github.com/vaibhav1565/Chess
cd Chesscd backend
npm ciCreate a .env file in backend with:
SECRET_KEY=your_secret_key_here
MONGODB_CONNECTION_STRING=your_mongodb_connection_string_here
Start backend:
npm install -g nodemon
npm run devcd ../frontend
npm ci
npm run devNow open your browser and go to the URL shown in terminal (usually http://localhost:5173) to use the app.
Pull requests are welcome!




