adminui

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 2 Imported by: 0

README

Framework-owned admin SPA (ADMIN-2 + ADMIN-3)

Vite + React + TypeScript app served from go:embed under /admin/. Feature packages still only call admin.Register — there are no per-model React files.

Rebuild the committed dist/

dist/ is committed so go test and go run ./examples/admin work without npm at compile time (go:embed cannot use .. and cannot embed an empty directory).

cd internal/adminui
npm ci
npm test
npm run typecheck
npm run build

Commit the resulting dist/ with the source change. Do not copy this tree into generated frontend/. Do not add --admin to gombit make resource.

base is /admin/ so hashed assets are /admin/assets/…. Auth is cookie + CSRF only. Tokens and CSRF stay out of localStorage / sessionStorage. VITE_API_URL is origin-only (empty = same-origin). The API path prefix is injected at serve time from config.API.Prefix (__GOMBIT_API_PREFIX__ in index.html); do not set it via VITE_*.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Files embed.FS

Files is the go:embed tree of the production Vite build under dist/. The committed dist is required so go test / go run ./examples/admin work without npm at compile time. Consumers go get the Gombit module and the admin SPA is already inside the binary.

Functions

func FS

func FS() fs.FS

FS returns the admin SPA tree rooted at dist/. If fs.Sub fails, it returns an empty embed.FS rather than Files: the SPA lives under dist/, so the un-subbed root would miss index.html and skip mount.

Types

This section is empty.

Jump to

Keyboard shortcuts

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