Local Web Interface
This document describes the implementation of the local administrative web interface.
Terragraph provides a proof-of-concept web portal that is accessible over Wi-Fi, with the primary purpose of enabling easy initial setup. This currently supports status monitoring, configuration editing, assoc/dissoc actions, topology scans, and more.
The web portal is disabled by default. To access the web portal, the following steps are required:
- Enable the web server in node config (
- Connect to the ESP32 Wi-Fi network (PSK:
192.168.5.1in a web browser.
There are two components involved: a web server (
webui) and UI (
described in sections below. For more details on the Wi-Fi architecture, refer
The local HTTP server (
webui) is written in C++ using µWebSockets, chosen
for its small footprint. The server contains three types of endpoints:
- REST APIs for management
- Websocket endpoints for streaming stats
- Static file serving for the UI (
webui is installed via
recipes-utils/webui/webui_0.1.bb. Sources are located
recipes-utils/webui/files/src/webui/, with routes defined in
and implemented in
The experimental "Terragraph95" UI (
tg95) is written in React and
bootstrapped with Create React App. To accommodate slow UART speeds, bundle
size is reduced by substituting React with Preact, code splitting, etc.
tg95 is installed via
recipes-utils/webui/tg95_0.1.bb. Sources are located
src/tg95/. An optimized build is checked in to
gets installed to
/etc/webui/tg95.tar.gz and is extracted by
webui in its
sv startup script.