webui/

directory
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: AGPL-3.0

README

webui — the OpenPanda console

The current console (Vite + Preact + TypeScript) lives here, embedded into the Go binary via go:embed.

Layout

Path What it is
app/ Console frontend source — Vite + Preact + TS, five-language i18n
panel/ Go panel package: HTTP handlers, SSE hub, go:embed of app builds
cmd/panel/ Standalone sidecar binary (panda-webui) for split deployments
push/ Web Push (VAPID, encryption, subscriptions) — used by the panel

How it ships

make web builds app/ into panel/dist/app/, where go:embed folds it into every binary that links the panel package:

  • panda web (and the REPL's /web) serves it at network.panel_addr (loopback by default). The daemon itself is deliberately headless and never mounts an HTTP server;
  • panda service install registers that console as a user-level service (LaunchAgent / systemd --user / logon task), so it survives logout and reboot;
  • make build-webui produces the standalone panda-webui sidecar reading the same SQLite store.

A committed placeholder in panel/dist/index.html keeps go build working without node — vite only ever empties dist/app, so a stray git add -A can never leak a hashed index.html into the repo. Ship UI changes only after a real make web build.

Development

cd webui/app
npm install
npm run dev         # Vite dev server
npm run typecheck   # tsc --noEmit — required before PRs
npm run build       # outputs to ../panel/dist/app

UI strings must go through the i18n layer (app/src/i18n/) with the key present in every locale — English is the fallback, missing keys must not ship. See CONTRIBUTING for the full conventions.

Directories

Path Synopsis
cmd
panel command
Command panel runs the web control panel as a sidecar, reading the same SQLite store the kernel daemon writes (see webui/README.md).
Command panel runs the web control panel as a sidecar, reading the same SQLite store the kernel daemon writes (see webui/README.md).
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: AGPL-3.0-or-later
Package push implements the (frozen) Web Push notifications behind the webui panel (design P3-26): the VAPID identity (RFC 8292), message encryption (RFC 8291 over the aes128gcm content coding from RFC 8188), subscription storage, and delivery to the browser's push service.
Package push implements the (frozen) Web Push notifications behind the webui panel (design P3-26): the VAPID identity (RFC 8292), message encryption (RFC 8291 over the aes128gcm content coding from RFC 8188), subscription storage, and delivery to the browser's push service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL