Files
aml/ui/embed.go
T
zeekay 40c90ff00a feat(ui): embedded admin dashboard — @hanzo/gui + go:embed
Vite + React 19 + wouter hash router, 5 pages (Dashboard, Cases,
Rules, Alerts, Sanctions). Served at /_/aml/ via go:embed. ~220KB
dist. Adds POST /v1/aml/sanctions/search endpoint + SanctionsStore.
2026-03-16 10:00:00 -07:00

25 lines
660 B
Go

// Package ui embeds the AML admin dashboard built with Vite + React.
//
// The Go HTTP handler serves the admin UI at the /_/aml/ path.
// Run `pnpm --dir ui build` in this directory to produce dist/; the
// //go:embed directive below picks up the resulting static assets.
package ui
import (
"embed"
"io/fs"
)
//go:embed all:dist
var distFS embed.FS
// DistDirFS returns a rooted fs.FS pointing at dist/ so it can be passed
// directly to the Base router's Static handler.
func DistDirFS() fs.FS {
sub, err := fs.Sub(distFS, "dist")
if err != nil {
panic("aml-ui: dist/ missing — run `pnpm --dir ui build` first: " + err.Error())
}
return sub
}