Skip to content

Latest commit

Β 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ SENTRY-EDGE (sentry-edge-rs)

Autonomous Sovereign Telepresence Sentinel & Edge Acoustic Watchdog

  ____  _____ _   _ _____ ______   __  _____ ____   ____ _____ 
 / ___|| ____| \ | |_   _|  _ \ \ / / | ____|  _ \ / ___| ____|
 \___ \|  _| |  \| | | | | |_) \ V /  |  _| | | | | |  _|  _|  
  ___) | |___| |\  | | | |  _ < | |   | |___| |_| | |_| | |___ 
 |____/|_____|_| \_| |_| |_| \_\|_|   |_____|____/ \____|_____|

Rust Version License Zero Dynamic Glibc Hardware HAL Test Battery


Note

Sovereign Evolution Notice:
The core acoustic monitoring, hardware telemetry, and zero-inbound telepresence capabilities of this project have been synthesized and upgraded into talos, the sovereign enterprise outpost and zero-inbound sentinel of the RMediaTech Sovereign Ecosystem. This repository is preserved as an open-source technical showcase and reference implementation.


πŸ“š Dedicated Documentation & Field Manuals

  • πŸ“– Comprehensive Operator Guide & Field Manual (SENTRY-DOC-OP-01): Real-world endurance deployment walkthrough, 119 verified records, ambient environmental noise DSP adaptation, acoustic spike mechanics (86.2 dB SPL), and the operator playbook.
  • πŸ“¦ Installation & Uninstallation Manual (SENTRY-DOC-INST-01): Multi-OS system requirements, static standalone deployment, background daemon supervision, systemd unit integration, and complete clean purge procedures.
  • πŸ› οΈ Exhaustive Daemon & CLI Reference Manual (SENTRY-DOC-CLI-01): Full command-by-command reference for sentry-daemon.sh (start|stop|status|logs|stats|verify|report) and all sentry-edge CLI subcommands with internal mechanics and failure recovery.
  • πŸ›οΈ Architecture, HAL & Report Engine Specification (SENTRY-DOC-ARCH-01): 9-crate micro-OJP taxonomy, trait-based HAL, single-source-of-truth (SST) report orchestrator, 5W1H provenance model, and rolling SHA-256 blockchain hash-chain engine.

πŸ›οΈ System Vision: Why Sentry-Edge?

Commercial security cameras force an unacceptable privacy compromise: they stream raw home and office video to third-party corporate data centers, enforce monthly recurring subscription fees, and cannot execute programmable edge logic when internet connectivity drops.

SENTRY-EDGE delivers the sovereign, zero-cloud alternative:

  • πŸ›‘οΈ Zero Open Inbound Ports: Dials outward-only to your self-hosted encrypted TLS WebSocket relay gateway without exposing local listening ports.
  • πŸŽ™οΈ Acoustic Noise Watchdog: Continuous sliding-window RMS audio analysis detects sudden acoustic anomalies ($+20\text{ dB SPL}$ over baseline, glass breaking, sirens, forced entry).
  • πŸ“Έ Burst Optical Sentinel: Automatically triggers a 5-frame 1080p JPEG burst upon acoustic breach with hardware LED isolation (camera sensor powers down immediately after frame release).
  • ⚑ Sub-10ms WebRTC Telepresence: Stream real-time 60FPS video and two-way walkie-talkie intercom directly to any mobile browser worldwide via low-latency media relays.
  • ⏱️ Nanosecond / Picosecond Provenance: Meticulous telemetry tracking (Who, From, To, What, How, Minutiae) sealed with an immutable cryptographic SHA-256 blockchain hash chain.
  • πŸ“Š Decoupled SST Report Engine: Exports self-contained, zero-CDN interactive HTML dashboards, ASCII text dossiers, RFC 4180 CSV, JSON, and Markdown briefs.
  • πŸ”¬ Trait-Based HAL: Native Linux ALSA & V4L2, macOS CoreAudio & AVFoundation, Windows WASAPI & MediaFoundation, with automatic procedural simulation fallback.
  • πŸ“¦ 100% Platform-Agnostic Static Binary: Built with x86_64-unknown-linux-musl and crt-static, eliminating all dynamic library and libc mismatches.

⚑ The Sovereign Frontier: Emancipation from Cloud Surveillance Feudalism

Commercial surveillance hardware companies have created a subscription lock-in racket: you purchase physical cameras, but you don't own the data, you can't run custom edge logic, and your private audio/video streams are uploaded to corporate servers with mandatory monthly recurring fees.

sentry-edge delivers the frontier alternative for physical spaces:

  • 0 Cloud Subscriptions: Runs on your own Linux hardware (Raspberry Pi, workstation, mini-PC).
  • 0 Inbound Ports: Dials out directly over encrypted TLS WebSockets to your own private sovereign relay.
  • 100% Cryptographic Provenance: Every acoustic spike and snapshot burst is sealed with an immutable SHA-256 blockchain hash chain that you own forever.
flowchart LR
    subgraph SurveillanceEmpire ["🏰 Cloud Surveillance Monopoly (The Old Empire)"]
        direction TB
        VendorCam["Commercial Cameras\nπŸ’Έ $10 - $50/mo per-camera subscription"]
        CloudStream["Mandatory Cloud Uploads\nπŸ‘οΈ Private audio/video parsed on vendor servers"]
        InboundHoles["Open Inbound NAT Holes\n⚠️ Vulnerable to IoT botnets & credential stuffing"]
    end

    subgraph SentryFrontier ["⚑ Sovereign Telepresence (Sentry-Edge)"]
        direction TB
        ZeroCost["Self-Hosted Commodity Hardware\nπŸ’Ž $0.00 / Zero Subscriptions Forever"]
        LocalAudit["Local Immutable SHA-256 Chain\n⛓️ Cryptographic Forensic Provenance"]
        OutboundMesh["Zero Inbound Ports\nπŸ›‘οΈ Outward-Only Encrypted TLS / WebRTC SFU"]
    end

    SurveillanceEmpire -.->|"Physical Emancipation"| SentryFrontier
