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 Cloud Bridge via Socket.io, and to the Bridge 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 Cloud Bridge server shall the client connect to.
Last tested v18.20.5
sudo apt install nodejs npm
cd ~
git clone git@github.com:PhantomCybernetics/bridge_ui.git bridge_ui
cd bridge_ui
npm 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 Cloud Bridge server it intends to use. The following link will return a new appId/appKey pair, put these in your config.jsonc below. https://bridge.phntm.io:1337/app/register
Create new config file e.g. ~/bridge_ui/config.jsonc
and paste:
sudo vim /etc/systemd/system/phntm_bridge_ui.service
...and paste:
[Unit]
Description=phntm bridge_ui service
After=network.target
[Service]
ExecStart=/home/ubuntu/bridge_ui/run.web-ui.sh
Restart=always
User=root
Environment=NODE_ENV=production
WorkingDirectory=/home/ubuntu/bridge_ui/
StandardOutput=append:/var/log/bridge_ui.log
StandardError=append:/var/log/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