From 8816a192c95cf539b65975469a2d61aed46f0414 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 26 May 2026 16:11:05 +0530 Subject: feat: initial implementation of grasp-mirror daemon GRASP mirror daemon that discovers repos from watched npubs and mirrors git data + Nostr events across all known GRASP servers for redundancy. Features: - Configurable npub watch list via .env (MIRROR_NPUBS) - TOML config for GRASP server list, index relays, storage paths - NIP-11 verification of GRASP servers on startup - Discovery of repos via kind:30617 announcements on index relays - Git mirroring (bare clone + push --mirror) to missing GRASP servers - Nostr event forwarding to all GRASP server embedded relays - SQLite state tracking for sync status and event dedup - Optional signing key for updating announcements with new clone URLs - CLI subcommands: daemon, status, verify, mirror-once Architecture: config.rs - TOML + .env config loading db.rs - SQLite state tracking health.rs - NIP-11 GRASP server verification discovery.rs - Relay subscription, kind:30617 parsing git_mirror.rs - Bare clone + push to GRASP servers nostr_mirror.rs - Event forwarding to all GRASP relays signing.rs - Optional announcement updates main.rs - CLI entry point, daemon loop --- Cargo.toml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Cargo.toml (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..a093dbb --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "grasp-mirror" +version = "0.1.0" +edition = "2021" +description = "GRASP mirror daemon — mirrors git data and Nostr events across GRASP servers" +license = "MIT" + +[dependencies] +nostr-sdk = "0.39" +nostr = "0.39" +tokio = { version = "1", features = ["full"] } +sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite"] } +toml = "0.8" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] } +reqwest = { version = "0.12", features = ["json"] } +dotenvy = "0.15" +anyhow = "1" +git2 = "0.20" +hex = "0.4" +clap = { version = "4", features = ["derive", "env"] } +dirs = "6" -- cgit v1.2.3