A modern chess gameplay platform built with React, Vite, and TypeScript. Features matchmaking, game lobby, bot opponents, player game history, chess rating, anonymous games (without account), oauth and email login.
Install dependencies:
pnpm install-
Start the development server:
pnpm nx serve web-chess
-
Open your browser and navigate to
http://localhost:4200
-
Setup docker
brew install docker docker-compose colima colima start
-
Setup your
apps/node-chess/.env.localbased on the example fileapps/node-chess/.env.example. -
Start databases
pnpm start:db -
Run migrations
pnpm migration:run -
Start backend service
pnpm start:node
This is an Nx monorepo with a clean separation between frontend, backend, and shared libraries.
apps/web-chess- Main web application- Vite
- React
- Tanstack Router/Query
- Radix-UI
apps/node-chess- Main backend application- NodeJS
- Hono
- Socket.IO
- PostgreSQL with Drizzle ORM
- Redis
- BullMQ
libs/core-board- Board representation and move generationlibs/core-game- Chess game logic and validationlibs/core-rating- Glicko 2 rating system for player rankings
libs/react-chessboard- Interactive chessboard React component- Drag-and-drop piece movement
- Controlled and uncontrolled usage.
- Move highlighting
- Promotion dialog
libs/react-dnd- Reusable React drag-and-drop utilities
libs/api-*- Main APIs that orchestrates and interacts with all parts of the application.libs/infra-*- Repositories and services that interact with data sources.libs/be-*- Backend specific generic library
libs/api-schema- Validation logic for backend APIs, but also contains the DTOs used on FE-libs/common-*- Any common logic.
# Test all projects
pnpm test:all
# Test specific library
pnpm nx test <library-name># Build the web application
pnpm nx build web-chesspnpm typecheckpnpm perft

