{"id":19201344,"url":"https://github.com/caioaao/pong","last_synced_at":"2026-06-24T01:30:24.224Z","repository":{"id":183815055,"uuid":"666383352","full_name":"caioaao/pong","owner":"caioaao","description":"Multiplayer Pong \"clone\" to play in the browser. Toy project to study Elixir","archived":false,"fork":false,"pushed_at":"2023-07-26T13:57:32.000Z","size":220,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-04T13:18:09.104Z","etag":null,"topics":["distributed-systems","elixir","svelte"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caioaao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-14T11:29:36.000Z","updated_at":"2023-07-25T21:07:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd3e9de6-5f92-41c0-a7ad-02c73814f3af","html_url":"https://github.com/caioaao/pong","commit_stats":null,"previous_names":["caioaao/pong"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caioaao%2Fpong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caioaao%2Fpong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caioaao%2Fpong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caioaao%2Fpong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caioaao","download_url":"https://codeload.github.com/caioaao/pong/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240273731,"owners_count":19775311,"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":["distributed-systems","elixir","svelte"],"created_at":"2024-11-09T12:38:07.643Z","updated_at":"2026-06-24T01:30:24.158Z","avatar_url":"https://github.com/caioaao.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pong\n\n(Check the live demo @ https://zesty-semifreddo-691978.netlify.app/ )\n\nFront-end is deployed in [Netlify](https://netlify.com), and back-end is running in [Google App Engine](https://cloud.google.com/appengine)\n\nThis is a toy project I'm using to learn some new tech. I wanted to learn Elixir (and especially OTP) and figured an online game would be a good fit. I also took the opportunity to play with Svelte while I'm at it :)\n\nSome key features to make this interesting:\n\n- Front-end should be a thin rendering / input processing program. All computing is delegated to the back-end and communication between back-end and front-end is done through HTTP / WebSockets\n- Multiple matches can be played concurrently\n\n\n## Architecture\n\nThe following sequence diagram shows the back-end processes when a match is started.\n\n![](doc/pvp-match.png)\n\nThe match's state machine runs inside the `MatchServer`. The core logic is implemented in the `Pong.Core.Match.StateMachine` module. It's implemented as a purely functional state machine so it's easy to unit test\n\n## Running\n\nTo run the back-end:\n\n```shell\ncd backend\nmix deps.get\nmix run --no-halt\n```\n\nTo run the front-end:\n\n```shell\ncd pong-ui\nnpm i\nnpm run dev -- --open\n```\n\n## Considerations\n\n- There are no integration tests because I don't know how to do them in Elixir yet :D\n- After a match ends the process stays alive forever. This is by design so we can see the results of previous matches. A better way would be to add another process that listens to matches and stores the final results so the MatchServer process can die without us losing that match's state.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaioaao%2Fpong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaioaao%2Fpong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaioaao%2Fpong/lists"}