Documentation
¶
Overview ¶
Package ui embeds the built Hanzo Tracker SPA (@hanzo/tracker, the admin-tracker app in hanzoai/admin, Vite + hanzogui shell over the forge's own board CSS) into the cloud binary and serves it at /tracker/*.
WHY cloud owns this embed: cloud is the ONE process that answers /v1/tracker (apps/tracker's per-org board store), so it serves the UI for that store too — one binary, one origin, one deploy. Same-origin is not cosmetic here: the SPA sends no tenancy of its own, because cloud's gateway mints the validated org from the IAM session BEFORE any tracker handler runs. A UI served from a second host would have to carry a token and assert an org, which is exactly the client-supplied tenancy the tracker refuses.
This is what lets tracker.hanzo.ai serve a native board and retire the Huly tracker that answered that host.
dist/ is the committed, content-addressed Vite build. The SPA is built with base '/tracker/' and API prefix '/v1/tracker' (see the admin-tracker vite.config), so every asset and XHR is same-origin under paths cloud already serves. To refresh it, rebuild the admin-tracker app and sync its dist/ here — see apps/tracker/ui/README.md.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler serves the embedded board. Mount it under StripPrefix("/tracker", …) so it sees root-relative paths. The serving policy — immutable hashed assets, 404 for a purged chunk, index fallback for a deep link, 503 for an unsynced bundle — is spa.Handler's, which is the ONE copy of it in this repo.
Types ¶
This section is empty.