No description
  • Rust 69.2%
  • Shell 14%
  • JavaScript 7.7%
  • HTML 6.5%
  • Makefile 2.2%
  • Other 0.4%
Find a file
despiegk 9df2da8644
Some checks failed
Build / build-and-test (push) Failing after 0s
Build / build-linux (linux-arm64, true, aarch64-unknown-linux-gnu) (push) Has been skipped
Build / build-macos (macos-amd64, x86_64-apple-darwin) (push) Has been skipped
Build / build-macos (macos-arm64, aarch64-apple-darwin) (push) Has been skipped
Build / build-linux (linux-amd64, false, x86_64-unknown-linux-musl) (push) Has been skipped
Refactor hero_sync UI to use openrpc_proxy! macro and add integration tests
- Replace manual JSON-RPC proxy implementation with openrpc_proxy! macro
  from herolib_derive. This auto-generates /rpc, /health, and /.well-known/openrpc.json
  endpoints from the server's OpenRPC spec, eliminating ~100 lines of manual code.

- Add herolib_derive to workspace dependencies with git source

- Add dirs crate dependency to hero_sync_ui (required by openrpc_proxy! macro)

- Create integration tests in hero_sync_examples/tests/integration.rs
  - Tests server health check
  - Tests OpenRPC spec discovery
  - Tests info endpoint
  - Uses zinit for service lifecycle management
  - Demonstrates proper SDK usage patterns

All changes maintain Unix socket architecture (no TCP), socket permissions (0o770),
and discovery manifest endpoints. Code compiles and passes all checks.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-04 07:58:46 +02:00
.claude init 2026-02-21 09:10:47 +03:00
.forgejo/workflows Refactor to multi-crate workspace with OpenRPC (JSON-RPC 2.0) architecture 2026-02-21 15:55:39 +03:00
crates Refactor hero_sync UI to use openrpc_proxy! macro and add integration tests 2026-03-04 07:58:46 +02:00
scripts Refactor hero_sync: restructure crates, consolidate modules, and update dependencies 2026-03-01 18:43:21 +03:00
services Refactor to multi-crate workspace with OpenRPC (JSON-RPC 2.0) architecture 2026-02-21 15:55:39 +03:00
.gitignore Refactor to multi-crate workspace with OpenRPC (JSON-RPC 2.0) architecture 2026-02-21 15:55:39 +03:00
buildenv.sh Refactor hero_sync: restructure crates, consolidate modules, and update dependencies 2026-03-01 18:43:21 +03:00
Cargo.lock Refactor hero_sync UI to use openrpc_proxy! macro and add integration tests 2026-03-04 07:58:46 +02:00
Cargo.toml Refactor hero_sync UI to use openrpc_proxy! macro and add integration tests 2026-03-04 07:58:46 +02:00
Makefile Refactor hero_sync: restructure crates, consolidate modules, and update dependencies 2026-03-01 18:43:21 +03:00
README.md Refactor hero_sync: restructure crates, consolidate modules, and update dependencies 2026-03-01 18:43:21 +03:00
SPEC.md Implement hero_sync multi-protocol file synchronization 2026-02-21 09:07:19 +03:00
test_server.sh Initialize Hero WebDAV project structure 2026-02-19 08:49:39 +03:00

Hero Sync

Multi-protocol file synchronization for the Hero Ecosystem.

Workspace Structure

This is a Cargo workspace with 5 crates:

Crate Type Description
hero_sync_sdk library SDK: types, config, error handling, and async Unix socket client
hero_sync_server binary OpenRPC backend server (Unix socket only, no UI)
hero_sync binary CLI tool for managing sync profiles and running sync operations
hero_sync_ui binary Web dashboard UI with embedded static assets (Bootstrap, Unpoly)
hero_sync_examples examples Example programs demonstrating SDK usage

Dependency graph

hero_sync_sdk  (no internal deps)
     ^         ^          ^
     |         |          |
    CLI        UI      examples

hero_sync_server  (standalone — business logic + OpenRPC)

Sockets

Service Binding Path
hero_sync_server Unix socket (OpenRPC) ~/hero/var/sockets/hero_sync_server.sock
hero_sync_ui Unix socket (HTTP + /rpc proxy) ~/hero/var/sockets/hero_sync_ui.sock

No service binds TCP. Only hero_proxy exposes TCP.

Building

# Build all crates (release)
make build

# Build specific crate
cargo build --release -p hero_sync
cargo build --release -p hero_sync_server

Running

# Start server + UI (server on socket, UI on socket)
make run

# Use the CLI
./target/release/hero_sync list
./target/release/hero_sync sync <profile>
./target/release/hero_sync pull <profile>
./target/release/hero_sync push <profile>
./target/release/hero_sync health

Development

make check      # Fast type-check all crates
make test       # Run all tests
make fmt        # Format code
make lint       # Run clippy
make rundev     # Run server + UI in debug mode

Static Assets

The web dashboard uses Bootstrap 5, Bootstrap Icons, and Unpoly. To download/update these:

make download-assets

Assets are embedded into the hero_sync_ui binary via rust-embed.