This package contains web UI for the Phantom Bridge and a web server to serve it.
The web server itself does not connect to anything, it merely servers semi-static HTML and JavaScript to users. The UI in the web browser establishes connection to Bridge Server via Socket.io, and to the Bridge Client node on a robot via WebRTC P2P connection.
You can fork this repository and host it yourself to customize the default UI provided. The configuration file specifies which Bridge Server shall the client connect to.
Follow instructions from bun.sh
Last tested 1.2.18
cd ~
git clone git@github.com:PhantomCybernetics/phntm_bridge_ui.git phntm_bridge_ui
cd phntm_bridge_ui
bun install
To Phantom Bridge, this UI represents an app, individual browser clients running web ui are considered app instances. New app needs to register with the Bridge Server server it intends to use. The following link will return a new appId/appKey pair, put these in your config.jsonc below. https://register.phntm.io/app
Create new config file e.g. ~/phntm_bridge_ui/config.jsonc
, use ./config.example.jsonc as a starting point.
sudo vim /etc/systemd/system/phntm_bridge_ui.service
...and paste:
[Unit]
Description=phntm bridge_ui service
After=network.target
[Service]
ExecStart=/home/ubuntu/phntm_bridge_ui/run.sh
Restart=always
User=root
Environment=NODE_ENV=production
WorkingDirectory=/home/ubuntu/phntm_bridge_ui/
StandardOutput=append:/var/log/phntm_bridge_ui.log
StandardError=append:/var/log/phntm_bridge_ui.err.log
[Install]
WantedBy=multi-user.target
Reload systemctl daemon
sudo systemctl daemon-reload
sudo systemctl start phntm_bridge_ui.service
sudo systemctl enable phntm_bridge_ui.service # will launch on boot