Modern Chess is a two-player chess experience with a Next.js frontend, a Node.js WebSocket server for real-time multiplayer, and a dedicated REST API server for account/auth operations.
A working version of this game can be found here: https://chess-championship-arena.vercel.app/
- client/ — Next.js frontend (App Router)
- ws-server/ — Node.js WebSocket server (TypeScript,
ws) - api-server/ — Node.js REST API server (Fastify, Zod, Prisma, PostgreSQL, TypeScript)
- Install dependencies:
- From client/:
pnpm install(recommended)- or
npm install
- From client/:
- Start the dev server:
pnpm devornpm run dev
- Open http://localhost:3000
- Install dependencies:
- From ws-server/:
pnpm install
- From ws-server/:
- Start the server:
pnpm dev(recommended for development)- or
pnpm build && pnpm start
- The server listens on ws://localhost:8080 by default.
Health check: http://localhost:8080/health
- Install dependencies:
- From api-server/:
pnpm install
- From api-server/:
- Start the server:
pnpm dev(recommended for development)- or
pnpm build && pnpm start
- The server listens on http://localhost:4000 by default.
- Run migrations before first start:
pnpm prisma:migrate:dev
Health check: http://localhost:4000/health
From the repository root:
docker compose up --build
This starts:
- WebSocket server on
ws://localhost:8080 - API server on
http://localhost:4000 - Frontend on http://localhost:3000
This project is licensed under the MIT License. See LICENSE for details.