Ram Maheshwari Logo Image
Milkias Yeheyis

MChess

A chess app with multiplayer functionality using ReactJS and FastAPI.

Project Image

Project Overview

MChess is a web app to play chess against your mates offline or anyone in the world online through the internet. I absolutely love the game of chess and so naturally I wanted to build a chess game. I thought it would be a nice side project to learn about some cool technologies.

Upon starting the project, I wanted to checkout a new web framework for me, FastAPI for the backend. Therefore, I went out of my comfort zone and built the entire backend through FastAPI. I also wanted to come up with the entire chess logic by myself so I didn't use any libraries for the chess logic.

A new learning experience in this project was learning how to handle websocket connections. I decided against using socketio and just used the builtin websocket object and just wrote my own class to handle the game connections in the backend. I learnt how cool websocket connections are and how it's so much better than long polling which I would have used previously.

The project also includes authentication and routing in react.

Tools Used

React
FastAPI
MySQL
GIT
SQLAlchemy
HTML
CSS
JavaScript
WebSockets