mirror of
https://github.com/luxfi/aml.git
synced 2026-09-24 00:25:20 +00:00
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.
25 lines
660 B
Go
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
|
|
}
|