How justin-panagos/relay-v2 works
ReLay is a Tauri desktop download manager with a browser-extension entry point. Its main user flow is to submit a URL or torrent, manage the transfer and queue, scan completed files, then review downloads or quarantine results. The graph also preserves the documented ICP threat network, Pro licensing, and developer/community capabilities. Some command and integration internals are unsampled; those branches are included at the exact supported paths, with relationships shown only where the excerpts or README support them.
Main entry points: download.rs Tauri command handlers · main.js Desktop interface · mod.rs SQLite state · chunked.rs HTTP chunked transfers
Components 23
User Interfaces
- Desktop interface
src/scripts/main.js - Download controls
src/scripts/downloads.js - Torrent controls
src/scripts/torrent.js - Community and developer tools
src/scripts/community.js - Browser interception and popup
extension/background.js - Native messaging host
src-tauri/src/native_messaging/mod.rs - Quarantine review
src/scripts/quarantine.js
Download Runtime
- Tauri command handlers
src-tauri/src/commands/download.rs - HTTP chunked transfers
src-tauri/src/download/chunked.rs - Download lifecycle and queue
src-tauri/src/download/lifecycle.rs - Torrent engine
src-tauri/src/torrent/mod.rs - SQLite state
src-tauri/src/db/mod.rs
Shield Security
- Shield scan pipeline
src-tauri/src/shield/mod.rs - Seven scan layers
src-tauri/src/shield/layer7_sandbox.rs
ICP Threat Network
- ICP agent and sync
src-tauri/src/icp/sync.rs - Pattern, identity, governance canisters
icp/pattern/src/lib.rs - Threat community interface
src/scripts/community.js - Public threat API
src-tauri/src/commands/developer.rs
Account Services
- Pro licensing gates
src-tauri/src/pro/mod.rs - Paystack and Cloudflare Worker
worker/index.js
Other components
- Desktop user
- Browser user
- Web sources and peers
Connections 29
- Desktop user → Desktop interface: uses
README.md - Browser user → Browser interception and popup: intercepts downloads
README.md - Browser interception and popup → Native messaging host: sends messages
src-tauri/src/native_messaging/mod.rs - Native messaging host → SQLite state: queues and reads status
src-tauri/src/native_messaging/mod.rs - Desktop interface → Tauri command handlers: invokes commands
src/scripts/main.js - Desktop interface → Download controls: delegates controls
src/scripts/main.js - Desktop interface → Torrent controls: loads torrents
src/scripts/main.js - Desktop interface → Community and developer tools: loads community
src/scripts/main.js - Desktop interface → Quarantine review: loads quarantine
src/scripts/main.js - Tauri command handlers → HTTP chunked transfers: starts transfers
src-tauri/src/commands/download.rs - Tauri command handlers → Download lifecycle and queue: manages transfer state
src-tauri/src/commands/download.rs - Tauri command handlers → Torrent engine: dispatches torrent actions
- HTTP chunked transfers → Web sources and peers: fetches file ranges
README.md - Torrent engine → Web sources and peers: discovers peers and transfers
README.md - HTTP chunked transfers → SQLite state: updates transfer state
src-tauri/src/download/mod.rs - Download lifecycle and queue → SQLite state: persists lifecycle
src-tauri/src/download/lifecycle.rs - Torrent engine → SQLite state: records torrent state
src-tauri/src/torrent/mod.rs - HTTP chunked transfers → Shield scan pipeline: scans completed files
src-tauri/src/download/mod.rs - Shield scan pipeline → Seven scan layers: runs layer checks
src-tauri/src/shield/mod.rs - Shield scan pipeline → SQLite state: records verdicts
src-tauri/src/shield/mod.rs - Quarantine review → Tauri command handlers: requests review actions
- Shield scan pipeline → ICP agent and sync: checks threat intelligence
src-tauri/src/shield/mod.rs - ICP agent and sync → Pattern, identity, governance canisters: syncs and queries
- Threat community interface → Tauri command handlers: submits community actions
- Public threat API → ICP agent and sync: uses ICP services
src-tauri/src/commands/developer.rs - Public threat API → Desktop user: serves developer intelligence
README.md - Tauri command handlers → Pro licensing gates: checks feature access
src-tauri/src/commands/download.rs - Pro licensing gates → ICP agent and sync: uses verified licence state
src-tauri/src/pro/mod.rs - Paystack and Cloudflare Worker → Pro licensing gates: supports subscription flow
README.md