feat(kvs): iroh KVS backend, KVS UI tab, iroh stats and admin whitelist UX #3

Closed
despiegk wants to merge 0 commits from development_iroh_kvs into development
Owner

Summary

  • New hero_codescalers_kvs crate: iroh-docs-backed replicated key-value store with LWW conflict resolution and anti-entropy sync
  • Server refactored to use iroh-docs KVS as the sole persistence layer (removes db.rs, proxy.rs, sync_worker.rs)
  • New kv.stats RPC method: node/namespace/author IDs, dialable endpoint ticket, peer count
  • UI: new KVS tab with prefix-filtered key table and per-entry value viewer
  • Admin tab: Iroh P2P Network section with node stats and Force Sync button
  • Admin whitelist UX: caller IPv6 display, IPv6 format validation warnings, self-removal confirmation

Closes geomind_code/hero_codescalers#2

Changes

  • Added crates/hero_codescalers_kvs/ — new iroh-docs KVS crate (LWW store, anti-entropy, typed keys)
  • Modified crates/hero_codescalers_server/src/main.rs — iroh-docs KvState integration, kv.stats RPC method
  • Deleted src/model/db.rs, src/proxy.rs, src/sync_worker.rs — replaced by KvState
  • Added crates/hero_codescalers_server/src/model/state.rs — KvState wrapping the KVS crate
  • Modified crates/hero_codescalers_server/openrpc.json — documented kv.stats
  • Modified crates/hero_codescalers_ui/templates/base.html — KVS tab button
  • Modified crates/hero_codescalers_ui/templates/index.html — KVS tab pane, iroh stats section, whitelist warning UX
  • Modified crates/hero_codescalers_ui/static/js/dashboard.js — loadKvs, filterKvs, loadIrohStats, IPv6 validation helpers

Test Results

  • cargo build: success
  • cargo test: 11 passed, 0 failed
## Summary - New `hero_codescalers_kvs` crate: iroh-docs-backed replicated key-value store with LWW conflict resolution and anti-entropy sync - Server refactored to use iroh-docs KVS as the sole persistence layer (removes db.rs, proxy.rs, sync_worker.rs) - New `kv.stats` RPC method: node/namespace/author IDs, dialable endpoint ticket, peer count - UI: new KVS tab with prefix-filtered key table and per-entry value viewer - Admin tab: Iroh P2P Network section with node stats and Force Sync button - Admin whitelist UX: caller IPv6 display, IPv6 format validation warnings, self-removal confirmation ## Related Issue Closes https://forge.ourworld.tf/geomind_code/hero_codescalers/issues/2 ## Changes - Added `crates/hero_codescalers_kvs/` — new iroh-docs KVS crate (LWW store, anti-entropy, typed keys) - Modified `crates/hero_codescalers_server/src/main.rs` — iroh-docs KvState integration, `kv.stats` RPC method - Deleted `src/model/db.rs`, `src/proxy.rs`, `src/sync_worker.rs` — replaced by KvState - Added `crates/hero_codescalers_server/src/model/state.rs` — KvState wrapping the KVS crate - Modified `crates/hero_codescalers_server/openrpc.json` — documented `kv.stats` - Modified `crates/hero_codescalers_ui/templates/base.html` — KVS tab button - Modified `crates/hero_codescalers_ui/templates/index.html` — KVS tab pane, iroh stats section, whitelist warning UX - Modified `crates/hero_codescalers_ui/static/js/dashboard.js` — loadKvs, filterKvs, loadIrohStats, IPv6 validation helpers ## Test Results - `cargo build`: success - `cargo test`: 11 passed, 0 failed
- New hero_codescalers_kvs crate: iroh-docs-backed replicated key-value store
  with LWW conflict resolution, anti-entropy sync, and typed key helpers
- Server: replace db.rs/proxy.rs/sync_worker.rs with KvState backed by kvs crate;
  add kv.stats RPC method returning node/namespace/author IDs, endpoint ticket,
  and peer count; persist node/admin/group data in iroh-docs namespace
- UI: add KVS tab with prefix-filtered key table and per-entry value viewer;
  add Iroh P2P Network section in Admin tab with node stats and Force Sync button;
  extend admin whitelist UX with caller-IP display, IPv6 validation warnings,
  and self-removal confirmation

Closes geomind_code/hero_codescalers#2
mahmoud closed this pull request 2026-04-27 06:51:01 +00:00

Pull request closed

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_codescalers!3
No description provided.