@hanzo/dash
v0.3.0
Published
Hanzo Base tenant-management screens — host-agnostic @hanzo/gui v7 React surface, shared by the standalone dashboard (base.hanzo.ai) and the embedded console module (console.hanzo.ai).
Keywords
Readme
SuperBase Dashboard
Static SPA that the superbase Go binary embeds via go:embed and serves
at /dashboard/* (with /_/tenants/* redirecting here as a legacy
alias).
- Vite + React 19 + React Router
@hanzo/guiv7 for all UI (no shadcn, no Radix-direct)@hanzo/iamPKCE OIDC againsthanzo.id- Talks to the local Base instance at
/v1/collections/tenants/records
No Svelte. No Express. No server-side. Pure static bundle.
Build
bun install
bun run buildThe output lands in dist/ — that's what the Go binary embeds. Each
asset is content-hashed; dist/index.html is the SPA shell. The Go
binary rewrites the <meta name="hanzo-iam-*"> tags in index.html
at serve time to inject the right environment's IAM client id, so the
bundle has no env-specific configuration baked in.
Dev
bun run devVite serves at http://127.0.0.1:5180/dashboard/ and proxies /v1/*
to http://127.0.0.1:8090 (a locally-running Base / superbase binary).
If you don't have a local IAM, the SPA still loads — useIam()
surfaces the sign-in screen and clicking it redirects to
https://hanzo.id. Override the IAM target with:
VITE_IAM_SERVER_URL=https://iam-local.hanzo.ai \
VITE_IAM_CLIENT_ID=hanzo-superbase-local \
bun run devWhat's where
src/main.tsx—HanzoguiProvider→IamProvider→ routersrc/App.tsx— header + auth gatesrc/auth.ts— IAM config (meta-tag → env → defaults)src/api.ts— typed Base client (list/get/create/update/delete)src/routes/TenantsList.tsx— table + drawer + 5s pollingsrc/routes/NewTenant.tsx— create form with kebab-slug validationsrc/routes/LoginCallback.tsx— OIDC PKCE callbacksrc/components/— TenantRow, TenantStatusBadge, ConfirmDialoggui.config.ts— @hanzogui/config v5 default + dark themevite.config.ts— base/dashboard/, hanzogui dedupe + optimizeDeps
