A production-grade, real-time multiplayer chess platform built with Next.js, TypeScript, WebSocket, and Docker, featuring full rule implementation, elegant UI, and modular architecture.
🎮 Play Now: https://chesss.thecabbro.com
- ✅ Real-time multiplayer gameplay via WebSocket
- ✅ AI-powered move suggestions with scoring
- ✅ Full chess rule set — castling, en passant, promotion
- ✅ Room-based system for private or public matches
- ✅ Responsive UI with Tailwind CSS and chess-themed visuals
- ✅ Move history tracking and real-time synchronization
- ✅ Dockerized deployment for instant setup
- ✅ Monorepo structure managed with Turborepo + pnpm
- ✅ Type-safe game logic using TypeScript across all modules

Create or join chess rooms instantly.

Real-time play, AI move suggestions, and move tracking.
- Frontend: Next.js 15 + React 19 + Tailwind CSS v4
- Backend: Node.js + ws (WebSocket)
- Game Logic: Custom TypeScript chess engine
- Infra: Docker + Render + Vercel
- Build System: Turborepo + pnpm
- CI/CD: GitHub Actions (automated build/test/deploy)
git clone https://github.com/nikhilachale/Chess.git
cd Chess
# Build and start containers
docker-compose up --build
# Access
Frontend: http://localhost:3000
WebSocket: ws://localhost:8080
# ♞ Chess — Real-Time Multiplayer Game
A **production-grade, real-time multiplayer chess platform** built with **Next.js**, **TypeScript**, **WebSocket**, and **Docker**, featuring full rule implementation, elegant UI, and modular architecture.




---
## 🚀 Live Demo
🎮 **Play Now:** [https://chesss.thecabbro.com](https://chesss.thecabbro.com)
---
## 🧩 Key Features
- ✅ **Real-time multiplayer gameplay** via WebSocket
- ✅ **AI-powered move suggestions** with scoring
- ✅ **Full chess rule set** — castling, en passant, promotion
- ✅ **Room-based system** for private or public matches
- ✅ **Responsive UI** with Tailwind CSS and chess-themed visuals
- ✅ **Move history tracking** and real-time synchronization
- ✅ **Dockerized deployment** for instant setup
- ✅ **Monorepo structure** managed with Turborepo + pnpm
- ✅ **Type-safe game logic** using TypeScript across all modules
---
## 🖼️ Screenshots
### Landing Page

*Create or join chess rooms instantly.*
### Gameplay Interface

*Real-time play, AI move suggestions, and move tracking.*
---
## 🏗️ Architecture Overview
┌─────────────────┐ WebSocket ┌─────────────────┐ │ Next.js UI │◄──────────────►│ WebSocket │ │ (Port 3000) │ │ Server │ │ │ │ (Port 8080) │ │ - Game Board │ │ - Room Mgmt │ │ - Move Input │ │ - Move Sync │ │ - Player UI │ │ - Validation │ └─────────────────┘ └─────────────────┘
- **Frontend:** Next.js 15 + React 19 + Tailwind CSS v4
- **Backend:** Node.js + ws (WebSocket)
- **Game Logic:** Custom TypeScript chess engine
- **Infra:** Docker + Render + Vercel
- **Build System:** Turborepo + pnpm
- **CI/CD:** GitHub Actions (automated build/test/deploy)
---
## 🐳 Quick Start (Docker)
```bash
git clone https://github.com/nikhilachale/Chess.git
cd Chess
# Build and start containers
docker-compose up --build
# Access
Frontend: http://localhost:3000
WebSocket: ws://localhost:8080
docker build -f docker/Dockerfile.ui -t chess-ui .
docker build -f docker/Dockerfile.ws -t chess-ws .
docker run -p 8080:8080 chess-ws
docker run -p 3000:3000 -e NEXT_PUBLIC_WS_URL=ws://localhost:8080 chess-ui- Node.js 18+
- pnpm (recommended)
- Docker (optional, for production parity)
pnpm install
pnpm dev --filter=socket # Start WebSocket
pnpm dev --filter=ui # Start frontend
pnpm lint # Linting
pnpm type-check # Type safety check
pnpm build # Production buildCreate a .env file:
NEXT_PUBLIC_WS_URL=ws://localhost:8080chess/
├── apps/
│ ├── ui/ # Next.js frontend
│ ├── socket/ # WebSocket server
│ └── backend/ # Express backend (optional)
├── packages/
│ ├── chess/ # Core chess engine
│ ├── ui/ # Shared components
│ ├── eslint-config/ # Shared linting rules
│ └── typescript-config/ # TS configs
├── docker/
│ ├── Dockerfile.ui
│ └── Dockerfile.ws
├── docker-compose.yml
└── .env
- GitHub Actions: Lint, build, test, deploy
- Docker: Containerized services for consistency
- Vercel + Render: Automated deployments
- Badges: Build & deploy status displayed in README
- Spectator mode
- Player reconnect support
- Player statistics and rating system
- Match replays
- In-game chat / emoji reactions
- Dark mode toggle
Port conflicts
lsof -i :3000
lsof -i :8080
kill -9 <PID>Docker cleanup
docker-compose down --volumes --rmi all
docker-compose build --no-cacheLogs
docker-compose logs -f- Fork this repo
- Create a feature branch
- Run
pnpm devto test locally - Submit a pull request
- Visit the live app and capture HD screenshots
- Follow
/screenshots/README.mdfor guidelines - Add them via PR
| Layer | Technology |
|---|---|
| Frontend | Next.js 15, React 19, Tailwind CSS v4 |
| Backend | Node.js, ws (WebSocket) |
| Build System | Turborepo, pnpm |
| Containerization | Docker, Docker Compose |
| Deployment | Vercel (UI), Render (Socket) |
| Language | TypeScript (100%) |
Nikhil Achale
Final-Year B.Tech — NIT Patna
Full-Stack & Web Developer
🔗 GitHub
🔗 LinkedIn
🌐 Live Project
Licensed under the MIT License. Free for modification and commercial use.