A full-stack chess platform where users can play chess against an AI engine, play with friends in real time, and analyze games with coaching insights.
This project is built as a learning project to understand real-world full-stack architecture, including authentication, game logic, AI integration, and real-time communication.
- User registration and login
- Secure authentication system
- User profiles and statistics
- Interactive chessboard UI
- Legal move validation
- Play against Stockfish AI
- Game state management
- Real-time chess with friends
- Room-based game system
- WebSocket communication
- Move suggestions
- Mistake detection
- Game analysis
- Save matches
- Track performance
- View past games
- React
- react-chessboard
- chess.js
- Tailwind CSS
- Axios
- Socket.io Client
- Node.js
- Express.js
- Socket.io
- JWT Authentication
- Stockfish Engine
- MongoDB Atlas
- Mongoose
- Frontend: Vercel
- Backend: Render
- Database: MongoDB Atlas
chess-ai-platform
│
├── frontend
│ ├── src
│ │ ├── components
│ │ │ └── ChessBoard.jsx
│ │ ├── pages
│ │ │ └── Game.jsx
│ │ ├── services
│ │ │ └── socket.js
│ │ └── App.jsx
│
├── backend
│ ├── controllers
│ ├── models
│ ├── routes
│ ├── sockets
│ └── server.js
git clone https://github.com/yourusername/chess-ai-platform.git
cd chess-ai-platform
cd backend
npm install
Create a .env file:
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secret_key
Run backend server:
npm run dev
cd frontend
npm install
Run frontend:
npm run dev
- Player makes a move
- Board state (FEN) is sent to the backend
- Backend runs Stockfish
- Stockfish returns the best move
- Move is applied on the board
- Player creates or joins a room
- Both players connect via Socket.io
- Moves are broadcast in real time
- Boards stay synchronized for both players
- Full-stack application architecture
- Real-time communication using WebSockets
- Game state management with chess.js
- Integrating AI engines (Stockfish)
- Building scalable backend APIs
- Deploying production-ready web apps
- AI coaching system
- Game analysis with evaluation graph
- Rating system (ELO)
- Spectator mode
- Puzzle training
- Mobile optimization
Utkarsh Jeet Singh Yadav
B.Tech CSE student building full-stack and AI-powered applications.
