Port to Hero Service architecture; fix missing RPC methods and UI bugs #10

Open
mahmoud wants to merge 3 commits from development_standardize into development
Owner

Description

Completes the conversion of hero_redis to the standard Hero Service
5-crate layout and fixes the admin UI errors caused by the new
stateless proxy architecture.

Changes

  • Crates renamed to Hero Service spec (_openrpc, _http, _client, core lib)
  • hero_redis_http rewritten as a transparent /rpc proxy with no core dependency
  • hero_redis_openrpc gains 5 missing methods (redis.select, redis.keys,
    redis.get with type detection, redis.del, redis.database_create)
  • flushDatabase fixed in database_manager.html and base.html to use a
    single redis.exec call with db param instead of broken 3-call pattern
  • Forgejo CI workflow added; all clippy -D warnings resolved
### Description Completes the conversion of hero_redis to the standard Hero Service 5-crate layout and fixes the admin UI errors caused by the new stateless proxy architecture. ### Changes - Crates renamed to Hero Service spec (_openrpc, _http, _client, core lib) - hero_redis_http rewritten as a transparent /rpc proxy with no core dependency - hero_redis_openrpc gains 5 missing methods (redis.select, redis.keys, redis.get with type detection, redis.del, redis.database_create) - flushDatabase fixed in database_manager.html and base.html to use a single redis.exec call with db param instead of broken 3-call pattern - Forgejo CI workflow added; all clippy -D warnings resolved ### Related Issues - https://forge.ourworld.tf/lhumina_code/hero_redis/issues/7 - https://forge.ourworld.tf/lhumina_code/hero_redis/issues/9
refactor: port hero_redis to Hero Service architecture
Some checks failed
CI / cargo test (pull_request) Failing after 5m52s
CI / cargo check + clippy (pull_request) Successful in 10m29s
Build and Test / build (pull_request) Failing after 1m19s
163179e145
Restructures the workspace from an ad-hoc layout into the standard
Hero Service 5-crate pattern (_openrpc backend + _http proxy + _client
+ _rhai + core lib), completing the backend/HTTP separation and wiring
up all missing RPC methods so the admin UI is fully functional.

Crate renames
- hero_redis_server → hero_redis  (core library)
- hero_redis_sdk    → hero_redis_client
- hero_redis_ui     → hero_redis_http
- new: hero_redis_openrpc  (JSON-RPC management backend)

hero_redis_openrpc (new backend binary)
- Binds ~/hero/var/sockets/hero_redis_openrpc.sock (newline-delimited
  JSON-RPC 2.0) plus RESP2 TCP :3378 and Unix socket
- Implements: rpc.health, rpc.discover, auth.validate, redis.exec,
  redis.info, redis.database_list, redis.select, redis.keys, redis.get
  (with type detection for string/list/set/hash/zset), redis.del,
  redis.database_create, perf.batch, perf.batch_native

hero_redis_http (rewritten as pure proxy)
- Removed all hero_redis core dependency; /rpc and /rpc/:context are
  transparent proxies to the openrpc socket
- Dual listener: Unix socket (hero_proxy) + TCP :8812 (dev)
- Login validated via auth.validate RPC call to backend

Template fixes
- flushDatabase used a broken select→exec(FLUSHDB)→select(0) pattern
  across three stateless connections; replaced with a single
  redis.exec({command:"FLUSHDB", db}) call in database_manager.html
  and base.html

Build & CI
- buildenv.sh/Makefile updated to reference new binary names
- .forgejo/workflows/ci.yml added (check + clippy -D warnings + test)
- .cargo/config.toml.example added for local patch overrides
- All clippy -D warnings resolved (pre-existing issues suppressed
  with crate-level #![allow(...)] in hero_redis and hero_redis_rhai)
Merge branch 'development' into development_standardize
Some checks failed
CI / cargo check + clippy (pull_request) Failing after 6s
Build and Test / build (pull_request) Failing after 53s
CI / cargo test (pull_request) Failing after 5m45s
4051b52d38
refactor: rename crate hero_redis_sdk to hero_redis_client
Some checks are pending
Build and Test / build (pull_request) Successful in 2m0s
CI / cargo check + clippy (pull_request) Has started running
CI / cargo test (pull_request) Successful in 10m9s
f0beda5941
- Update `Makefile` targets for cargo commands
- Change `use` statements in Rust code examples
- Align package name usage across the project
Some checks are pending
Build and Test / build (pull_request) Successful in 2m0s
CI / cargo check + clippy (pull_request) Has started running
CI / cargo test (pull_request) Successful in 10m9s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin development_standardize:development_standardize
git switch development_standardize

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch development
git merge --no-ff development_standardize
git switch development_standardize
git rebase development
git switch development
git merge --ff-only development_standardize
git switch development_standardize
git rebase development
git switch development
git merge --no-ff development_standardize
git switch development
git merge --squash development_standardize
git switch development
git merge --ff-only development_standardize
git switch development
git merge development_standardize
git push origin development
Sign in to join this conversation.
No reviewers
No labels
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_redis!10
No description provided.