Hero admin UI — service-parameterized Dioxus SPA + lifecycle server (served via hero_router at /hero_admin/admin/).
  • Rust 94.1%
  • JavaScript 5.7%
  • Makefile 0.2%
Find a file
2026-06-24 13:51:27 +00:00
.forgejo/workflows ci: add lab-release workflow (embedded-wasm SPA publish) 2026-06-23 13:39:49 -04:00
crates Merge pull request 'feat(aibroker): hero_aibroker admin in hero_components (typed OpenRPC clients)' (#17) from development_aibroker_admin into development 2026-06-24 13:51:27 +00:00
tools fix(ui): finish Bootstrap component cleanup 2026-06-23 04:19:19 +00:00
.gitignore hero_components: rename service to hero_components + fix lab build 2026-06-18 13:44:48 +02:00
Makefile hero_components: hero_biz CRM admin (home#309 Step 2) 2026-06-22 09:49:44 -04:00
README.md hero_components: rename service to hero_components + fix lab build 2026-06-18 13:44:48 +02:00
rust-toolchain.toml feat(aibroker): add hero_aibroker admin to hero_components 2026-06-24 15:07:44 +03:00

hero_components

The Hero admin UI — one service-parameterized Dioxus SPA that administers every Hero service. Reachable through hero_router at /hero_components/admin/?service=<name>; it discovers services from the router and calls each one same-origin, so there is no per-service UI code.

Layout (two crates)

Crate Path Role
hero_components_app crates/hero_components_app The Dioxus project. A lib (the reusable admin shell + components — shell, tabs, the proc/router views, diagnostics) plus a main.rs bundled binary (the ?service=<name> app). Built to wasm with dx. Marked [package.metadata.hero] service = false so lab doesn't try to run it as a native service.
hero_components crates/hero_components The service. A hero_lifecycle admin server that runs dx build on the app, embeds app_dist/ via rust-embed, and serves it on the hero_components/admin.sock admin socket. Registered with hero_proc via service.toml.

Both are isolated crates (each its own [workspace]): the app is wasm-only, the server is native. There is no root workspace — build each independently.

Prerequisites

  • Rust (see the rust_toolchain skill).
  • Dioxus CLI: cargo install dioxus-cli (dx 0.7+). Required — the server's build.rs runs dx build to produce the wasm bundle.

Build & run

Canonical (build + install + (re)start via hero_proc):

lab build hero_components --restart --install

Local dev without lab:

make build     # dx build the app + release-build the server (embeds the wasm)
make install   # copy to ~/hero/bin (+ ad-hoc re-sign on macOS)

The admin needs hero_proc (supervisor) and hero_router running. Then open http://127.0.0.1:9988/hero_components/admin/?service=hero_proc (swap ?service= for any discovered service).

macOS note

After copying a freshly built binary, macOS may SIGKILL it for an invalid ad-hoc signature. make install re-signs it; if you copy by hand, run codesign --force --sign - ~/hero/bin/hero_components.