@hanzo/dash
v0.3.1
Published
Hanzo Base tenant-management screens — host-agnostic @hanzo/gui v8 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/guiv8 for all UI — no Tailwind, no shadcn, no Radix. Styling is Gui shorthand style props plus the theme tokens from@hanzogui/config/v5.- TypeScript 7 native (
tsgo) forbun run typecheck @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
Host code (standalone SPA only) and library code (@hanzo/dash, also embedded
by console2) live side by side — src/lib/ is the published surface.
src/main.tsx—GuiProvider→IamProvider→ routersrc/App.tsx— header + auth gatesrc/auth.ts— IAM config (meta-tag → env → defaults)src/routes/LoginCallback.tsx— OIDC PKCE callbacksrc/lib/api.ts—createTenantsApi(transport)(list/get/create/update/delete)src/lib/nav.ts—TenantsNav, the host's navigation injection pointsrc/lib/screens/— TenantsScreen (table + drawer + 5s polling), NewTenantScreensrc/lib/components/— TenantRow, TenantStatusBadge, ConfirmDialoggui.config.ts— @hanzogui/config v5 default + dark themevite.config.ts— base/dashboard/, gui dedupe + optimizeDeps
