Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Online multiplayer chess built with Next.js, Express, & socket.io

License

NotificationsYou must be signed in to change notification settings

dotnize/chessu

Repository files navigation

chessu

ches.suLast commit

Yet another Chess web app.

chessu

  • 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 usingpnpm 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

  1. Installpnpm.
  2. Install the necessary dependencies by runningpnpm install in the root directory of the project.
  3. In theserver directory, create a.env file for your PostgreSQL database. You can tryElephantSQL orAiven for a free hosted database.
    PGHOST=db.example.comPGUSER=exampleuserPGPASSWORD=examplepasswordPGDATABASE=chessu
  4. Run the development servers withpnpm dev.
    • To run the frontend and backend servers separately, usepnpm dev:client andpnpm dev:server, respectively.
  5. You can now access the frontend athttp://localhost:3000 and the backend athttp://localhost:3001.

Running chessu with Docker

To build the project with Docker, you can use the providedDockerfile.

docker build -t chessu.

This command will build the Docker image with the namechessu. 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 provideddocker-compose.yml file.

docker-compose up

Please make sure to modify the values in theserver/.env file to match the values in thedocker-compose.yml file or vice versa.

The entrypoint for the Docker image is set to run pnpm.The Dockerfile'sCMD instruction is set to run the project in production mode.If you want to run the project in development mode, you can override theCMD instruction by running the following command:

docker run -p 3000:3000 -p 3001:3001 chessu dev# runs both client and server in development modedocker run -p 3000:3000 -p 3001:3001 chessu dev:client# runs only the client in development modedocker run -p 3000:3000 -p 3001:3001 chessu dev:server# runs only the server in development mode

Contributing

Please read ourContributing Guidelines before starting a pull request.

License

MIT


[8]ページ先頭

©2009-2025 Movatter.jp