Skip to content
/ Chess Public

♟️ Online chess matches with multiple simultaneous game rooms

License

Notifications You must be signed in to change notification settings

Nalhin/Chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Codecov CodeFactor License

Chess

Online chess matches with multiple simultaneous game rooms.

Table of contents

Description

Frontend was written entirely in Typescript with React as the library of choice. Flux architecture (Redux, Redux-Saga and rxjs) allowed application's view layer to work independently, resulting in less overhead, cleaner code and easier testing.

On the other hand, backend was written in Java and implemented in a docker oriented microservice architecture, utilizing the versatility of Spring Boot. Game logic was developed entirely from scratch, without the use of any chess engine.

Necessary data is preserved in MySQL database.

Features

  • Light/Dark theme
  • Authentication
  • Profiles
  • Queue
  • Chess games
  • Chat
  • Match history

Presentation

Overview

Project Overview

Queue

Queue

Board

Game

Messages

Messages

Match History

Pokemon Single

Technology Stack

Frontend

  • React
  • Redux
  • Redux-Saga
  • Rxjs
  • Websockets
  • React DnD
  • Material UI
  • Emotion
  • React Testing Library

Backend

  • Java
  • Spring Boot
  • Spring Security
  • Spring MVC
  • Spring Messaging
  • Eureka Discovery Server
  • Spring Cloud Gateway
  • JUnit 5
  • Mockito
  • Kafka
  • Mysql
  • Docker

Architecture

Architecture

Folder Structure

Frontend

src
├── components (reusable components)
├── interfaces (typescript interfaces)
├── pages (routing with associated pages and components)
├── store (redux store)
│   ├── chat
│   ├── customRouter
│   ├── user
│   ├── gameHistory
│   ├── queue
│   ├── toaster
│   └── game
│       ├── game.actions.ts
│       ├── game.saga.ts
│       ├── game.reducer.ts
│       ├── game.types.ts
│       ├── game.subscriptions.ts
│       ├── game.api.ts
│       └── game.selectors.ts
│
├── styles (theme and style variables)
├── utils (utility functions)
└── websocket (websocket config and helpers)

Backend

server 
├── authentication-service
├── chat-service
├── game-service 
├── queue-service
├── history-service
├── gateway-service
└── eureka-server

Prerequisites

Frontend

Install node package manager npm. You should be able to run the following commands.

node --version
npm --version

Backend

Install jdk13 and maven.

You should be able to run the following commands.

java --version
mvn --version

Install docker and docker-compose. You should be able to run the following commands.

docker --version
docker-compose --version

Installation

Frontend

cd app 
npm install
npm run start

Backend

cd server
mvn clean install
docker-compose up

Tests

In order to manually run tests, follow the instructions below.

Frontend

cd app && npm run test

Backend

cd server && mvn verify

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Releases

No releases published

Packages

No packages published

Languages