ui

package
v1.801.477 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: 4 Imported by: 0

README

Meet UI (embedded)

dist/ is the built Hanzo Meet SPA — the admin-meet app (@hanzo/meet, Vite + @hanzogui + LiveKit's own React components) — baked into the cloud binary via //go:embed and served at /meet/* by apps/meet.

It is the native call client. The media server (our LiveKit at wss://live.hanzo.bot) and the join-token mint (POST /v1/meet/getToken) were already ours; this replaces the office plugin in the published Team front, which was the last part of a Hanzo call that was not.

The SPA is built with base: '/meet/' and VITE_API_PREFIX=/v1/meet, so every asset and every XHR is same-origin under paths cloud already serves (/meet/* static, /v1/meet/* API). The client mints nothing and holds no credential: the gateway validates the IAM JWT, apps/meet decides on what it stamped.

The flow

Two screens, and both entry paths — the lobby and a pasted link — go through the second one, so there is one way to enter a call rather than two that disagree.

Lobby (/meet) — which workspace, which room. No camera: the preview belongs to joining, not to choosing an address.

  1. GET /v1/meet/session — who you would be seated as, where the media plane is, and which workspaces you may open a room in. The list is already narrowed to the roles the mint would grant, so the offer and the grant cannot drift.
  2. It composes the room's address, <workspace>_<slug>, which is also the URL: /meet/<workspace>/<slug>. That prefix is the only thing binding a room to a tenant, and apps/meet reads it back on the mint.

Room (/meet/<workspace>/<slug>) — the join screen, then the call.

  1. GET /v1/meet/session again (a pasted link has never seen the lobby), then LiveKit's PreJoin: camera preview, device pickers, your name.
  2. POST /v1/meet/getToken {roomName, participantName} → the raw join token, minted on submit and spent immediately by the connect that follows.
  3. The browser connects to LiveKit directly with it. No media passes through us.

The identity on the tile is the SERVER's (sub = the team account), never the body's — LiveKit evicts a duplicate identity, so a caller-chosen one would let anyone eject a colleague. participantName is a display label only.

Regenerating dist/

Source of truth: the admin-meet app in hanzoai/admin. Build it in a workspace where hanzogui@7.x + @hanzogui/admin resolve, then sync its dist/:

cd apps/admin-meet
bun install
bun run build             # tsc --noEmit && vite build → dist/ (base=/meet/, api=/v1/meet)

rsync -a --delete apps/admin-meet/dist/ <cloud>/apps/meet/ui/dist/

Then go build ./plugin/meet re-embeds it. Do NOT hand-edit files under dist/ — they are content-addressed Vite output. Keep .sync-stamp truthful (source repo

  • commit).

Documentation

Overview

Package ui embeds the built Hanzo Meet SPA — the native video-call client — into the cloud binary and serves it at /meet/*.

It replaces the office plugin in the published Team front, which was the last part of a Hanzo call that was not ours: the media server (LiveKit at wss://live.hanzo.bot) and the token that opens it (apps/meet) were already native, so a forked front shipping a whole product's UI was carrying one screen.

The call itself is LiveKit's own React components — @livekit/components-react over livekit-client — because a hand-rolled WebRTC client is a second implementation of a protocol whose reference implementation the media server already ships against. The chrome around it is @hanzogui, like every other Hanzo surface.

dist/ is the committed, content-addressed Vite build, produced with base '/meet/' and VITE_API_PREFIX=/v1/meet, so every asset and every XHR is same-origin under paths this binary already serves. Do NOT hand-edit it — see README.md to regenerate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FS

func FS() fs.FS

FS returns the embedded built-UI filesystem rooted at dist/.

func Handler

func Handler() http.Handler

Handler serves the embedded SPA. Mount it under StripPrefix("/meet", …) so it sees root-relative paths. The serving policy — immutable hashed assets, 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.

Jump to

Keyboard shortcuts

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