Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.9 KB

File metadata and controls

55 lines (41 loc) · 1.9 KB

Architecture

Human Mode is a Tauri v2 desktop app with a React front end and Rust native monitoring core.

High-Level Shape

React UI
  -> src/domain        app state, schedules, target mapping, preferences
  -> src/features      dashboard, guard notice, schedule, watchlist
  -> src/tauri         typed wrappers around Tauri commands

Tauri / Rust
  -> commands.rs       command boundary exposed to the UI
  -> monitor.rs        background scan loop and cached snapshot
  -> catalog.rs        built-in AI target catalog
  -> scanners/         process, installed app, browser, frontmost scanners
  -> tray.rs           native tray and tray window wiring

Frontend Responsibilities

  • Render current state.
  • Store user preferences locally.
  • Decide UI copy and interaction state.
  • Request native scans and actions through typed Tauri wrappers.

The frontend should not parse process tables or browser data directly.

Rust Responsibilities

  • Read the process table.
  • Scan known install locations.
  • Read supported browser tab URLs where the OS allows it.
  • Read foreground app/window hints where implemented.
  • Close selected processes or browser tabs when explicitly requested.
  • Publish a cached monitor snapshot to the UI.

The native layer should not know marketing copy, visual state, or React layout.

Data Flow

  1. monitor.rs periodically scans native signals.
  2. A cached monitor snapshot is exposed through get_monitor_snapshot.
  3. React maps native hits to display targets.
  4. Guard policy checks quiet hours, selected targets, and enforcement level.
  5. UI shows notifications or requests native close actions.

Current Boundary

Guard policy is still mostly in React. The Rust monitor owns detection cadence and cached state, but React currently owns warning count and enforcement decisions. Moving policy into Rust is a future hardening task, not required for the initial open-source release.