# aniketnehare15/rea architecture

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

- Interactive diagram: https://gitdiagram.com/aniketnehare15/rea
- Repository: https://github.com/aniketnehare15/rea

## Overview

REA is a local reverse-engineering toolkit exposed through an MCP server and CLI. The principal workflow is an agent or terminal user requesting an investigation, REA dispatching analysis, and findings with evidence and limitations being returned. Its documented analysis areas include native binaries, JavaScript/Electron applications, websites and runtime behavior, Android, and binary-layout diagnostics. The sampled excerpts establish MCP-to-service dispatch and Rizin session behavior; most provider and browser internals are unsampled, so their connections are documented capability links rather than asserted calls.

Main entry points: [`src/application/reverse/ReverseEngineeringService.ts`](https://github.com/aniketnehare15/rea/blob/main/src/application/reverse/ReverseEngineeringService.ts) (Reverse analysis), [`src/cli/reverseEngineeringCommands.ts`](https://github.com/aniketnehare15/rea/blob/main/src/cli/reverseEngineeringCommands.ts) (CLI commands), [`src/main.ts`](https://github.com/aniketnehare15/rea/blob/main/src/main.ts) (MCP server), [`src/server/registerReverseEngineeringTools.ts`](https://github.com/aniketnehare15/rea/blob/main/src/server/registerReverseEngineeringTools.ts) (Reverse tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interfaces"]
  node_mcp["MCP server<br/>[main.ts]"]
  node_cli["CLI commands"]
  node_tool_registration["Reverse tools"]
end

subgraph group_analysis["Analysis workflows"]
  node_reverse_service["Reverse analysis"]
  node_analysis_domain["Analysis inputs"]
  node_javascript["JavaScript analysis"]
  node_browser["Browser inspection"]
  node_android["Android analysis"]
  node_binary_layout["Binary diagnostics"]
end

subgraph group_providers["Analysis providers"]
  node_ghidra["Ghidra bridge"]
  node_hopper["Hopper bridge"]
  node_ida["IDA bridge"]
  node_rizin_sessions["Rizin sessions"]
end

subgraph group_evidence["Evidence and output"]
  node_evidence["Evidence results<br/>[evidence.ts]"]
end

node_agent(("Agent"))
node_terminal(("Terminal user"))

node_agent -->|"requests analysis"| node_mcp
node_terminal -->|"runs commands"| node_cli
node_mcp -.->|"registers tools"| node_tool_registration
node_tool_registration -->|"invokes"| node_reverse_service
node_reverse_service -->|"uses input schema"| node_analysis_domain
node_reverse_service -->|"produces observations"| node_evidence
node_reverse_service -.->|"runs Rizin operations"| node_rizin_sessions
node_reverse_service -.->|"supports provider analysis"| node_ghidra
node_reverse_service -.->|"supports provider analysis"| node_hopper
node_reverse_service -.->|"supports provider analysis"| node_ida
node_cli -.->|"analyzes applications"| node_javascript
node_cli -.->|"inspects runtime behavior"| node_browser
node_cli -.->|"analyzes Android"| node_android
node_cli -.->|"reports binary layout"| node_binary_layout

click node_mcp "https://github.com/aniketnehare15/rea/blob/main/src/main.ts"
click node_cli "https://github.com/aniketnehare15/rea/blob/main/src/cli/reverseEngineeringCommands.ts"
click node_tool_registration "https://github.com/aniketnehare15/rea/blob/main/src/server/registerReverseEngineeringTools.ts"
click node_reverse_service "https://github.com/aniketnehare15/rea/blob/main/src/application/reverse/ReverseEngineeringService.ts"
click node_analysis_domain "https://github.com/aniketnehare15/rea/blob/main/src/domain/reverseEngineering.ts"
click node_javascript "https://github.com/aniketnehare15/rea/tree/main/src/javascript/analysis"
click node_browser "https://github.com/aniketnehare15/rea/tree/main/src/browser"
click node_android "https://github.com/aniketnehare15/rea/tree/main/src/android"
click node_binary_layout "https://github.com/aniketnehare15/rea/tree/main/src/application"
click node_ghidra "https://github.com/aniketnehare15/rea/tree/main/src/ghidra"
click node_hopper "https://github.com/aniketnehare15/rea/tree/main/src/hopper"
click node_ida "https://github.com/aniketnehare15/rea/tree/main/src/ida"
click node_rizin_sessions "https://github.com/aniketnehare15/rea/blob/main/src/rizin/RizinDebugSessionManager.ts"
click node_evidence "https://github.com/aniketnehare15/rea/blob/main/src/domain/evidence.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,node_tool_registration,node_terminal toneBlue
class node_reverse_service,node_analysis_domain,node_javascript,node_browser,node_android,node_binary_layout toneAmber
class node_ghidra,node_hopper,node_ida,node_rizin_sessions toneMint
class node_evidence toneRose
class node_agent toneIndigo
```

## Components

### User interfaces

- [MCP server](https://github.com/aniketnehare15/rea/blob/main/src/main.ts): `src/main.ts`
- [CLI commands](https://github.com/aniketnehare15/rea/blob/main/src/cli/reverseEngineeringCommands.ts): `src/cli/reverseEngineeringCommands.ts`
- [Reverse tools](https://github.com/aniketnehare15/rea/blob/main/src/server/registerReverseEngineeringTools.ts): `src/server/registerReverseEngineeringTools.ts`

### Analysis workflows

- [Reverse analysis](https://github.com/aniketnehare15/rea/blob/main/src/application/reverse/ReverseEngineeringService.ts): `src/application/reverse/ReverseEngineeringService.ts`
- [Analysis inputs](https://github.com/aniketnehare15/rea/blob/main/src/domain/reverseEngineering.ts): `src/domain/reverseEngineering.ts`
- [JavaScript analysis](https://github.com/aniketnehare15/rea/tree/main/src/javascript/analysis): `src/javascript/analysis`
- [Browser inspection](https://github.com/aniketnehare15/rea/tree/main/src/browser): `src/browser`
- [Android analysis](https://github.com/aniketnehare15/rea/tree/main/src/android): `src/android`
- [Binary diagnostics](https://github.com/aniketnehare15/rea/tree/main/src/application): `src/application`

### Analysis providers

- [Ghidra bridge](https://github.com/aniketnehare15/rea/tree/main/src/ghidra): `src/ghidra`
- [Hopper bridge](https://github.com/aniketnehare15/rea/tree/main/src/hopper): `src/hopper`
- [IDA bridge](https://github.com/aniketnehare15/rea/tree/main/src/ida): `src/ida`
- [Rizin sessions](https://github.com/aniketnehare15/rea/blob/main/src/rizin/RizinDebugSessionManager.ts): `src/rizin/RizinDebugSessionManager.ts`

### Evidence and output

- [Evidence results](https://github.com/aniketnehare15/rea/blob/main/src/domain/evidence.ts): `src/domain/evidence.ts`

### Other components

- **Agent**
- **Terminal user**

## Connections

- Agent → MCP server: requests analysis (evidence: `README.md`)
- Terminal user → CLI commands: runs commands (evidence: `README.md`)
- MCP server → Reverse tools: registers tools
- Reverse tools → Reverse analysis: invokes (evidence: `src/server/registerReverseEngineeringTools.ts`)
- Reverse analysis → Analysis inputs: uses input schema (evidence: `src/application/reverse/ReverseEngineeringService.ts`)
- Reverse analysis → Evidence results: produces observations (evidence: `src/application/reverse/ReverseEngineeringService.ts`)
- Reverse analysis → Rizin sessions: runs Rizin operations
- Reverse analysis → Ghidra bridge: supports provider analysis (evidence: `README.md`)
- Reverse analysis → Hopper bridge: supports provider analysis (evidence: `README.md`)
- Reverse analysis → IDA bridge: supports provider analysis (evidence: `README.md`)
- CLI commands → JavaScript analysis: analyzes applications (evidence: `README.md`)
- CLI commands → Browser inspection: inspects runtime behavior (evidence: `README.md`)
- CLI commands → Android analysis: analyzes Android (evidence: `README.md`)
- CLI commands → Binary diagnostics: reports binary layout (evidence: `README.md`)
