Skip to content

Design Document

chatton edited this page Apr 4, 2018 · 8 revisions

Introduction

Chess Online is a HTTP Chess Web API that allows its consumers to create and play chess games via HTTP requests.

There is a React JS front end served as the root resource that allows you to play and keep start new, and keep track of all your in-progress games.

System Requirements

Modern browser (latest Firefox or Chrome)

Technology Used and Why

Spring Boot Framework / Java juint React JS / WebPack / Yarn Bootstrap /css / html5 & canvas / js / jquery Python 3 / unittest / pydoc Hibernate (Database) MySQL Maven photoshop git/github

Architecture of the Solution

See the Project Structure to see the project structure.

Spring Boot Java server

Full API spec

connected to a MySQL database Serving up a React JS app as the root resource Python bot that connects to the HTTP API as a user.

Design Methodology

Features of the Implementation

Java Server

Provides various HTTP endpoints which facilitate managing chess games programmatically via HTTP.

React Front End

React js front end allows users to play and manage their on-going chess games via a convenient web application.

PyBot

The Python bot is a python CLI tool that interacts with the HTTP api via the requests library.

Docker

A docker image and docker-compose file are available which will set up multiple containers running Chess Online.

Limitations

The current implementation of the server won't scale well with a large user base. Every time a new game is started a new process starts when each python bot is started.

Castling, En passant and promoting pawns are unimplemented, and so these moves are not valid currently.

Web app doesn't fit the screen on smaller resolutions.

Using modern css techniques which won't work on older browsers.

Known Bugs

The web application doesn't work correctly on mobile devices, this is due to the css resizing the chess board on smaller devices and interfering with the calculations which determine which tile is currently selected.

Recommendations for Future Development & Features

  1. Add unimplemented chess rules.
  2. Improve the Python bot AI.
  3. Add authentication and a better login mechanism.
  4. Improvements such as friend list, matchmaking, chat window
  5. Add React Redux and React router to make front end development easier.
  6. Look into alternatives to HTML canvas.
  7. Make web app more responsive on mobile devices.
  8. Add additional board games.
  9. Add email authentication.

Conclusions

In terms of developing the front end, it would have been preferable to have used Node.js and Express.js to develop the backend instead of Spring Boot. Needing to restart the server any time a change was made to the UI slowed down development.

It was very difficult to determine where the project should finish, due to constantly wanting to improve the project and add new features.

Clone this wiki locally