# greekr4/rever-browser architecture

> Architecture diagram of the GitHub repository greekr4/rever-browser, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/greekr4/rever-browser
- Repository: https://github.com/greekr4/rever-browser

## Overview

rever-browser is a Rust desktop workbench pairing an embedded Servo browser with an AI agent for API reverse engineering. Its main loop is capture traffic, analyze scripts and requests, reproduce them in the browser context, verify issues, then automate successful sequences. Red Team mode adds scoped, parallel scanning and findings reports. The graph follows README-documented workflows and sampled module responsibilities; unsampled implementation details are represented only where README explicitly describes the capability.

Main entry points: [`crates/rever/src/agent.rs`](https://github.com/greekr4/rever-browser/blob/main/crates/rever/src/agent.rs) (Agent Session), [`crates/rever/src/engine.rs`](https://github.com/greekr4/rever-browser/blob/main/crates/rever/src/engine.rs) (Servo Engine), [`crates/rever-tools-browser/src/browser.rs`](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-browser/src/browser.rs) (Browser Tools), [`crates/rever-tools-redteam/src/scan.rs`](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-redteam/src/scan.rs) (Red Team Scan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop and Browser"]
  node_app["App State<br/>[app.rs]"]
  node_shell["App Shell<br/>[mod.rs]"]
  node_engine["Servo Engine<br/>[engine.rs]"]
end

subgraph group_agent_tools["Agent and Tools"]
  node_agent["Agent Session<br/>[agent.rs]"]
  node_tool_server["Tool Registry<br/>[tool.rs]"]
  node_browser_tools["Browser Tools<br/>[browser.rs]"]
  node_browser_gestures["Browser Gestures<br/>[gestures.rs]"]
  node_ui_crawl["UI Crawler<br/>[ui_crawl.rs]"]
  node_cli["revb CLI<br/>[revb.mjs]"]
end

subgraph group_analysis["Traffic Analysis"]
  node_traffic["Traffic Capture<br/>[traffic.rs]"]
  node_traffic_ui["Traffic Panel<br/>[traffic_list.rs]"]
  node_script_analysis["Script Analysis<br/>[scripts.rs]"]
  node_inspect["Security Inspection<br/>[js.rs]"]
  node_repeater["Request Repeater<br/>[repeater.rs]"]
end

subgraph group_security["Security Review"]
  node_redteam["Red Team Scan<br/>[scan.rs]"]
  node_probes["Security Probes<br/>[args.rs]"]
  node_findings["Findings Report<br/>[findings.rs]"]
end

subgraph group_automation["Workflows and UI"]
  node_workflows["Workflow Editor<br/>[pipeline_editor.rs]"]
  node_workflow_runner["Workflow Executor"]
end

node_user(("Engineer"))
node_target(("Target Site"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_shell
node_app -->|"manages tabs"| node_engine
node_user -->|"browses target"| node_engine
node_engine -->|"captures requests"| node_traffic
node_traffic -->|"shows traffic"| node_traffic_ui
node_agent -->|"invokes tools"| node_cli
node_cli -->|"reaches socket"| node_tool_server
node_tool_server -->|"dispatches"| node_browser_tools
node_browser_tools -->|"drives tab"| node_engine
node_browser_tools -->|"uses gestures"| node_browser_gestures
node_browser_tools -->|"crawls UI"| node_ui_crawl
node_agent -->|"reads requests"| node_traffic
node_agent -->|"analyzes scripts"| node_script_analysis
node_agent -->|"inspects security"| node_inspect
node_agent -->|"replays requests"| node_repeater
node_agent -->|"runs scan"| node_redteam
node_redteam -->|"scans pages"| node_ui_crawl
node_redteam -->|"runs probes"| node_probes
node_redteam -->|"records findings"| node_findings
node_agent -->|"creates macros"| node_workflows
node_workflows -->|"defines replay"| node_workflow_runner
node_workflow_runner -->|"exports commands"| node_cli
node_engine -->|"loads pages"| node_target

click node_app "https://github.com/greekr4/rever-browser/blob/main/crates/rever/src/app.rs"
click node_shell "https://github.com/greekr4/rever-browser/blob/main/crates/rever/src/shell/mod.rs"
click node_engine "https://github.com/greekr4/rever-browser/blob/main/crates/rever/src/engine.rs"
click node_traffic "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-traffic/src/traffic.rs"
click node_traffic_ui "https://github.com/greekr4/rever-browser/blob/main/crates/rever-ui-traffic/src/traffic_list.rs"
click node_agent "https://github.com/greekr4/rever-browser/blob/main/crates/rever/src/agent.rs"
click node_tool_server "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-api/src/tool.rs"
click node_browser_tools "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-browser/src/browser.rs"
click node_browser_gestures "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-browser/src/gestures.rs"
click node_ui_crawl "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-browser/src/ui_crawl.rs"
click node_script_analysis "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-scripts/src/scripts.rs"
click node_inspect "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-inspect/src/js.rs"
click node_repeater "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-http/src/repeater.rs"
click node_redteam "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-redteam/src/scan.rs"
click node_probes "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-probe/src/args.rs"
click node_findings "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-redteam/src/findings.rs"
click node_workflows "https://github.com/greekr4/rever-browser/blob/main/crates/rever-ui-workflows/src/pipeline/pipeline_editor.rs"
click node_workflow_runner "https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-automation/src/workflow_executor.rs"
click node_cli "https://github.com/greekr4/rever-browser/blob/main/bin/revb.mjs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_shell,node_engine toneBlue
class node_agent,node_tool_server,node_browser_tools,node_browser_gestures,node_ui_crawl,node_cli toneAmber
class node_traffic,node_traffic_ui,node_script_analysis,node_inspect,node_repeater toneMint
class node_redteam,node_probes,node_findings toneRose
class node_workflows,node_workflow_runner,node_user,node_target toneIndigo
```

## Components

### Desktop and Browser

- [App State](https://github.com/greekr4/rever-browser/blob/main/crates/rever/src/app.rs): `crates/rever/src/app.rs`
- [App Shell](https://github.com/greekr4/rever-browser/blob/main/crates/rever/src/shell/mod.rs): `crates/rever/src/shell/mod.rs`
- [Servo Engine](https://github.com/greekr4/rever-browser/blob/main/crates/rever/src/engine.rs): `crates/rever/src/engine.rs`

### Agent and Tools

- [Agent Session](https://github.com/greekr4/rever-browser/blob/main/crates/rever/src/agent.rs): `crates/rever/src/agent.rs`
- [Tool Registry](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-api/src/tool.rs): `crates/rever-tools-api/src/tool.rs`
- [Browser Tools](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-browser/src/browser.rs): `crates/rever-tools-browser/src/browser.rs`
- [Browser Gestures](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-browser/src/gestures.rs): `crates/rever-tools-browser/src/gestures.rs`
- [UI Crawler](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-browser/src/ui_crawl.rs): `crates/rever-tools-browser/src/ui_crawl.rs`
- [revb CLI](https://github.com/greekr4/rever-browser/blob/main/bin/revb.mjs): `bin/revb.mjs`

### Traffic Analysis

- [Traffic Capture](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-traffic/src/traffic.rs): `crates/rever-tools-traffic/src/traffic.rs`
- [Traffic Panel](https://github.com/greekr4/rever-browser/blob/main/crates/rever-ui-traffic/src/traffic_list.rs): `crates/rever-ui-traffic/src/traffic_list.rs`
- [Script Analysis](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-scripts/src/scripts.rs): `crates/rever-tools-scripts/src/scripts.rs`
- [Security Inspection](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-inspect/src/js.rs): `crates/rever-tools-inspect/src/js.rs`
- [Request Repeater](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-http/src/repeater.rs): `crates/rever-tools-http/src/repeater.rs`

### Security Review

- [Red Team Scan](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-redteam/src/scan.rs): `crates/rever-tools-redteam/src/scan.rs`
- [Security Probes](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-probe/src/args.rs): `crates/rever-tools-probe/src/args.rs`
- [Findings Report](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-redteam/src/findings.rs): `crates/rever-tools-redteam/src/findings.rs`

### Workflows and UI

- [Workflow Editor](https://github.com/greekr4/rever-browser/blob/main/crates/rever-ui-workflows/src/pipeline/pipeline_editor.rs): `crates/rever-ui-workflows/src/pipeline/pipeline_editor.rs`
- [Workflow Executor](https://github.com/greekr4/rever-browser/blob/main/crates/rever-tools-automation/src/workflow_executor.rs): `crates/rever-tools-automation/src/workflow_executor.rs`

### Other components

- **Engineer**
- **Target Site**

## Connections

- Engineer → App State: uses (evidence: `README.md`)
- App State → App Shell: renders (evidence: `crates/rever/src/app.rs`)
- App State → Servo Engine: manages tabs (evidence: `crates/rever/src/engine.rs`)
- Engineer → Servo Engine: browses target (evidence: `README.md`)
- Servo Engine → Traffic Capture: captures requests (evidence: `README.md`)
- Traffic Capture → Traffic Panel: shows traffic (evidence: `README.md`)
- Agent Session → revb CLI: invokes tools (evidence: `README.md`)
- revb CLI → Tool Registry: reaches socket (evidence: `README.md`)
- Tool Registry → Browser Tools: dispatches
- Browser Tools → Servo Engine: drives tab (evidence: `README.md`)
- Browser Tools → Browser Gestures: uses gestures (evidence: `crates/rever-tools-browser/src/lib.rs`)
- Browser Tools → UI Crawler: crawls UI (evidence: `README.md`)
- Agent Session → Traffic Capture: reads requests (evidence: `README.md`)
- Agent Session → Script Analysis: analyzes scripts (evidence: `README.md`)
- Agent Session → Security Inspection: inspects security (evidence: `README.md`)
- Agent Session → Request Repeater: replays requests (evidence: `README.md`)
- Agent Session → Red Team Scan: runs scan (evidence: `README.md`)
- Red Team Scan → UI Crawler: scans pages (evidence: `README.md`)
- Red Team Scan → Security Probes: runs probes (evidence: `README.md`)
- Red Team Scan → Findings Report: records findings (evidence: `README.md`)
- Agent Session → Workflow Editor: creates macros (evidence: `README.md`)
- Workflow Editor → Workflow Executor: defines replay (evidence: `README.md`)
- Workflow Executor → revb CLI: exports commands (evidence: `README.md`)
- Servo Engine → Target Site: loads pages (evidence: `README.md`)
