{"id":20971495,"url":"https://github.com/surrsurus/gallery","last_synced_at":"2026-02-06T15:08:06.235Z","repository":{"id":240147986,"uuid":"801803549","full_name":"surrsurus/gallery","owner":"surrsurus","description":"3D Multiplayer Demo with Phoenix Channels + Three.JS","archived":false,"fork":false,"pushed_at":"2024-12-09T04:41:05.000Z","size":18679,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T00:54:25.748Z","etag":null,"topics":["demo","elixir","multiplayer","phoenix-channels","threejs"],"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/surrsurus.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,"zenodo":null}},"created_at":"2024-05-17T00:20:27.000Z","updated_at":"2024-12-21T06:09:45.000Z","dependencies_parsed_at":"2024-05-20T21:26:50.107Z","dependency_job_id":"296abea3-7362-4218-a9d1-9a94c8d35e2c","html_url":"https://github.com/surrsurus/gallery","commit_stats":null,"previous_names":["surrsurus/gallery"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/surrsurus/gallery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surrsurus%2Fgallery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surrsurus%2Fgallery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surrsurus%2Fgallery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surrsurus%2Fgallery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/surrsurus","download_url":"https://codeload.github.com/surrsurus/gallery/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/surrsurus%2Fgallery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29165904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T14:37:12.680Z","status":"ssl_error","status_checked_at":"2026-02-06T14:36:22.973Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["demo","elixir","multiplayer","phoenix-channels","threejs"],"created_at":"2024-11-19T04:02:29.567Z","updated_at":"2026-02-06T15:08:06.220Z","avatar_url":"https://github.com/surrsurus.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gallery ![CI Status](https://github.com/surrsurus/gallery/actions/workflows/ci.yml/badge.svg) ![License](https://img.shields.io/github/license/surrsurus/gallery)\n\n3D Multiplayer Demo with Phoenix Channels + Three.JS\n\nhttps://github.com/surrsurus/gallery/assets/9388076/78b817d5-1c4d-45f0-8ed6-f3176d369467\n\n## Concept\n\nThe goal of this project is to leverage Phoenix's ability to build highly concurrent realtime applications to create a scalable 3D multiplayer game that doesn't need much server hardware to run. \n\nEach player's web browser connects to a Phoenix channel via a websocket that will broadcast updates about the other players as they occur in realtime. Each player's browser renders those updates with Three.JS. Updates are processed every frame, resulting in a very low latency experience.\n\n## Sequence\n\n```mermaid\nsequenceDiagram\n    actor You\n    You-\u003e\u003e/gallery: Hit endpoint\n    /gallery-)Browser: Initialize Three.JS Scene\n    Browser-)Gallery Channel: Join channel\n    activate Gallery Channel\n    Gallery Channel-\u003e\u003eGallery Channel: Create Player\n    Gallery Channel-\u003e\u003ePlayerCache: Cache player\n    activate PlayerCache\n    PlayerCache--\u003e\u003eGallery Channel: Retrieve all cached players\n    deactivate PlayerCache\n    Gallery Channel--)Browser: Send cached player data\n    deactivate Gallery Channel\n    Browser-\u003e\u003eBrowser: Register players, prepare canvas, start rendering\n    Browser-)Gallery Channel: Ready up\n    activate Gallery Channel\n    Gallery Channel--)Browser: Broadcasts your player to everyone else\n    deactivate Gallery Channel\n    \n\n    Note over /gallery,PlayerCache: Keydown Events\n    Browser-\u003e\u003eBrowser: Handle keydown events\n    Browser-)Gallery Channel: Update player\n    activate Gallery Channel\n    Gallery Channel-\u003e\u003ePlayerCache: Update player\n    Gallery Channel--)Browser: Broadcasts your player updates to everyone else\n    deactivate Gallery Channel\n\n\n    Note over /gallery,PlayerCache: Disconnect\n    Browser-)Gallery Channel: Disconnect\n    activate Gallery Channel\n    Gallery Channel-\u003e\u003ePlayerCache: Delete from cache\n    Gallery Channel--)Browser: Broadcasts disconnect\n    deactivate Gallery Channel\n```\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nThis project uses [ASDF](https://asdf-vm.com/) to manage Erlang, Elixir, and Node versions\n\n### Installing\n\n#### OSX\n\nPostgres isn't being used (yet) so feel free to skip those steps.\n\n1. Add and install plugins with ASDF\n\n```\nasdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git\nasdf plugin add elixir https://github.com/asdf-vm/asdf-elixir.git\nasdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git\nasdf install\n```\n\n2. Install postgres\n\n```\nbrew install postgresql@15\nbrew services restart postgresql@15  \n```\n\n3. Install psql\n\n```\nbrew install libpq\necho 'export PATH=\"/opt/homebrew/opt/libpq/bin:$PATH\"' \u003e\u003e ~/.zshrc\n```\n\n4. Setup postgres user\n\n```\n$ psql postgres\npostgres=# CREATE USER postgres SUPERUSER;\n# DB might already exist, if so, you're good\npostgres=# CREATE DATABASE postgres WITH OWNER postgres;\n```\n\n### Running\n\nTo start your Phoenix server:\n\n  * Run `mix setup` to install and setup dependencies\n  * Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`\n\nNow you can visit [`localhost:4000/gallery`](http://localhost:4000/gallery) from your browser.\n\n## Learn more\n\n  * Official website: https://www.phoenixframework.org/\n  * Guides: https://hexdocs.pm/phoenix/overview.html\n  * Docs: https://hexdocs.pm/phoenix\n  * Forum: https://elixirforum.com/c/phoenix-forum\n  * Source: https://github.com/phoenixframework/phoenix\n\n\n## License\n\n\u003cimg src=\"https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/i/7195e121-eded-45cf-9aab-909deebd81b2/d9ur2lg-28410b47-58fd-4a48-9b67-49c0f56c68ce.png/v1/fill/w_1035,h_772,q_70,strp/mit_license_logo_by_excaliburzero_d9ur2lg-pre.jpg\" width=\"128\"/\u003e\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurrsurus%2Fgallery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsurrsurus%2Fgallery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsurrsurus%2Fgallery/lists"}