{"id":13722307,"url":"https://github.com/Hubs-Foundation/reticulum","last_synced_at":"2025-05-07T15:30:33.062Z","repository":{"id":37458385,"uuid":"105199856","full_name":"Hubs-Foundation/reticulum","owner":"Hubs-Foundation","description":"Phoenix web server for Hubs","archived":false,"fork":false,"pushed_at":"2025-05-06T10:10:55.000Z","size":18045,"stargazers_count":452,"open_issues_count":84,"forks_count":184,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-05-06T11:29:10.260Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hubs-Foundation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2017-09-28T21:13:09.000Z","updated_at":"2025-05-06T10:10:59.000Z","dependencies_parsed_at":"2023-02-17T21:15:46.744Z","dependency_job_id":"2e7b8da0-6926-4ec1-b17d-199a0c983ec4","html_url":"https://github.com/Hubs-Foundation/reticulum","commit_stats":{"total_commits":2480,"total_committers":31,"mean_commits":80.0,"dds":0.5157258064516129,"last_synced_commit":"a3b01bf674266ec369d92f9186d3f6dd4922eccc"},"previous_names":["hubs-foundation/reticulum"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hubs-Foundation%2Freticulum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hubs-Foundation%2Freticulum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hubs-Foundation%2Freticulum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hubs-Foundation%2Freticulum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hubs-Foundation","download_url":"https://codeload.github.com/Hubs-Foundation/reticulum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252905515,"owners_count":21822818,"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-08-03T01:01:27.195Z","updated_at":"2025-05-07T15:30:31.988Z","avatar_url":"https://github.com/Hubs-Foundation.png","language":"Elixir","funding_links":[],"categories":["Elixir"],"sub_categories":["Phoenix"],"readme":"# Reticulum\nNote: **Due to our small team size, we don't support setting up Reticulum locally due to restrictions on developer credentials. Although relatively difficult and new territory, you're welcome to set up this up yourself. In addition to running Reticulum locally, you'll need to also run [Hubs](https://github.com/mozilla/hubs) and [Dialog](https://github.com/mozilla/dialog) locally because the developer Dialog server is locked down and your local Reticulum will not connect properly)**\n\nReference [this discussion thread](https://github.com/mozilla/hubs/discussions/3323) for more information.\n\nA hybrid game networking and web API server, focused on Social Mixed Reality.\n\n## Development\n\n### 1. Install Prerequisite Packages:\n\n#### PostgreSQL (recommended version 11.x):\n\nLinux:\n\nOn Ubuntu, you can use\n\n```\napt install postgresql\n```\n\nOtherwise, consult your package manager of choice for other Linux distributions\n\nWindows: https://www.postgresql.org/download/windows/\n\nWindows WSL: https://github.com/michaeltreat/Windows-Subsystem-For-Linux-Setup-Guide/blob/master/readmes/installs/PostgreSQL.md\n\n#### Erlang (v23.3) + Elixir (v1.14) + Phoenix\n\nhttps://elixir-lang.org/install.html\n\nNote: On Linux, you may also have to install the erlang-src package for your distribution in order to compile dependencies successfully.\n\nhttps://hexdocs.pm/phoenix/installation.html\n\n#### Ansible\n\nhttps://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html\n\n### 2. Setup Reticulum:\n\nRun the following commands at the root of the reticulum directory:\n\n1. `mix deps.get`\n2. `mix ecto.create`\n   - If step 2 fails, you may need to change the password for the `postgres` role to match the password configured `dev.exs`.\n   - From within the `psql` shell, enter `ALTER USER postgres WITH PASSWORD 'postgres';`\n   - If you receive an error that the `ret_dev` database does not exist, (using psql again) enter `create database ret_dev;`\n3. From the project directory `mkdir -p storage/dev`\n\n### 3. Start Reticulum\n\nRun `scripts/run.sh` if you have the hubs secret repo cloned. Otherwise `iex -S mix phx.server`\n\n## Run Hubs Against a Local Reticulum Instance\n\n### 1. Setup the `hubs.local` hostname\n\nWhen running the full stack for Hubs (which includes Reticulum) locally it is necessary to add a `hosts` entry pointing `hubs.local` to your local server's IP.\nThis will allow the CSP checks to pass that are served up by Reticulum so you can test the whole app. Note that you must also load hubs.local over https.\n\nOn MacOS or Linux:\n\n```bash\nnano /etc/hosts\n```\n\nFrom there, add a host alias\n\nExample:\n\n```bash\n127.0.0.1   hubs.local\n127.0.0.1   hubs-proxy.local\n```\n\n### 2. Setting up the Hubs Repository\n\nClone the Hubs repository and install the npm dependencies.\n\n```bash\ngit clone https://github.com/mozilla/hubs.git\ncd hubs\nnpm ci\n```\n\n### 3. Start the Hubs Webpack Dev Server\n\nBecause we are running Hubs against the local Reticulum client you'll need to use the `npm run local` command in the root of the `hubs` folder. This will start the development server on port 8080, but configure it to be accessed through Reticulum on port 4000.\n\n### 4. Navigate To The Client Page\n\nOnce both the Hubs Webpack Dev Server and Reticulum server are both running you can navigate to the client by opening up:\n\nhttps://hubs.local:4000?skipadmin\n\n\u003e The `skipadmin` is a temporary measure to bypass being redirected to the admin panel. Once you have logged in you will no longer need this.\n\n### 5. Logging In\n\nTo log into Hubs we use magic links that are sent to your email. When you are running Reticulum locally we do not send those emails. Instead, you'll find the contents of that email in the Reticulum console output.\n\nWith the Hubs landing page open click the Sign In button at the top of the page. Enter an email address and click send.\n\nGo to the reticulum terminal session and find a url that looks like https://hubs.local:4000/?auth_origin=hubs\u0026auth_payload=XXXXX\u0026auth_token=XXXX\n\nNavigate to that url in your browser to finish signing in.\n\n### 6. Creating an Admin User\n\nAfter you've started Reticulum for the first time you'll likely want to create an admin user. Assuming you want to make the first account the admin, this can be done in the iex console:\n1) Open the iex console. From the reticulum folder run:\n```\niex -S mix\n```\n2) Then run the following code:\n```\nRet.Account |\u003e Ret.Repo.all() |\u003e Enum.at(0) |\u003e Ecto.Changeset.change(is_admin: true) |\u003e Ret.Repo.update!()\n```\n\nMake sure to run the Maybe try iex -S mix where the reticulum mix.exs file is.\n\n### 7. Enabling Room Features\n\nRooms are created with restricted permissions by default, which means you can't spawn media objects. You can change this setting in the admin panel, or run the following code in the iex console:\n1) Open the iex console. From the reticulum folder run:\n```\niex -S mix\n```\n2) Then run the following code:\n```\nRet.AppConfig.set_config_value(\"features|permissive_rooms\", true)\n```\n\n### 8. Start the Admin Panel server in local development mode\n\nWhen running locally, you will need to also run the admin panel, which routes to hubs.local:8989\nUsing a separate terminal instance, navigate to the `hubs/admin` folder and use:\n\n```\nnpm run local\n```\n\nYou can now navigate to https://hubs.local:4000/admin to access the admin control panel\n\n## Run Spoke Against a Local Reticulum Instance\n\n1. Follow the steps above to setup Hubs\n2. Clone and start spoke by running `./scripts/run_local_reticulum.sh` in the root of the spoke project\n3. Navigate to https://hubs.local:4000/spoke\n\n## Run Reticulum against a local Dialog instance\n\n1. Update the Janus host in `dev.exs`:\n\n```\ndev_janus_host = \"hubs.local\"\n```\n\n2. Update the Janus port in `dev.exs`:\n\n```\nconfig :ret, Ret.JanusLoadStatus, default_janus_host: dev_janus_host, janus_port: 4443\n```\n\n3. Add the Dialog meta endpoint to the CSP rules in `add_csp.ex`:\n\n```\ndefault_janus_csp_rule =\n   if default_janus_host,\n      do: \"wss://#{default_janus_host}:#{janus_port} https://#{default_janus_host}:#{janus_port} https://#{default_janus_host}:#{janus_port}/meta\",\n      else: \"\"\n```\n\n4. Edit the Dialog configuration file _turnserver.conf_ and update the PostgreSQL database connection string to use the _coturn_ schema from the Reticulum database:\n\n```\n   psql-userdb=\"host=hubs.local dbname=ret_dev user=postgres password=postgres options='-c search_path=coturn' connect_timeout=30\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHubs-Foundation%2Freticulum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHubs-Foundation%2Freticulum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHubs-Foundation%2Freticulum/lists"}