# mukeshcyarlagadda/rea architecture

> Architecture diagram of the GitHub repository mukeshcyarlagadda/rea, 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/mukeshcyarlagadda/rea
- Repository: https://github.com/mukeshcyarlagadda/rea

## Overview

REA is a local reverse-engineering product exposed through MCP and CLI workflows. The documented user journey is an agent or terminal request, target inspection through analysis tools, and findings returned with evidence and limitations. The graph preserves major analysis families visible in the README and source tree. Source excerpts are limited, so subsystem links not demonstrated by the README or SOURCE INDEX are omitted or marked unverified.

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

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Product entry"]
  node_mcp["MCP server<br/>[main.ts]"]
  node_cli["CLI commands<br/>[cli.ts]"]
  node_mcp_tools["MCP tool registration"]
end

subgraph group_workflow["Analysis workflow"]
  node_reverse_workflow["Reverse analysis"]
  node_evidence["Evidence results<br/>[evidence.ts]"]
  node_javascript["JavaScript analysis"]
  node_browser["Browser observation"]
  node_scenario["Browser scenarios"]
end

subgraph group_providers["Analysis engines"]
  node_ghidra["Ghidra<br/>[GhidraClient.ts]"]
  node_hopper["Hopper<br/>[HopperClient.ts]"]
  node_ida["IDA"]
  node_cutter["Cutter"]
  node_debuggers["Debug sessions"]
  node_rizin["Rizin sessions"]
end

subgraph group_specialized["Specialized analysis"]
  node_android["Android analysis<br/>[JadxAnalysis.ts]"]
  node_sqlite["SQLite inspection"]
  node_evm["EVM analysis"]
  node_frida["Runtime instrumentation"]
end

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

node_agent -->|"requests analysis"| node_mcp
node_terminal -->|"runs workflows"| node_cli
node_mcp -.->|"registers tools"| node_mcp_tools
node_mcp_tools -->|"dispatches analysis"| node_reverse_workflow
node_cli -->|"invokes workflows"| node_reverse_workflow
node_reverse_workflow -->|"returns findings"| node_evidence
node_reverse_workflow -.->|"uses provider"| node_ghidra
node_reverse_workflow -.->|"uses provider"| node_hopper
node_reverse_workflow -.->|"uses provider"| node_ida
node_reverse_workflow -.->|"uses provider"| node_cutter
node_reverse_workflow -.->|"analyzes apps"| node_javascript
node_reverse_workflow -.->|"observes websites"| node_browser
node_reverse_workflow -.->|"captures scenarios"| node_scenario
node_reverse_workflow -.->|"supports debugging"| node_debuggers
node_reverse_workflow -.->|"supports debugging"| node_rizin
node_reverse_workflow -.->|"inspects Android"| node_android
node_reverse_workflow -.->|"inspects databases"| node_sqlite
node_reverse_workflow -.->|"analyzes EVM"| node_evm
node_reverse_workflow -.->|"instruments runtime"| node_frida

