adminui

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 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 and is COMMITTED (ADR-025): the published module carries the prebuilt assets, so any `go build` — including a module consumer's — ships a working panel. After touching web/src, rebuild with `make admin-ui` and commit the new assets with the src change. A binary that embeds no assets serves an honest 503 from the shell routes instead of a blank page (field report B1).

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