Better README

This commit is contained in:
Lizzy Hunt 2023-02-24 15:59:42 -07:00
parent 829deb33e3
commit ebafe04d35
No known key found for this signature in database
GPG Key ID: 8AC6A4B840C0EC49
3 changed files with 61 additions and 6 deletions

View File

@ -2,10 +2,6 @@ HOST=0.0.0.0
NODE_ID=aUniqueString NODE_ID=aUniqueString
DATABASE_URL=ecto://chessh:password@database/chessh DATABASE_URL=ecto://chessh:password@database/chessh
POSTGRES_USER=chessh
POSTGRES_PASSWORD=password
POSTGRES_DATABASE=chessh
WEB_PORT=8080 WEB_PORT=8080
REACT_APP_DISCORD_INVITE=https://discord.gg/ajsdlkfjaskldjf REACT_APP_DISCORD_INVITE=https://discord.gg/ajsdlkfjaskldjf

View File

@ -1,5 +1,62 @@
# CheSSH # CheSSH
Check out the USUFSLC presentation for this application to understand best what the hell this is: 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 a player's turn.
[https://linux.usu.edu/stream/12](https://linux.usu.edu/stream/12) ## Usage
### Dependencies
+ `npm`
+ `elixir`
+ `postgresql`
+ `redis` (which you can ignore if you only use the ETS backend for Hammer for
`config/dev.exs`)
### Installation
Do something among the lines of:
```
git clone https://github.com/Simponic/chessh
cd chessh
cp .env.example .env
chmod 0700 .env
# In one shell (after filling in your .env), start CheSSH
export $(cat .env | xargs)
mix ecto.create
mix ecto.migrate
iex -S mix
# In another shell, start the frontend
export $(cat .env | xargs)
cd front
npm install
npm start
```
### Environment Variables (mostly optional)
+ `REACT_APP_DISCORD_INVITE` is the invite link to the discord server with the
CheSSH bot
+ `REACT_APP_DISCORD_OAUTH` is the link (after replacing the GET params) that will
be used to start OAUTH from the frontend
+ `CLIENT_REDIRECT_AFTER_OAUTH` & `SERVER_REDIRECT_URI` are self-explanatory
+ `REACT_APP_SSH_SERVER` and `REACT_APP_SSH_PORT` are used to build the .ssh config
given to users on the home page of CheSSH after authentication
+ `NEW_GAME_PINGABLE_ROLE_ID` is the role id of the role to ping when a player is
looking for an opponent
+ `REMIND_MOVE_CHANNEL_ID` is the channel id to create private threads with players
for move reminders and other communications
+ `NEW_GAME_CHANNEL_ID` is similar to the above
## Architecture
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 as well as update the load balancer pi's configurations for nginx
and HAproxy.
More brief architecture talk of CheSSH can be in my (albeit kinda cringe) FSLC
presentation on Elixir:
[https://github.com/Simponic/chessh/blob/main/presentation/chessh.org](https://github.com/Simponic/chessh/blob/main/presentation/chessh.org)

View File

@ -5,6 +5,8 @@
* Reminder: linux.usu.edu * Reminder: linux.usu.edu
This meeting should be being streamed live at [[https://linux.usu.edu/streams]]. This meeting should be being streamed live at [[https://linux.usu.edu/streams]].
(UPDATE: It is now archived at [[https://linux.usu.edu/stream/12]])
* Introduction * Introduction
#+BEGIN_SRC elixir #+BEGIN_SRC elixir
defmodule Hello do defmodule Hello do