click node_mcp "https://github.com/mukeshcyarlagadda/rea/blob/main/src/main.ts"
click node_cli "https://github.com/mukeshcyarlagadda/rea/blob/main/src/cli.ts"
click node_mcp_tools "https://github.com/mukeshcyarlagadda/rea/blob/main/src/server/registerReverseEngineeringTools.ts"
click node_reverse_workflow "https://github.com/mukeshcyarlagadda/rea/blob/main/src/application/reverse/ReverseEngineeringService.ts"
click node_evidence "https://github.com/mukeshcyarlagadda/rea/blob/main/src/domain/evidence.ts"
click node_javascript "https://github.com/mukeshcyarlagadda/rea/blob/main/src/javascript/analysis/JavaScriptAnalysisWorker.ts"
click node_browser "https://github.com/mukeshcyarlagadda/rea/blob/main/src/application/BrowserObservationService.ts"
click node_scenario "https://github.com/mukeshcyarlagadda/rea/blob/main/src/application/BrowserScenarioCaptureService.ts"
click node_ghidra "https://github.com/mukeshcyarlagadda/rea/blob/main/src/ghidra/GhidraClient.ts"
click node_hopper "https://github.com/mukeshcyarlagadda/rea/blob/main/src/hopper/HopperClient.ts"
click node_ida "https://github.com/mukeshcyarlagadda/rea/blob/main/src/ida/IdaSessionClient.ts"
click node_cutter "https://github.com/mukeshcyarlagadda/rea/blob/main/src/cutter/CutterBridgeClient.ts"
click node_debuggers "https://github.com/mukeshcyarlagadda/rea/blob/main/src/gdb/GdbSessionManager.ts"
click node_rizin "https://github.com/mukeshcyarlagadda/rea/blob/main/src/rizin/RizinDebugSessionManager.ts"
click node_android "https://github.com/mukeshcyarlagadda/rea/blob/main/src/android/JadxAnalysis.ts"
click node_sqlite "https://github.com/mukeshcyarlagadda/rea/blob/main/src/sqlite/SqliteDatabaseInspection.ts"
click node_evm "https://github.com/mukeshcyarlagadda/rea/blob/main/src/evm/EvmoleInterfaceWorker.ts"
click node_frida "https://github.com/mukeshcyarlagadda/rea/blob/main/src/frida/FridaInstrumentationManager.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_mcp_tools,node_terminal toneBlue
class node_reverse_workflow,node_evidence,node_javascript,node_browser,node_scenario toneAmber
class node_ghidra,node_hopper,node_ida,node_cutter,node_debuggers,node_rizin toneMint
class node_android,node_sqlite,node_evm,node_frida toneRose
class node_agent toneIndigo
```

## Components

### Product entry

- [MCP server](https://github.com/mukeshcyarlagadda/rea/blob/main/src/main.ts): `src/main.ts`
- [CLI commands](https://github.com/mukeshcyarlagadda/rea/blob/main/src/cli.ts): `src/cli.ts`
- [MCP tool registration](https://github.com/mukeshcyarlagadda/rea/blob/main/src/server/registerReverseEngineeringTools.ts): `src/server/registerReverseEngineeringTools.ts`

### Analysis workflow

- [Reverse analysis](https://github.com/mukeshcyarlagadda/rea/blob/main/src/application/reverse/ReverseEngineeringService.ts): `src/application/reverse/ReverseEngineeringService.ts`
- [Evidence results](https://github.com/mukeshcyarlagadda/rea/blob/main/src/domain/evidence.ts): `src/domain/evidence.ts`
- [JavaScript analysis](https://github.com/mukeshcyarlagadda/rea/blob/main/src/javascript/analysis/JavaScriptAnalysisWorker.ts): `src/javascript/analysis/JavaScriptAnalysisWorker.ts`
- [Browser observation](https://github.com/mukeshcyarlagadda/rea/blob/main/src/application/BrowserObservationService.ts): `src/application/BrowserObservationService.ts`
- [Browser scenarios](https://github.com/mukeshcyarlagadda/rea/blob/main/src/application/BrowserScenarioCaptureService.ts): `src/application/BrowserScenarioCaptureService.ts`

### Analysis engines

- [Ghidra](https://github.com/mukeshcyarlagadda/rea/blob/main/src/ghidra/GhidraClient.ts): `src/ghidra/GhidraClient.ts`
- [Hopper](https://github.com/mukeshcyarlagadda/rea/blob/main/src/hopper/HopperClient.ts): `src/hopper/HopperClient.ts`
- [IDA](https://github.com/mukeshcyarlagadda/rea/blob/main/src/ida/IdaSessionClient.ts): `src/ida/IdaSessionClient.ts`
- [Cutter](https://github.com/mukeshcyarlagadda/rea/blob/main/src/cutter/CutterBridgeClient.ts): `src/cutter/CutterBridgeClient.ts`
- [Debug sessions](https://github.com/mukeshcyarlagadda/rea/blob/main/src/gdb/GdbSessionManager.ts): `src/gdb/GdbSessionManager.ts`
- [Rizin sessions](https://github.com/mukeshcyarlagadda/rea/blob/main/src/rizin/RizinDebugSessionManager.ts): `src/rizin/RizinDebugSessionManager.ts`

### Specialized analysis

- [Android analysis](https://github.com/mukeshcyarlagadda/rea/blob/main/src/android/JadxAnalysis.ts): `src/android/JadxAnalysis.ts`
- [SQLite inspection](https://github.com/mukeshcyarlagadda/rea/blob/main/src/sqlite/SqliteDatabaseInspection.ts): `src/sqlite/SqliteDatabaseInspection.ts`
- [EVM analysis](https://github.com/mukeshcyarlagadda/rea/blob/main/src/evm/EvmoleInterfaceWorker.ts): `src/evm/EvmoleInterfaceWorker.ts`
- [Runtime instrumentation](https://github.com/mukeshcyarlagadda/rea/blob/main/src/frida/FridaInstrumentationManager.ts): `src/frida/FridaInstrumentationManager.ts`

### Other components

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

## Connections

- Agent → MCP server: requests analysis (evidence: `README.md`)
- Terminal user → CLI commands: runs workflows (evidence: `README.md`)
- MCP server → MCP tool registration: registers tools
- MCP tool registration → Reverse analysis: dispatches analysis (evidence: `src/server/registerReverseEngineeringTools.ts`)
- CLI commands → Reverse analysis: invokes workflows
- Reverse analysis → Evidence results: returns findings (evidence: `src/application/reverse/ReverseEngineeringService.ts`)
- Reverse analysis → Ghidra: uses provider
- Reverse analysis → Hopper: uses provider
- Reverse analysis → IDA: uses provider
- Reverse analysis → Cutter: uses provider
- Reverse analysis → JavaScript analysis: analyzes apps
- Reverse analysis → Browser observation: observes websites
- Reverse analysis → Browser scenarios: captures scenarios
- Reverse analysis → Debug sessions: supports debugging
- Reverse analysis → Rizin sessions: supports debugging
- Reverse analysis → Android analysis: inspects Android
- Reverse analysis → SQLite inspection: inspects databases
- Reverse analysis → EVM analysis: analyzes EVM
- Reverse analysis → Runtime instrumentation: instruments runtime
