{"id":20851166,"url":"https://github.com/elementbound/letterbox","last_synced_at":"2025-12-28T06:59:17.627Z","repository":{"id":71330514,"uuid":"314313272","full_name":"elementbound/letterbox","owner":"elementbound","description":null,"archived":false,"fork":false,"pushed_at":"2020-12-13T12:34:52.000Z","size":237,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-19T06:13:09.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/elementbound.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-19T16:57:21.000Z","updated_at":"2021-02-23T18:24:55.000Z","dependencies_parsed_at":"2023-03-13T20:20:36.358Z","dependency_job_id":null,"html_url":"https://github.com/elementbound/letterbox","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fletterbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fletterbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fletterbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fletterbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elementbound","download_url":"https://codeload.github.com/elementbound/letterbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243222184,"owners_count":20256220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-18T03:12:41.260Z","updated_at":"2025-12-28T06:59:17.581Z","avatar_url":"https://github.com/elementbound.png","language":"JavaScript","readme":"# Letterbox\n\nAn MMO typing simulator to demonstrate working with Docker and Kubernetes.\n\nLetterbox provides a 80x24 textbox where users can type and see others while they type, in real time.\n\nA presentation was done featuring Letterbox as a sample application, see under [`talk/`](talk/).\n\n## Features\n\n* Persist history\n* Calculate snapshots to avoid recalculating years of small changes\n* Horizontally scalable, events are broadcast via RabbitMQ\n* Realtime updates to clients via WebSockets\n* Uses [Vanilla JS](http://vanilla-js.com/)\n\n## Building\n\nLetterbox uses Webpack to bundle its frontend code, which you can do by running:\n\n```sh\nnpm run build\n```\n\n## Running\n\n### Development\n\nLetterbox requires MySQL and RabbitMQ to be running and configured. You can use .sh files under `scripts/` to start them\nin Docker containers.\n\n```sh\n./scripts/start-docker-mysql.sh\n./scripts/start-docker-rabbitmq.sh\n```\n\n\u003e **Note:** The MySQL database needs to be setup before running the application. You can either do this manually by\n\u003e using the PHPMyAdmin interface started by the script and copy the contents of `scripts/database-setup.sql`, or change\n\u003e the shell script to use the `elementbound/letterbox-db` image.\n\nNext, configure Letterbox based on the `.env.example` file.\n\nOnce you are done, you can run Letterbox:\n\n```sh\nnpm run start:dev\n```\n\nAs you edit the backend code, the application will restart. Editing frontend code will trigger Webpack to rebuild the\nfrontend bundle.\n\nYou can open Letterbox at \u003chttp://localhost:3000/\u003e.\n\n### Locally\n\nIf you want to just see the application running, you can use Docker Compose:\n\n```sh\ndocker-compose up\n```\n\nThis will launch the application and all of its dependencies and should be up and running in a matter of seconds. You\ncan open the application at \u003chttp://localhost:3000/\u003e.\n\n### In Kubernetes\n\nAside from secrets, all resource descriptors are stored under `kube/`.\n\nFirst, you'll need to create the namespaces:\n\n```sh\nkubectl apply -f kube/letterbox-namespace.yml\nkubectl apply -f kube/letterbox-mq-namespace.yml\n```\n\nPrepare the secrets needed for RabbitMQ, in the `letterbox-mq` namespace:\n\n| Name             | Contents                                |\n|------------------|-----------------------------------------|\n| `erlang-cookie`  | `cookie=xleqtnracuavhilawxjecnttmtfanbrs` |\n| `rabbitmq-admin` | `user=letterbox`                          |\n|                  | `pass=vrlpvtrsefadeqof`                   |\n\nThen create the RabbitMQ deployment:\n\n```sh\nkubectl apply -f kube/rabbitmq\n```\n\nNext, prepare the secrets for letterbox, in the `letterbox` namespace:\n\n| Name                  | Contents                                                                                    |\n|-----------------------|---------------------------------------------------------------------------------------------|\n| `letterbox-db-root`   | `MYSQL_ROOT_PASSWORD=gcnfwtsstnpmhfwb`                                                      |\n|                       | `DATABASE_PASSWORD=gcnfwtsstnpmhfwb`                                                        |\n|                       | `DATABASE_USER=root`                                                                        |\n| `letterbox-mq-secret` | `url=amqp://letterbox:vrlpvtrsefadeqof@rabbitmq-client.letterbox-mq.svc.cluster.local:5672` |\n\nOnce done, create letterbox in the cluster:\n\n```sh\nkubectl apply -f kube\n```\n\nOnce done, you should have a fully functioning letterbox deployment behind a loadbalancer. Use the loadbalancer's\nexternal IP to access your very own letterbox.\n\n## License\n\nUnless otherwise noted, the contents of this repository are under the MIT license.\n\nSee [LICENSE](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementbound%2Fletterbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felementbound%2Fletterbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementbound%2Fletterbox/lists"}