GithubHelp home page GithubHelp logo

letschess's Introduction

LetsChess

Letschess Logo

Welcome to The letschess repository!

Letschess is a platform to play chess online vs other players or vs AI players.

Build status:

Frontend: Build Test Quality Gate StatusTechnical DebtBugsDuplicated Lines (%)Lines of Code
Backend: Build_and_test_app Quality Gate StatusCoverageTechnical DebtBugsVulnerabilitiesLines of Code
UserService: Build_and_test_app Quality Gate Status CoverageTechnical DebtBugsVulnerabilitiesLines of Code
GameService: Build_and_test_app Quality Gate StatusCoverageTechnical DebtBugsVulnerabilitiesLines of Code
MatchmakingService: Build_and_test_app Quality Gate StatusCoverageTechnical DebtBugsVulnerabilitiesLines of Code

For more information about Contineous Integration, Delivery and deployments see: CI&CD.md

Game in action

Kubernetes Architecture

Getting started

For starting the project you have 2 options:

  • kubernetes
  • local running & docker-compose

kubernetes

  • find a place with kubernetes installed to host the application
  • sudo microk8s enable ingress dns metrics-server storage
  • sudo microk8s kubectl apply -f .

cookie for rabbitmq services communication

  • echo -n "some secret key" > cookie
  • sudo microk8s kubectl create secret generic erlang-cookie --from-file=./cookie
  • rm cookie

for admin user

  • echo -n "letschess" > user
  • echo -n "ht4boiuehgjofmcjhyudi" > pass
  • sudo microk8s kubectl create secret generic rabbitmq-admin --from-file=./user --from-file=./pass
  • rm pass
  • rm user

install operator

  • sudo microk8s kubectl apply -f "https://github.com/rabbitmq/cluster-operator/releases/latest/download/cluster-operator.yml"
  • sudo microk8s kubectl config set-context --current --namespace=letschess

and now pull the repo

  • git pull <this repository url"
  • cd LetsChess/kubernetes
  • optionally edit the hostnames of the ingress to something appropiate

and then

  • sudo microk8s kubectl apply -f ./frontend
  • etc. repeat for each folder

and thats it! your application should be up and running.

since the ingress makes use of host mapping, you should configure your OS's hostsfile to redirect the right (sub)domains to your application. in my case i've added:

# Letschess host mapping
192.168.220.29 letschess.nl
192.168.220.29 api.letschess.nl
192.168.220.29 matchmakingservice.letschess.nl
192.168.220.29 userservice.letschess.nl
192.168.220.29 gameservice.letschess.nl
192.168.220.29 aiservice.letschess.nl
192.168.220.29 chatservice.letschess.nl
192.168.220.29 log.letschess.nl
192.168.220.29 dashboard.letschess.nl
192.168.220.29 mq.letschess.nl

you probably need to restart your device for these changes to take into effect.

local running

for local running you have to have visual studio installed and have a running docker environment. Then, run the following commands:

wsl -d docker-desktop
sysctl -w vm.max_map_count=262144
exit

docker compose up -d

cd LetsChess-Front/app
yarn
yarn start

when that's complete you only have to open the .sln file using visual studio and start all the services.

The application architecture

the (kubernetes) application architecture is as following: Kubernetes Architecture

and to go into some more detail of the inner workings of the components of the application, i've designed a C3 diagram of the application: C3 Diagram

accessing Message queue

to access the message queue, you first need to know the username and password. you can get these by:

username="$(sudo microk8s kubectl get secret letschess-mq-default-user -o jsonpath='{.data.username}' | base64 --decode)"
password="$(sudo microk8s kubectl get secret letschess-mq-default-user -o jsonpath='{.data.password}' | base64 --decode)"
echo $username
echo $password

you can then access the mq admin panel at http://mq.letschess.nl.

letschess's People

Contributors

luukebenau avatar

Stargazers

Pieter Zeilstra avatar  avatar

Watchers

 avatar

letschess's Issues

The site is down!

Why is the site down I want to play a game of chess with my friend Luuk.

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.