PavelZX / king_of_tokyo

πŸ‘‘ King of Tokyo Multiplayer Board Game using Phoenix LiveView

Home Page:https://theking.live

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KingOfTokyo

Elixir CI

A "King of Tokyo" Game Written in Elixir, Phoenix and Phoenix Live View.

I created this app for playing one of my favorite board games in the age of social distancing. It is meant to be used in a multi person video chat app, such as Zoom.

The person who owns the game needs to point a camera at the cards and share them with the rest of the group. Every player must then go to https://theking.live and join the same room code.

Running

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Install Node.js dependencies with yarn install --cwd assets
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

Deployment

  1. Set up a DigitalOcean account

  2. Get an API token from the API section on the sidebar and export an API token like so:

$ export DIGITALOCEAN_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  1. Create an ssh key for the project for the project:
$ ssh-keygen -f ~/.ssh/theking
  1. Install Pulumi dependencies:
$ yarn --cwd infra
  1. Run Pulumi to associate your ssh key, create a droplet, domain and firewall:
$ mix pulumi up
  1. Store the Ansible Vault password in ansible/.vault-password

  2. Run Ansible to provision the droplet:

$ mix ansible
  1. Build the release using edeliver:
$ mix edeliver build release
  1. Deploy using edeliver:
$ mix edeliver deploy release to production --version=VERSION_FROM_RELEASE_OUTPUT --start-deploy

About

πŸ‘‘ King of Tokyo Multiplayer Board Game using Phoenix LiveView

https://theking.live


Languages

Language:Elixir 79.0%Language:CSS 12.2%Language:JavaScript 3.7%Language:Shell 2.2%Language:TypeScript 1.7%Language:HTML 1.2%