# harsh8-beep/reverse_enginnering_anything architecture

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

- Interactive diagram: https://gitdiagram.com/harsh8-beep/reverse_enginnering_anything
- Repository: https://github.com/harsh8-beep/reverse_enginnering_anything

## Overview

REA is a local reverse-engineering toolkit exposed through MCP and a CLI. Its principal workflow is an agent or terminal user requesting an investigation; REA routes the request to analysis capabilities and returns findings with evidence and limitations. The README documents analysis across native binaries, JavaScript/Electron apps, .NET assemblies, and websites. The graph combines those documented capabilities with source-index-supported modules; unsampled provider and subsystem wiring is intentionally not inferred.

Main entry points: [`src/application/reverse/ReverseEngineeringService.ts`](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/application/reverse/ReverseEngineeringService.ts) (Reverse analysis), [`src/domain/evidence.ts`](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/domain/evidence.ts) (Evidence records), [`src/main.ts`](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/main.ts) (MCP server), [`src/cli/reverseEngineeringCommands.ts`](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/cli/reverseEngineeringCommands.ts) (CLI commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entrypoints"]
  node_mcp["MCP server<br/>[main.ts]"]
  node_cli["CLI commands"]
  node_tool_routes["Tool registration"]
end

subgraph group_workflow["Analysis workflow"]
  node_reverse_service["Reverse analysis"]
  node_analysis_context["Analysis context"]
end

subgraph group_engines["Analysis engines"]
  node_javascript["JavaScript analysis"]
  node_browser["Browser observation"]
  node_browser_scenarios["Browser scenarios"]
  node_android["Android analysis<br/>[JadxAnalysis.ts]"]
  node_ghidra["Ghidra provider<br/>[GhidraClient.ts]"]
  node_hopper["Hopper provider<br/>[HopperClient.ts]"]
  node_ida["IDA provider"]
end

subgraph group_evidence["Findings and evidence"]
  node_evidence["Evidence records<br/>[evidence.ts]"]
  node_error_projection["Error projection"]
  node_result["Typed results<br/>[result.ts]"]
end

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

node_agent -->|"calls tools"| node_mcp
node_terminal -->|"runs commands"| node_cli
node_cli -->|"uses workflows"| node_reverse_service
node_mcp -.->|"serves tools"| node_tool_routes
node_tool_routes -->|"invokes analysis"| node_reverse_service
node_reverse_service -->|"returns results"| node_result
node_reverse_service -.->|"produces findings"| node_evidence
node_reverse_service -.->|"dispatches provider"| node_ghidra
node_reverse_service -.->|"dispatches provider"| node_hopper
node_reverse_service -.->|"dispatches provider"| node_ida
node_analysis_context -.->|"queries findings"| node_evidence
node_javascript -.->|"returns analysis"| node_evidence
node_browser -.->|"returns observations"| node_evidence
node_browser_scenarios -.->|"captures behavior"| node_browser
node_android -.->|"returns analysis"| node_evidence
node_reverse_service -.->|"projects failures"| node_error_projection
node_error_projection -.->|"formats outcomes"| node_result

click node_mcp "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/main.ts"
click node_cli "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/cli/reverseEngineeringCommands.ts"
click node_tool_routes "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/server/registerReverseEngineeringTools.ts"
click node_reverse_service "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/application/reverse/ReverseEngineeringService.ts"
click node_analysis_context "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/application/AnalysisContextQueries.ts"
click node_javascript "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/javascript/analysis/JavaScriptAnalysisWorker.ts"
click node_browser "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/application/BrowserObservationService.ts"
click node_browser_scenarios "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/application/BrowserScenarioCaptureService.ts"
click node_android "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/android/JadxAnalysis.ts"
click node_ghidra "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/ghidra/GhidraClient.ts"
click node_hopper "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/hopper/HopperClient.ts"
click node_ida "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/ida/IdaSessionClient.ts"
click node_evidence "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/domain/evidence.ts"
click node_error_projection "https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/domain/analysisErrorProjection.ts"
click node_result "https://github.com/harsh8-beep/reverse_enginnering_anything/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,node_tool_routes,node_terminal toneBlue
class node_reverse_service,node_analysis_context toneAmber
class node_javascript,node_browser,node_browser_scenarios,node_android,node_ghidra,node_hopper,node_ida toneMint
class node_evidence,node_error_projection,node_result toneRose
class node_agent toneIndigo
```

## Components

### User entrypoints

- [MCP server](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/main.ts): `src/main.ts`
- [CLI commands](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/cli/reverseEngineeringCommands.ts): `src/cli/reverseEngineeringCommands.ts`
- [Tool registration](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/server/registerReverseEngineeringTools.ts): `src/server/registerReverseEngineeringTools.ts`

### Analysis workflow

- [Reverse analysis](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/application/reverse/ReverseEngineeringService.ts): `src/application/reverse/ReverseEngineeringService.ts`
- [Analysis context](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/application/AnalysisContextQueries.ts): `src/application/AnalysisContextQueries.ts`

### Analysis engines

- [JavaScript analysis](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/javascript/analysis/JavaScriptAnalysisWorker.ts): `src/javascript/analysis/JavaScriptAnalysisWorker.ts`
- [Browser observation](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/application/BrowserObservationService.ts): `src/application/BrowserObservationService.ts`
- [Browser scenarios](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/application/BrowserScenarioCaptureService.ts): `src/application/BrowserScenarioCaptureService.ts`
- [Android analysis](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/android/JadxAnalysis.ts): `src/android/JadxAnalysis.ts`
- [Ghidra provider](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/ghidra/GhidraClient.ts): `src/ghidra/GhidraClient.ts`
- [Hopper provider](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/hopper/HopperClient.ts): `src/hopper/HopperClient.ts`
- [IDA provider](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/ida/IdaSessionClient.ts): `src/ida/IdaSessionClient.ts`

### Findings and evidence

- [Evidence records](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/domain/evidence.ts): `src/domain/evidence.ts`
- [Error projection](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/domain/analysisErrorProjection.ts): `src/domain/analysisErrorProjection.ts`
- [Typed results](https://github.com/harsh8-beep/reverse_enginnering_anything/blob/main/src/domain/result.ts): `src/domain/result.ts`

### Other components

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

## Connections

- Agent → MCP server: calls tools (evidence: `README.md`)
- Terminal user → CLI commands: runs commands (evidence: `README.md`)
- CLI commands → Reverse analysis: uses workflows (evidence: `src/cli/reverseEngineeringCommands.ts`)
- MCP server → Tool registration: serves tools
- Tool registration → Reverse analysis: invokes analysis (evidence: `src/server/registerReverseEngineeringTools.ts`)
- Reverse analysis → Typed results: returns results (evidence: `src/application/reverse/ReverseEngineeringService.ts`)
- Reverse analysis → Evidence records: produces findings (evidence: `src/application/reverse/ReverseEngineeringService.ts`)
- Reverse analysis → Ghidra provider: dispatches provider
- Reverse analysis → Hopper provider: dispatches provider
- Reverse analysis → IDA provider: dispatches provider
- Analysis context → Evidence records: queries findings
- JavaScript analysis → Evidence records: returns analysis
- Browser observation → Evidence records: returns observations
- Browser scenarios → Browser observation: captures behavior
- Android analysis → Evidence records: returns analysis
- Reverse analysis → Error projection: projects failures
- Error projection → Typed results: formats outcomes
