Chessu
Online multiplayer chess built with Next.js, Express, & socket.io
Install / Use
/learn @dotnize/ChessuREADME
- play against other users in real-time
- spectate and chat in ongoing games with other users
- optional user accounts for tracking stats and game history
- ~~play solo against Stockfish~~ (wip)
- mobile-friendly
- ... and more (view roadmap)
Built with Next.js 14, Tailwind CSS + daisyUI, react-chessboard, chess.js, Express.js, socket.io and PostgreSQL.
Development
Node.js 20 or newer is recommended.
This project is structured as a monorepo using pnpm workspaces, separated into three packages:
client- Next.js application for the front-end, ~~deployed to ches.su via Vercel~~.server- Node/Express.js application for the back-end, ~~deployed to server.ches.su via Railway~~.types- Shared type definitions required by the client and server.
Getting started
- Install pnpm.
- Install the necessary dependencies by running
pnpm installin the root directory of the project. - In the
serverdirectory, create a.envfile for your PostgreSQL database. You can try ElephantSQL or Aiven for a free hosted database.PGHOST=db.example.com PGUSER=exampleuser PGPASSWORD=examplepassword PGDATABASE=chessu - Run the development servers with
pnpm dev.- To run the frontend and backend servers separately, use
pnpm dev:clientandpnpm dev:server, respectively.
- To run the frontend and backend servers separately, use
- You can now access the frontend at http://localhost:3000 and the backend at http://localhost:3001.
Running chessu with Docker
To build the project with Docker, you can use the provided Dockerfile.
docker build -t chessu .
This command will build the Docker image with the name chessu. You can then run the image with the following command:
docker run -p 3000:3000 -p 3001:3001 chessu
Once built, to start the project with POSTGRES, you can use the provided docker-compose.yml file.
docker-compose up
Please make sure to modify the values in the server/.env file to match the values in the docker-compose.yml file or vice versa.
The entrypoint for the Docker image is set to run pnpm.
The Dockerfile's CMD instruction is set to run the project in production mode.
If you want to run the project in development mode, you can override the CMD instruction by running the following command:
docker run -p 3000:3000 -p 3001:3001 chessu dev # runs both client and server in development mode
docker run -p 3000:3000 -p 3001:3001 chessu dev:client # runs only the client in development mode
docker run -p 3000:3000 -p 3001:3001 chessu dev:server # runs only the server in development mode
Contributing
Please read our Contributing Guidelines before starting a pull request.
License
Related Skills
bluebubbles
341.0kUse when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration). Calls go through the generic message tool with channel="bluebubbles".
oracle
341.0kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
slack
341.0kUse when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
prose
341.0kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
