- Rust 61.6%
- HTML 32.5%
- Nushell 5.9%
Mirrors hero_blueprint @ 7b71b0f. The previous fix (
|
||
|---|---|---|
| .forgejo/workflows | ||
| benches | ||
| crates | ||
| docs | ||
| examples | ||
| schemas | ||
| tests | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| PURPOSE.md | ||
| README.md | ||
HeroService
Example Hero service generated from the blueprint at https://forge.ourworld.tf/lhumina_code/hero_blueprint.
Use it as a reference implementation or starting point for new services.
Layout
crates/hero_service/ — domain types library
crates/hero_service_server/ — JSON-RPC backend (kind = "server")
crates/hero_service_admin/ — admin dashboard (kind = "admin")
crates/hero_service_web/ — public read-only web surface (kind = "web")
crates/hero_service_sdk/ — typed Rust client (openrpc_client! macro over docs/openrpc.json)
schemas/ — OSchema source files for the typed model
examples/ — runnable usage examples
benches/ — criterion benchmarks
tests/ — end-to-end integration tests
docs/ — OpenRPC spec + service docs
Build & run
# Build all binaries via lab (skips unchanged targets)
lab build hero_service --install
# Start the service (registers with hero_proc + supervises restart)
lab service hero_service --start
# Status / logs
lab service hero_service --status
hp logs.tail --service hero_service_server
# Stop
lab service hero_service --stop
Each binary embeds its service.toml via hero_lifecycle::service_base!().
Lifecycle is owned by lab; the binaries themselves carry no --start /
--stop flags. See /skill:hero_service_implementation for the canonical
wiring patterns.
Schemas
Domain models live in schemas/<domain>.oschema. Run hero_blueprint's generator
(lab build hero_service) to regenerate the typed code under
crates/hero_service/src/, crates/hero_service_sdk/src/, and
docs/openrpc.json whenever the schemas change.
Scaffolded with lab blueprint
This repo was generated from the blueprint at https://forge.ourworld.tf/lhumina_code/hero_blueprint.
To regenerate a workspace like this one, pass --schemas-dir pointing at the
OSchema sources:
lab blueprint --dst <path> --name hero_service --schemas-dir schemas
That delegates to hero_blueprint_generator::build::WorkspaceScaffolder and
produces a runnable workspace (lib + server + admin + web + sdk + examples +
benches + tests + .forgejo) from the OSchema sources alone.