{"id":20947805,"url":"https://github.com/alphahydrae/boardr","last_synced_at":"2026-04-27T10:32:19.245Z","repository":{"id":43967919,"uuid":"222786075","full_name":"AlphaHydrae/boardr","owner":"AlphaHydrae","description":"A distributed web game to play board games like Chess or Tic-Tac-Toe.","archived":false,"fork":false,"pushed_at":"2022-02-13T05:50:47.000Z","size":1155,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-29T05:50:48.617Z","etag":null,"topics":["board-game","elixir","elm","game","game-engine","phoenix"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlphaHydrae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-19T20:43:28.000Z","updated_at":"2021-04-08T17:26:27.000Z","dependencies_parsed_at":"2022-09-08T16:42:22.042Z","dependency_job_id":null,"html_url":"https://github.com/AlphaHydrae/boardr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AlphaHydrae/boardr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaHydrae%2Fboardr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaHydrae%2Fboardr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaHydrae%2Fboardr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaHydrae%2Fboardr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlphaHydrae","download_url":"https://codeload.github.com/AlphaHydrae/boardr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlphaHydrae%2Fboardr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32333196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["board-game","elixir","elm","game","game-engine","phoenix"],"created_at":"2024-11-19T00:13:19.055Z","updated_at":"2026-04-27T10:32:19.221Z","avatar_url":"https://github.com/AlphaHydrae.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Boardr\n\nA distributed web application to play board games.\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [Disclaimer](#disclaimer)\n- [Contents](#contents)\n  - [HTTP API backend](#http-api-backend)\n  - [Single-page application frontend](#single-page-application-frontend)\n  - [Load testing](#load-testing)\n  - [Local Vagrant environment](#local-vagrant-environment)\n  - [Raspberry Pi cluster](#raspberry-pi-cluster)\n- [Requirements](#requirements)\n  - [Runtime](#runtime)\n  - [Database](#database)\n- [Development](#development)\n  - [Backend](#backend)\n  - [Frontend](#frontend)\n- [TODO](#todo)\n  - [Documentation](#documentation)\n  - [Roadmap](#roadmap)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\n\n## Disclaimer\n\nThis repository is a work in progress. It contains a pile of *unholy*\nexperiments on my journey to learn [Elixir][elixir] and [Elm][elm], and to try\nto make things fit together that should not. It barely holds together. **Do not,\nunder any circumstances**, take any of this code within one hundred feet of any\nproduction system. **You have been warned.**\n\n\n\n## Contents\n\nThe mess in this repository.\n\n### HTTP API backend\n\nThe [`server` directory](./server) contains the application's backend written in\n[Elixir][elixir].\n\n* The application is an [Elixir Umbrella project][elixir-umbrella] split into a\n  \"business\" application in `server/apps/boardr` and the HTTP API in\n  `server/apps/boardr_api`.\n* The HTTP API is a hypermedia REST API using the [HAL+JSON format][hal].\n* Errors are intended to be in the standard format described by the [Problem\n  Details for HTTP APIs RFC][http-problem-details], although all error handling\n  in this project is a work in progress.\n\n### Single-page application frontend\n\nThe [`client` directory](./client) contains the application's frontend written\nin [Elm][elm].\n\n### Load testing\n\nThis repository contains a load-testing scenario for the application, written\nwith [Locust.io][locust].\n\n* The code is in the [`load-testing` directory](./load-testing).\n* You may set up a local test using [Docker][docker] and [Docker\n  Compose][compose] by running `./scripts/load-testing.sh`.\n\n### Local Vagrant environment\n\n\u003e WARNING: this environment may not fully work.\n\nA [Vagrantfile][vagrantfile] to run the application in a local virtual machine\nwith Vagrant.\n\n* Requires [Vagrant][vagrant], [VirtualBox][virtualbox] and [Ansible][ansible].\n* [Microk8s][microk8s] is installed on the virtual machine to run the\n  application in a [Kubernetes][k8s] cluster. The Ansible roles that do this are\n  in the [`k8s` directory](./k8s).\n* Define the following hosts in your `/etc/hosts` file:\n\n      192.168.50.4 boardr.vagrant\n      192.168.50.4 locust.boardr.vagrant\n      192.168.50.4 traefik.boardr.vagrant\n* **Note:** the Kubernetes configuration in the [`k8s/config`\n  directory](./k8s/config) must be manually loaded from inside the virtual\n  machine using the `kubectl` command. The directory is available inside the\n  virtual machine at `/vagrant/k8s/config`.\n\n### Raspberry Pi cluster\n\nAn [Ansible][ansible] playbook to run the application in a distributed cluster\nof [Raspberry Pi single-board computers][rpi].\n\n* The Ansible playbook and roles are in the [`cluster` directory](./cluster).\n* Requires [Ansible][ansible] and at least 4 Raspberry Pi computers.\n* The cluster can be simulated in local virtual machines using\n  [Vagrant][vagrant] and [VirtualBox][virtualbox]. Use Vagrant from the\n  `cluster` directory.\n\n  * Define the following hosts in your `/etc/hosts` file:\n\n        192.168.50.5 boardr.cluster.vagrant\n* Copy `cluster/inventory.vagrant.yml` to `cluster/inventory.yml` and use that\n  inventory to deploy the application to your own cluster. The configuration\n  assumes each Raspberry has a fixed IP address.\n\n  * Define the following hosts in your `/etc/hosts` file (assuming `10.0.1.100`\n    is the Raspberry Pi on which the reverse proxy is running):\n\n        10.0.1.100 boardr.cluster\n\n\n\n## Requirements\n\n### Runtime\n\nAs described in [`.tool-versions`](./.tool-versions):\n\n```\nelixir 1.10.0-otp-22\nelm 0.19.1\nerlang 22.2.3\nnodejs 12.14.1\n```\n\nRun `asdf install` with [asdf][asdf] to install everything.\n\n\u003e Tested on macOS 10.14 \u0026 10.15.\n\n### Database\n\n* [PostgreSQL][postgresql] 12.x\n\n\n\n## Development\n\n### Backend\n\nCreate `server/config/env.exs` with the following contents:\n\n```elixir\nuse Mix.Config\n\nconfig :boardr, :options,\n  client_id: \"GOOGLE_CLIENT_ID\",\n  client_secret: \"GOOGLE_CLIENT_SECRET\"\n\nconfig :boardr, Boardr.Auth,\n  secret_key_base: \"CHANGE_ME_TO_A_VERY_LONG_RANDOM_STRING\"\n```\n\nMigrate the database:\n\n```bash\nmix ecto.migrate\n```\n\n\u003e The application will attempt to connect to the `boardr` database through the\n\u003e PostgreSQL Unix socket by default. Set `$BOARDR_DATABASE_URL` or\n\u003e `$DATABASE_URL` if your setup is different (e.g.\n\u003e `ecto://boardr:changeme@localhost:5432/boardr`).\n\nRun the server in development mode:\n\n```bash\ncd backend\nmix phx.server\n```\n\nOpen http://localhost:4000/api.\n\n### Frontend\n\n```bash\ncd frontend\nnpm ci\nnpm start\n```\n\nOpen http://localhost:8000.\n\n\n\n## TODO\n\n### Documentation\n\n* There are working Dockerfiles in `server` which should be documented.\n* Document commands to set up the other environments (production, docker, load\n  testing, Vagrant, cluster).\n\n### Roadmap\n\n* Use WebSocket, because an HTTP API for a web game was a bad idea to begin with\n  (duh).\n* See if Locust can be coerced into testing a non-request-response-based\n  WebSocket API, or find another load testing tool.\n* Find more things that don't fit to shoehorn into this project.\n\n\n\n[ansible]: https://www.ansible.com\n[asdf]: https://asdf-vm.com\n[compose]: https://docs.docker.com/compose/\n[docker]: https://www.docker.com\n[elixir]: https://elixir-lang.org\n[elixir-umbrella]: https://elixir-lang.org/getting-started/mix-otp/dependencies-and-umbrella-projects.html\n[elm]: https://elm-lang.org\n[hal]: http://stateless.co/hal_specification.html\n[http-problem-details]: https://tools.ietf.org/html/rfc7807\n[k8s]: https://kubernetes.io\n[locust]: https://locust.io\n[microk8s]: https://microk8s.io\n[postgresql]: https://www.postgresql.org\n[rpi]: https://www.raspberrypi.org\n[vagrant]: https://www.vagrantup.com\n[vagrantfile]: https://www.vagrantup.com/docs/vagrantfile/\n[virtualbox]: https://www.virtualbox.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphahydrae%2Fboardr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphahydrae%2Fboardr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphahydrae%2Fboardr/lists"}