CheSSH is a distributed multiplayer implementation of the game of Chess over SSH, written in Elixir, with Discord integrations to deliver alerts when players are looking for opponents, or in games when it is one's turn.
As a user, you can create 2 bot accounts at /bots. These are driven by webhooks.
For an example bot, see chessh example bot.
npmelixirpostgresqlredis(which you can ignore if you only use the ETS backend for Hammer inconfig/dev.exs[set by default])
Do something among the lines of:
git clone https://github.com/Simponic/chessh
cd chessh
asdf install
cp .env.example .env
vim .env # Fill it out mf
chmod 0700 .env
export $(cat .env | xargs)
# In one shell (after filling in your .env), migrate schema and start CheSSH
mix ecto.create
mix ecto.migrate
mix deps.compile
# Install frontend stuff
cd front
npm install
# Generate SSH keys
cd ../priv
./make_keys.sh
# Run the frontend and server concurrently!
cd ..
npm install -g concurrently
concurrently "mix run --no-halt" "cd front && npm start"The process of building the pi cluster is wholly contained in the awful
buildscripts, which will individually ssh into separate pi's and build the
services locally there as well as update the load balancer pi's configurations for nginx
and HAproxy.
More architecture talk of CheSSH can be found in my (albeit kinda cringe) FSLC presentation on Elixir: https://github.com/Simponic/chessh/blob/main/presentation/chessh.org
REACT_APP_DISCORD_INVITEis the invite link to the discord server with the CheSSH botREACT_APP_DISCORD_OAUTHis the link (after replacing the GET URL params) that will be used to initiate discord OAUTH from the frontendCLIENT_REDIRECT_AFTER_OAUTH&SERVER_REDIRECT_URIare self-explanatoryREACT_APP_SSH_SERVERandREACT_APP_SSH_PORTare used to build the .ssh config given to users on the home page of CheSSH after authenticationNEW_GAME_PINGABLE_ROLE_IDis the role id of the role to ping when one is looking for an opponentREMIND_MOVE_CHANNEL_IDis the channel id to create private threads with players for move reminders and other communicationsNEW_GAME_CHANNEL_IDis similar to the aboveCLUSTER_NODESis a comma-separated list of nodes accepting connections to connect with libclustre