webui

package
v1.801.458 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package webui serves the embedded Hanzo Cloud console — the single-page app, white-labelled per request Host.

It is a LEAF: stdlib + the brand registry + the fleet manifest's addresses + zip's net/http bridge, and NOTHING of package cloud (all three of those are themselves leaves). That is the whole reason it exists as its own package. The console has to be served from TWO places — every per-app plugin mounts it as its "/" catch-all through cloud.Listen, and the light host (cmd/cloud) owns "/" at the front door and cannot import package cloud (that would relink the fleet it was split to avoid). One console implementation, reachable from both.

`all:` embeds the whole tree (dotfiles included). At a plain `go build` this is the committed fallback shell (dist/index.html); the build pipeline runs hanzoai/console's `npm run build:embed` (a static export) and OVERWRITES webui/dist with the real @hanzo/gui static bundle BEFORE `go build`, so the shipped binary carries the full console. That pipeline is the Dockerfile console stage for the image, and the `make webui` target for a standalone build. Either way there is exactly one artifact — no separate console Service, no second origin. See webui/dist/index.html, the Makefile, and the Dockerfile console-build stage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() (http.Handler, error)

Handler is the console as a stdlib http.Handler (correct Content-Type, conditional GET, precompressed negotiation, SPA fallback) — the form Mount adapts onto the zip router via zip.AdaptNetHTTP, and the form a test drives directly.

func Mount

func Mount(app *zip.App) error

Mount registers the embedded console at the web root as the app's terminal handler. Its caller registers it LAST — after every /v1 subsystem route, the /zap plane, and the health contract — so the router's in-order matching gives all real API routes precedence and only unmatched paths reach the SPA. Both cloud.Listen (every plugin) and cmd/cloud (the host front door) call it, so the "/" catch-all is spelled ONE way.

Types

This section is empty.

Jump to

Keyboard shortcuts

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