# yogerawat26/reaoct26 architecture

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

- Interactive diagram: https://gitdiagram.com/yogerawat26/reaoct26
- Repository: https://github.com/yogerawat26/reaoct26

## Overview

REA is a local reverse-engineering MCP server with a CLI that investigates binaries, applications, and runtime behavior, then returns findings and evidence for an agent or engineer to interpret. The README describes the user workflow, while the source index identifies implementation areas and some direct module dependencies. Several feature branches are documented but their detailed runtime wiring was not sampled, so those relationships are not expanded beyond the documented workflow.

Main entry points: [`src/main.ts`](https://github.com/yogerawat26/reaoct26/blob/main/src/main.ts) (MCP server), [`src/application/reverse/ReverseEngineeringService.ts`](https://github.com/yogerawat26/reaoct26/blob/main/src/application/reverse/ReverseEngineeringService.ts) (Reverse engineering), [`src/application/AnalysisProvider.ts`](https://github.com/yogerawat26/reaoct26/blob/main/src/application/AnalysisProvider.ts) (Native analysis providers), [`src/cli/reverseEngineeringCommands.ts`](https://github.com/yogerawat26/reaoct26/blob/main/src/cli/reverseEngineeringCommands.ts) (CLI commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry points"]
  node_mcp["MCP server<br/>[main.ts]"]
  node_cli["CLI commands"]
end

subgraph group_workflow["Analysis workflows"]
  node_app_analysis["Application analysis<br/>[DirectAnalysis.ts]"]
  node_js_analysis["JavaScript analysis"]
  node_browser_analysis["Browser observation"]
  node_scenario_capture["Browser scenarios"]
  node_reverse_service["Reverse engineering"]
  node_android_analysis["Android analysis<br/>[JadxAnalysis.ts]"]
  node_sqlite_analysis["SQLite inspection"]
end

subgraph group_providers["Analysis providers"]
  node_native_providers["Native analysis providers"]
  node_ghidra["Ghidra client<br/>[GhidraClient.ts]"]
  node_hopper["Hopper client<br/>[HopperClient.ts]"]
  node_ida["IDA client"]
  node_gdb["GDB sessions"]
  node_rizin["Rizin sessions"]
  node_cutter["Cutter bridge"]
end

subgraph group_evidence["Evidence and results"]
  node_artifact_reader["Artifact reader<br/>[ArtifactReader.ts]"]
  node_evidence["Evidence records<br/>[evidence.ts]"]
  node_errors["Analysis errors"]
  node_result["Analysis result<br/>[result.ts]"]
end

node_agent(("AI agent"))
node_engineer(("Engineer"))

node_agent -->|"asks through MCP"| node_mcp
node_engineer -->|"runs commands"| node_cli
node_cli -->|"uses workflow"| node_reverse_service
node_agent -->|"requests investigation"| node_mcp
node_mcp -.->|"inspects applications"| node_app_analysis
node_mcp -.->|"analyzes JavaScript"| node_js_analysis
node_mcp -.->|"observes runtime"| node_browser_analysis
node_mcp -.->|"captures scenarios"| node_scenario_capture
node_mcp -->|"offers analysis tools"| node_reverse_service
node_mcp -.->|"supports Android"| node_android_analysis
node_mcp -.->|"inspects databases"| node_sqlite_analysis
node_reverse_service -->|"executes provider commands"| node_native_providers
node_native_providers -.->|"supports analysis"| node_ghidra
node_native_providers -.->|"supports analysis"| node_hopper
node_native_providers -.->|"supports analysis"| node_ida
node_reverse_service -.->|"reads artifacts"| node_artifact_reader
node_reverse_service -->|"produces evidence"| node_evidence
node_reverse_service -->|"returns typed result"| node_result
node_mcp -->|"returns findings"| node_evidence
node_mcp -.->|"projects failures"| node_errors
node_reverse_service -.->|"supports debugging"| node_gdb
node_reverse_service -.->|"supports debugging"| node_rizin
node_reverse_service -.->|"supports provider integration"| node_cutter
node_mcp -->|"returns findings"| node_agent

click node_mcp "https://github.com/yogerawat26/reaoct26/blob/main/src/main.ts"
click node_cli "https://github.com/yogerawat26/reaoct26/blob/main/src/cli/reverseEngineeringCommands.ts"
click node_app_analysis "https://github.com/yogerawat26/reaoct26/blob/main/src/application/DirectAnalysis.ts"
click node_js_analysis "https://github.com/yogerawat26/reaoct26/blob/main/src/javascript/analysis/JavaScriptAnalysisWorker.ts"
click node_browser_analysis "https://github.com/yogerawat26/reaoct26/blob/main/src/application/BrowserObservationService.ts"
click node_scenario_capture "https://github.com/yogerawat26/reaoct26/blob/main/src/application/BrowserScenarioCaptureService.ts"
click node_reverse_service "https://github.com/yogerawat26/reaoct26/blob/main/src/application/reverse/ReverseEngineeringService.ts"
click node_android_analysis "https://github.com/yogerawat26/reaoct26/blob/main/src/android/JadxAnalysis.ts"
click node_sqlite_analysis "https://github.com/yogerawat26/reaoct26/blob/main/src/sqlite/SqliteDatabaseInspection.ts"
click node_native_providers "https://github.com/yogerawat26/reaoct26/blob/main/src/application/AnalysisProvider.ts"
click node_ghidra "https://github.com/yogerawat26/reaoct26/blob/main/src/ghidra/GhidraClient.ts"
click node_hopper "https://github.com/yogerawat26/reaoct26/blob/main/src/hopper/HopperClient.ts"
click node_ida "https://github.com/yogerawat26/reaoct26/blob/main/src/ida/IdaSessionClient.ts"
click node_gdb "https://github.com/yogerawat26/reaoct26/blob/main/src/gdb/GdbSessionManager.ts"
click node_rizin "https://github.com/yogerawat26/reaoct26/blob/main/src/rizin/RizinDebugSessionManager.ts"
click node_cutter "https://github.com/yogerawat26/reaoct26/blob/main/src/cutter/CutterBridgeClient.ts"
click node_artifact_reader "https://github.com/yogerawat26/reaoct26/blob/main/src/artifacts/ArtifactReader.ts"
click node_evidence "https://github.com/yogerawat26/reaoct26/blob/main/src/domain/evidence.ts"
click node_errors "https://github.com/yogerawat26/reaoct26/blob/main/src/domain/analysisErrorProjection.ts"
click node_result "https://github.com/yogerawat26/reaoct26/blob/main/src/domain/result.ts"

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_mcp,node_cli toneBlue
class node_app_analysis,node_js_analysis,node_browser_analysis,node_scenario_capture,node_reverse_service,node_android_analysis,node_sqlite_analysis toneAmber
class node_native_providers,node_ghidra,node_hopper,node_ida,node_gdb,node_rizin,node_cutter toneMint
class node_artifact_reader,node_evidence,node_errors,node_result toneRose
class node_agent,node_engineer toneIndigo
```

## Components

### User entry points

- [MCP server](https://github.com/yogerawat26/reaoct26/blob/main/src/main.ts): `src/main.ts`
- [CLI commands](https://github.com/yogerawat26/reaoct26/blob/main/src/cli/reverseEngineeringCommands.ts): `src/cli/reverseEngineeringCommands.ts`

### Analysis workflows

- [Application analysis](https://github.com/yogerawat26/reaoct26/blob/main/src/application/DirectAnalysis.ts): `src/application/DirectAnalysis.ts`
- [JavaScript analysis](https://github.com/yogerawat26/reaoct26/blob/main/src/javascript/analysis/JavaScriptAnalysisWorker.ts): `src/javascript/analysis/JavaScriptAnalysisWorker.ts`
- [Browser observation](https://github.com/yogerawat26/reaoct26/blob/main/src/application/BrowserObservationService.ts): `src/application/BrowserObservationService.ts`
- [Browser scenarios](https://github.com/yogerawat26/reaoct26/blob/main/src/application/BrowserScenarioCaptureService.ts): `src/application/BrowserScenarioCaptureService.ts`
- [Reverse engineering](https://github.com/yogerawat26/reaoct26/blob/main/src/application/reverse/ReverseEngineeringService.ts): `src/application/reverse/ReverseEngineeringService.ts`
- [Android analysis](https://github.com/yogerawat26/reaoct26/blob/main/src/android/JadxAnalysis.ts): `src/android/JadxAnalysis.ts`
- [SQLite inspection](https://github.com/yogerawat26/reaoct26/blob/main/src/sqlite/SqliteDatabaseInspection.ts): `src/sqlite/SqliteDatabaseInspection.ts`

### Analysis providers

- [Native analysis providers](https://github.com/yogerawat26/reaoct26/blob/main/src/application/AnalysisProvider.ts): `src/application/AnalysisProvider.ts`
- [Ghidra client](https://github.com/yogerawat26/reaoct26/blob/main/src/ghidra/GhidraClient.ts): `src/ghidra/GhidraClient.ts`
- [Hopper client](https://github.com/yogerawat26/reaoct26/blob/main/src/hopper/HopperClient.ts): `src/hopper/HopperClient.ts`
- [IDA client](https://github.com/yogerawat26/reaoct26/blob/main/src/ida/IdaSessionClient.ts): `src/ida/IdaSessionClient.ts`
- [GDB sessions](https://github.com/yogerawat26/reaoct26/blob/main/src/gdb/GdbSessionManager.ts): `src/gdb/GdbSessionManager.ts`
- [Rizin sessions](https://github.com/yogerawat26/reaoct26/blob/main/src/rizin/RizinDebugSessionManager.ts): `src/rizin/RizinDebugSessionManager.ts`
- [Cutter bridge](https://github.com/yogerawat26/reaoct26/blob/main/src/cutter/CutterBridgeClient.ts): `src/cutter/CutterBridgeClient.ts`

### Evidence and results

- [Artifact reader](https://github.com/yogerawat26/reaoct26/blob/main/src/artifacts/ArtifactReader.ts): `src/artifacts/ArtifactReader.ts`
- [Evidence records](https://github.com/yogerawat26/reaoct26/blob/main/src/domain/evidence.ts): `src/domain/evidence.ts`
- [Analysis errors](https://github.com/yogerawat26/reaoct26/blob/main/src/domain/analysisErrorProjection.ts): `src/domain/analysisErrorProjection.ts`
- [Analysis result](https://github.com/yogerawat26/reaoct26/blob/main/src/domain/result.ts): `src/domain/result.ts`

### Other components

- **AI agent**
- **Engineer**

## Connections

- AI agent → MCP server: asks through MCP
- Engineer → CLI commands: runs commands
- CLI commands → Reverse engineering: uses workflow (evidence: `src/cli/reverseEngineeringCommands.ts`)
- AI agent → MCP server: requests investigation
- MCP server → Application analysis: inspects applications
- MCP server → JavaScript analysis: analyzes JavaScript
- MCP server → Browser observation: observes runtime
- MCP server → Browser scenarios: captures scenarios
- MCP server → Reverse engineering: offers analysis tools
- MCP server → Android analysis: supports Android
- MCP server → SQLite inspection: inspects databases (evidence: `src/sqlite/SqliteDatabaseInspection.ts`)
- Reverse engineering → Native analysis providers: executes provider commands (evidence: `src/application/reverse/ReverseEngineeringService.ts`)
- Native analysis providers → Ghidra client: supports analysis
- Native analysis providers → Hopper client: supports analysis
- Native analysis providers → IDA client: supports analysis (evidence: `src/ida/IdaSessionClient.ts`)
- Reverse engineering → Artifact reader: reads artifacts
- Reverse engineering → Evidence records: produces evidence (evidence: `src/application/reverse/ReverseEngineeringService.ts`)
- Reverse engineering → Analysis result: returns typed result (evidence: `src/application/reverse/ReverseEngineeringService.ts`)
- MCP server → Evidence records: returns findings
- MCP server → Analysis errors: projects failures (evidence: `src/main.ts`)
- Reverse engineering → GDB sessions: supports debugging (evidence: `src/cli/reverseEngineeringCommands.ts`)
- Reverse engineering → Rizin sessions: supports debugging (evidence: `src/cli/reverseEngineeringCommands.ts`)
- Reverse engineering → Cutter bridge: supports provider integration
- MCP server → AI agent: returns findings
