Browser UI is a lightweight web application for the Selenosis ecosystem.
It provides a simple HTTP server that serves a static frontend and exposes a minimal backend API for browsing sessions and connecting to VNC.
- Frontend: static assets built with Node and served under
/ui/ - Backend: Go HTTP server providing a small API and VNC WebSocket proxy
- Event collector: subscribes to
browser-serviceevents and maintains an in-memory session store
Browser UI is intentionally stateless: Kubernetes remains the source of truth and browser-service is the API boundary.
- Serve the web UI (static frontend)
- Provide a simple JSON API for listing and inspecting sessions
- Proxy VNC traffic from the UI to the underlying browser pod
- Track sessions in memory by consuming browser events
Browser UI depends on browser-service for:
- REST access to
Browserresources - Event stream (ADDED / MODIFIED / DELETED) used to populate the UI session store
The UI assumes that:
browser-serviceis reachable atBROWSER_SERVICE_URLbrowser-controllerand CRDs are already installed in the cluster (indirect dependency via browser-service)
GET /→ redirects to/ui/GET /ui/→ UI entrypoint (index.html)GET /ui/*→ static assets
Base path:
/api/v1
Endpoints:
-
GET /api/v1/status/Returns active sessions and supported browsers from the in-memory store -
POST /api/v1/browsers/Create and start a browser session. Body:{"browserName":"chrome","browserVersion":"146.0","selenosisOptions":{}} -
GET /api/v1/browsers/{browserId}/Get a single session by Browser ID -
DELETE /api/v1/browsers/{browserId}/Delete a manually-started session (only sessions created viaPOST /browsers/) -
GET /api/v1/browsers/{browserId}/vncWebSocket proxy to the browser pod VNC endpoint -
GET /api/v1/browsers/{browserId}/vnc/settingsReturns VNC settings (currently returns the password)
GET /health→ returns{"status":"ok"}
Browser UI exposes a WebSocket endpoint (/vnc) that proxies traffic to the browser pod VNC WebSocket:
- Backend target (resolved from session data):
ws://<browserPodIP>:4445/selenosis/v1/vnc/<sessionId>
The UI also exposes /vnc/settings for clients that need the VNC password.
Browser UI is configured using environment variables:
LISTEN_ADDR— address to listen on (default:8080)BROWSER_SERVICE_URL— browser-service base URL (defaulthttp://browser-service:8080)BROWSER_NAMESPACE— namespace used for subscriptions (defaultdefault)VNC_PASSWORD— VNC password exposed via/vnc/settings(defaultsecret)UI_STATIC_PATH— path to static UI assets (default/app/static)
The project is built and packaged entirely via Docker. Local Go installation is not required for producing the final artifact.
The build process is controlled via the following Makefile variables:
Variable Description
- BINARY_NAME Name of the produced binary (browser-ui).
- REGISTRY Docker registry prefix (default: localhost:5000).
- IMAGE_NAME Full image name (/browser-ui).
- VERSION Image version/tag (default: develop).
- PLATFORM Target platform (default: linux/amd64).
- CONTAINER_TOOL docker cmd
REGISTRY, VERSION is expected to be provided externally, which allows the same Makefile to be used locally and in CI.
Helm chart selenosis-deploy