Loading

πŸ—οΈ Ecosystem Architecture

graph TD
    subgraph EdgeDevice["🏠 Physical Sentinel Node (Laptop / Pi / Mini-PC)"]
        Mic["πŸŽ™οΈ Continuous Audio RMS Stream"]
        Cam["πŸ“Έ Native Video Capture Device (`/dev/video0`)"]
        SentryDaemon["πŸ›‘οΈ `sentry-edge run`<br/>β€’ Acoustic Analyzer<br/>β€’ Burst Capturer<br/>β€’ Embedded WAL Ledger<br/>β€’ Nanosecond Telemetry Engine"]
    end

    subgraph SovereignBackend["🌐 Self-Hosted Backend Infrastructure"]
        RelayGateway["πŸ”Œ Outbound Relay Gateway<br/>(relay.example.com:8084)"]
        MediaGateway["⚑ Sovereign Media Gateway<br/>(media.example.com:8443)"]
    end

    subgraph OperatorViewport["πŸ“± Remote End-User / Operator Client"]
        ClientApp["πŸ’» `sentry-edge client`<br/>β€’ Live Alert Ingestion<br/>β€’ Instant Snapshot View<br/>β€’ Push-to-Talk Intercom"]
        MobileHUD["🌐 Mobile Web HUD (Any Browser)<br/>β€’ Sub-10ms Low-Latency Video"]
    end

    Mic --> SentryDaemon
    Cam --> SentryDaemon
    SentryDaemon <== "Outbound-Only TLS WebSocket (0 Open Ports)" ==> RelayGateway
    SentryDaemon -.->|"Sub-10ms WebRTC DataChannel"| MediaGateway
    RelayGateway <== "Encrypted WebSocket Stream" ==> ClientApp
    RelayGateway <== "Encrypted HTTPS / WSS" ==> MobileHUD
    MediaGateway -.->|"Low-Latency Telepresence Stream"| ClientApp
    MediaGateway -.->|"Low-Latency Telepresence Stream"| MobileHUD
Loading

βš™οΈ System Requirements

Component Minimum Specification Recommended Specification
CPU Architecture x86_64 or aarch64 Multi-core x86_64 or Raspberry Pi 4/5
Memory (RAM) $\ge 32\text{ MB}$ total system RAM $\ge 64\text{ MB}$ total system RAM
Process Footprint $\approx 5.8\text{ MB} - 6.2\text{ MB}$ RSS Peak Burst: $7.1\text{ MB}$ RSS
Supported OS Linux 2.6+, macOS 11+, Windows 10+, FreeBSD 13+ Modern Linux (Ubuntu, Debian, Alpine, Arch)
Sensors Audio input device (ALSA/WASAPI/CoreAudio) UVC-compliant USB Webcam (/dev/video0) + Mic

πŸš€ Quickstart & Usage

1. Build Zero-Dependency Static Release Binary

# Build 100% standalone static binary (zero host library dependencies)
cargo build --release --target x86_64-unknown-linux-musl

# Verify static linking
file target/x86_64-unknown-linux-musl/release/sentry-edge

2. Inspect Host Hardware & HAL Profile

./target/x86_64-unknown-linux-musl/release/sentry-edge --profile

3. Launch Edge Sentinel Hardware Daemon

./target/x86_64-unknown-linux-musl/release/sentry-edge run \
    --relay-url wss://relay.example.com:8084/ws/outpost \
    --token sentry-dev-99x \
    --label "Server-Room-Sentinel" \
    --camera /dev/video0 \
    --trigger-db 20.0

4. Generate Multi-Format Dossiers

# Generate interactive zero-CDN HTML dashboard with expandable forensic drawers:
./target/x86_64-unknown-linux-musl/release/sentry-edge report --format html --output sentry_report.html

# Generate high-impact ASCII plain text dossier for terminal inspection:
./target/x86_64-unknown-linux-musl/release/sentry-edge report --format txt --output sentry_report.txt

🧩 Workspace Crate Taxonomy (Micro-OJP)

Crate Responsibility & Invariant
crates/sentry-core Core DSP math, acoustic RMS, platform paths, configuration parser, and alert models.
crates/sentry-hardware Trait-based Hardware Abstraction Layer (HAL) for Linux, macOS, Windows, and Procedural fallback.
crates/sentry-telemetry Picosecond timers, 5W1H micro-provenance, and immutable rolling SHA-256 blockchain hash-chain engine.
crates/sentry-ledger Embedded local ACID write-ahead log (WAL) incident database and persistence sink.
crates/sentry-report Decoupled Single Source of Truth (SST) report orchestrator, narrative storyteller, and 6 multi-format exporters.
crates/sentry-bridge Outbound-only TLS WebSocket tunnel client for sovereign edge relays.
crates/sentry-telepresence Sub-10ms WebRTC 2-way walkie-talkie intercom bridge and session token generation.
crates/sentry-client Remote operator HUD and live incoming alert ingestion console.
crates/sentry-cli Main binary entrypoint supporting daemon, client, monitor, profile, logs, and report subcommands.

πŸ“„ License

Licensed under either of:

Releases

Packages

Contributors

Languages