Coder Social home page Coder Social logo

chess's Introduction

Real-Time Multiplayer Chess Game

Overview

This project is a real-time multiplayer chess game designed for engaging and competitive play. It features real-time updates, robust move validation using the chess.js library, and efficient game state management with persistent and recoverable game states.

Key Features

  • Real-Time Gameplay: Instant move updates and live game interaction.
  • Move Validation: Leveraging chess.js for accurate move validation and game rules enforcement.
  • Efficient Move Handling: Implemented a queue system to handle and store game moves, reducing WebSocket response delays.
  • Game State Recovery: Persistent game state with mechanisms for recovery to prevent progress loss during server failures.
  • Customizable Time Controls: Configurable countdown timers for each player.

Technologies

  • Frontend: React for a dynamic user interface.
  • Backend: Node.js for server-side logic and real-time WebSocket communication.
  • Database: PostgreSQL for persistent storage.
  • In-Memory Database: For fast access and performance optimization.
  • Chess.js: For handling chess game logic and validation.

Getting Started

envs

Client

SOCKET_URL=ws://localhost:8080

Server

PORT=3000
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
SESSION_SECRET=
CALLBACK_URL=
JWT_SECRET=
CLIENT_URL=
SOCKET_URL=

DB in packages

DATABASE_URL=

Installation

  1. Clone the Repository

    git clone https://github.com/azamalijafri/chess.git
    cd chess
  2. Install dependencies

    npm install
  3. Generate prisma client

    npm run db:generate
  4. Start development server

    turbo run dev

chess's People

Contributors

azamalijafri avatar turbobot-temp 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.