SDK UI (crates/ui): developer dashboard and schema workbench — tracking #24

Open
opened 2026-04-19 13:03:42 +00:00 by timur · 0 comments
Owner

Context

The crates/ui/ crate (hero_rpc_ui) was scaffolded as the Hero RPC SDK's developer dashboard and schema workbench. It aligns with PRD 000 (Hero SDK Vision) — in particular the goal of a five-minute onramp for external developers.

Currently untracked in git; Cargo description: "Hero RPC SDK — developer dashboard and schema workbench". Binds to $HERO_SOCKET_DIR/hero_rpc/ui.sock.

Current state

Backend — complete:

  • JSON-RPC 2.0 dispatcher at POST /rpc (src/api.rs)
  • Methods: schema.parse, schema.generate, project.scaffold, ai.chat, ai.models, rpc.discover
  • Calls hero_rpc_oschema + hero_rpc_generator as libraries (not over RPC)
  • schema.generate supports targets: rust_structs, rust_rpc, js, rhai, openrpc, json_schema, oschema
  • project.scaffold invokes WorkspaceScaffolder to create a new Hero service workspace
  • ai.chat integrates herolib_ai with an OSchema-specialized system prompt (DeepSeekV3 default); feature-gated
  • /health, /.well-known/heroservice.json, /api/stats (CPU/mem)
  • Static asset serving via rust-embed
  • CORS open (dev mode)

Frontend — WIP:

  • templates/index.html is effectively empty ({% extends "base.html" %})
  • static/js/dashboard.js + static/css/dashboard.css exist but the SPA itself isn't built yet

Scope of this issue

  • Commit the crate to development (see refactor PR)
  • Implement the frontend SPA in templates/index.html + dashboard.js:
    • Schema workbench: textarea + live parse + tabbed codegen preview (Rust structs / Rust RPC / JS / Rhai / OpenRPC / JSON Schema)
    • Project scaffolder: form for name + workspace_dir + domains list + flags, call project.scaffold, show result
    • AI assistant chat UI with message history, calling ai.chat
    • SDK documentation browser (render ADRs + PRD from docs/)
    • System stats widget (already has /api/stats)
  • Dashboard CSS + layout aligned with hero_ui_dashboard conventions (Bootstrap 5.3.3 or project equivalent)
  • Registered by hero_rpc via hero_router (UI prefix support already handled via X-Forwarded-Prefix header parsing)
  • Service self-registration: scripts/nu_service.nu start/stop (per ADR 003)
  • Optional: publish to forge.ourworld.tf/packages as hero_rpc_ui binary
  • PRD 000 — Hero SDK Vision (docs/prd/000-hero-sdk-vision.md)
  • ADR 001 — Crate topology (docs/adr/001-crate-topology-and-path-cascade.md)
  • ADR 003 — Nu-script lifecycle (docs/adr/003-nu-script-lifecycle.md)
  • Issue #13 — hero_sdk + hero_core rethinking
## Context The `crates/ui/` crate (`hero_rpc_ui`) was scaffolded as the Hero RPC SDK's developer dashboard and schema workbench. It aligns with PRD 000 (Hero SDK Vision) — in particular the goal of a five-minute onramp for external developers. Currently untracked in git; Cargo description: *"Hero RPC SDK — developer dashboard and schema workbench"*. Binds to `$HERO_SOCKET_DIR/hero_rpc/ui.sock`. ## Current state **Backend — complete:** - JSON-RPC 2.0 dispatcher at `POST /rpc` (`src/api.rs`) - Methods: `schema.parse`, `schema.generate`, `project.scaffold`, `ai.chat`, `ai.models`, `rpc.discover` - Calls `hero_rpc_oschema` + `hero_rpc_generator` as libraries (not over RPC) - `schema.generate` supports targets: `rust_structs`, `rust_rpc`, `js`, `rhai`, `openrpc`, `json_schema`, `oschema` - `project.scaffold` invokes `WorkspaceScaffolder` to create a new Hero service workspace - `ai.chat` integrates `herolib_ai` with an OSchema-specialized system prompt (DeepSeekV3 default); feature-gated - `/health`, `/.well-known/heroservice.json`, `/api/stats` (CPU/mem) - Static asset serving via `rust-embed` - CORS open (dev mode) **Frontend — WIP:** - `templates/index.html` is effectively empty (`{% extends "base.html" %}`) - `static/js/dashboard.js` + `static/css/dashboard.css` exist but the SPA itself isn't built yet ## Scope of this issue - [ ] Commit the crate to `development` (see refactor PR) - [ ] Implement the frontend SPA in `templates/index.html` + `dashboard.js`: - [ ] Schema workbench: textarea + live parse + tabbed codegen preview (Rust structs / Rust RPC / JS / Rhai / OpenRPC / JSON Schema) - [ ] Project scaffolder: form for name + workspace_dir + domains list + flags, call `project.scaffold`, show result - [ ] AI assistant chat UI with message history, calling `ai.chat` - [ ] SDK documentation browser (render ADRs + PRD from `docs/`) - [ ] System stats widget (already has `/api/stats`) - [ ] Dashboard CSS + layout aligned with `hero_ui_dashboard` conventions (Bootstrap 5.3.3 or project equivalent) - [ ] Registered by `hero_rpc` via `hero_router` (UI prefix support already handled via `X-Forwarded-Prefix` header parsing) - [ ] Service self-registration: `scripts/nu_service.nu` start/stop (per ADR 003) - [ ] Optional: publish to `forge.ourworld.tf/packages` as `hero_rpc_ui` binary ## Related - PRD 000 — Hero SDK Vision (`docs/prd/000-hero-sdk-vision.md`) - ADR 001 — Crate topology (`docs/adr/001-crate-topology-and-path-cascade.md`) - ADR 003 — Nu-script lifecycle (`docs/adr/003-nu-script-lifecycle.md`) - Issue #13 — hero_sdk + hero_core rethinking
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_rpc#24
No description provided.