adminui

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package adminui embeds the SolidJS admin panel (ADMIN-UI-V1) and serves it from the engine binary under /admin. The compiled bundle lives in web/dist; following the DevHub's pattern, web/dist/index.html is committed (so go:embed always has something) while web/dist/assets/ is gitignored and produced by `npm run build` before `go build`/release (see Makefile target `admin-ui`).

The SPA uses HASH routing (/admin#/…), so the only real server paths are:

  • GET /admin and /admin/ → index.html (no-cache; always fresh so it points at the latest hashed assets)
  • GET /admin/assets/<hashed> → immutable (cached forever by the browser)

Client routes live in the URL fragment and never collide with the /admin/* ADMIN-API-V1 routes. These are NEW static routes, off the CRUD/JWT hot path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasBuiltAssets

func HasBuiltAssets() bool

HasBuiltAssets reports whether real (hashed) assets are embedded — false means only the placeholder index.html is present (the bundle was not built before `go build`). Used by the engine to log a helpful warning.

func Register

func Register(r chi.Router) error

Register mounts the admin panel routes on r. The routes sit under /admin/* (which the engine already JWT-skips and RBAC-passes-through); the SPA shell is public, and every API call it makes carries the platform JWT.

Types

This section is empty.

Jump to

Keyboard shortcuts

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