Giter Club home page Giter Club logo

chessu's Introduction

chessust

chessust.vercel.app MIT Licensed Last commit

This project is still in the early stages of development. Expect bugs and incomplete features.

Yet another Chess web app. Live demo at chessust.vercel.app.

  • 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 13, Tailwind CSS + daisyUI, react-chessboard, chess.js, Express.js, socket.io and PostgreSQL.

Configuration

Node.js 18 or newer is recommended.

This project is structured as a monorepo using npm workspaces, separated into three packages:

  • client - Next.js application for the front-end, deployed to chessust.vercel.app via Vercel.
  • server - Node/Express.js application for the back-end, deployed to server.chessust.vercel.app via Railway.
  • types - Shared type definitions for the client and server.

For separate deployments, you may exclude the client or server directory. However, you should include the types folder as it contains shared type definitions that are required by both packages.

Environment variables

client:

NEXT_PUBLIC_API_URL=http://localhost:3001 # replace with backend URL

server:

CORS_ORIGIN=http://localhost:3000 # replace with frontend URL
PORT=3001
SESSION_SECRET=randomstring # replace for security

# PostgreSQL connection info (required)
PGHOST=db.example.com
PGUSER=exampleuser
PGPASSWORD=examplepassword
PGDATABASE=chessu

You may also create a .env file in each package directory to set their environment variables.

Scripts

For development:

# install all dependencies, including eslint and prettier
npm install

# concurrently run frontend and backend development servers
npm run dev

# or run them separately
npm run dev -w client
npm run dev -w server

For production:

# for separate deployments
npm install -w client
npm install -w server

npm run build -w client
npm run build -w server

npm start -w client
npm start -w server

Contributing

Pull requests are welcome. For feature changes or suggestions, please open an issue first for discussion.

chessu's People

Contributors

dependabot[bot] avatar myworldbox avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.