# sheth007/flutter-recon architecture

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

- Interactive diagram: https://gitdiagram.com/sheth007/flutter-recon
- Repository: https://github.com/sheth007/flutter-recon

## Overview

Flutter Recon is a Chrome extension for inspecting publicly accessible Flutter Web deployments. A user opens a site and the page-side recon engine scans resources, confirms Flutter signals, and analyzes source maps and asset manifests for package evidence. The content script bridges results to extension storage and the background worker; the popup reads that state to present detections, confidence, resources, and debug events. The README documents badge and notification behavior. Internal stage boundaries are inferred from functions in the sampled engine; some message and injection details are described only in the README.

Main entry points: [`inject.js`](https://github.com/sheth007/flutter-recon/blob/main/inject.js) (Recon Engine), [`content.js`](https://github.com/sheth007/flutter-recon/blob/main/content.js) (Page Bridge), [`popup/popup.js`](https://github.com/sheth007/flutter-recon/blob/main/popup/popup.js) (Popup Logic), [`background.js`](https://github.com/sheth007/flutter-recon/blob/main/background.js) (Background Worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_page_scan["Page Recon"]
  node_engine["Recon Engine<br/>[inject.js]"]
  node_url_filter["URL Filtering<br/>[inject.js]"]
  node_resource_scan["Resource Scanning<br/>[inject.js]"]
  node_flutter_detect["Flutter Detection<br/>[inject.js]"]
  node_package_fingerprint["Package Fingerprinting<br/>[inject.js]"]
  node_sourcemap["Source Map Analysis<br/>[inject.js]"]
  node_asset_scan["Asset Discovery<br/>[inject.js]"]
end

subgraph group_extension_flow["Extension Flow"]
  node_bridge["Page Bridge<br/>[content.js]"]
  node_stored_results[("Scan Results")]
  node_background["Background Worker<br/>[background.js]"]
end

subgraph group_popup_ui["Results UI"]
  node_popup_logic["Popup Logic<br/>[popup.js]"]
  node_popup_view["Popup View<br/>[popup.html]"]
  node_popup_style["Popup Styling<br/>[popup.css]"]
end

node_researcher(("Researcher"))
node_website(("Open Website"))

node_researcher -->|"opens"| node_website
node_website -->|"scans page"| node_engine
node_engine -->|"filters URLs"| node_url_filter
node_engine -->|"scans resources"| node_resource_scan
node_engine -->|"checks signals"| node_flutter_detect
node_engine -->|"scans manifest"| node_asset_scan
node_resource_scan -->|"processes maps"| node_sourcemap
node_sourcemap -->|"checks signatures"| node_package_fingerprint
node_sourcemap -->|"checks core"| node_flutter_detect
node_asset_scan -->|"adds detections"| node_package_fingerprint
node_engine -->|"publishes results"| node_bridge
node_bridge -->|"stores payload"| node_stored_results
node_bridge -->|"sends updates"| node_background
node_background -->|"reads state"| node_stored_results
node_researcher -->|"opens popup"| node_popup_logic
node_popup_logic -->|"reads results"| node_stored_results
node_popup_logic -->|"renders state"| node_popup_view
node_popup_style -.->|"styles view"| node_popup_view

click node_engine "https://github.com/sheth007/flutter-recon/blob/main/inject.js"
click node_url_filter "https://github.com/sheth007/flutter-recon/blob/main/inject.js"
click node_resource_scan "https://github.com/sheth007/flutter-recon/blob/main/inject.js"
click node_flutter_detect "https://github.com/sheth007/flutter-recon/blob/main/inject.js"
click node_package_fingerprint "https://github.com/sheth007/flutter-recon/blob/main/inject.js"
click node_sourcemap "https://github.com/sheth007/flutter-recon/blob/main/inject.js"
click node_asset_scan "https://github.com/sheth007/flutter-recon/blob/main/inject.js"
click node_bridge "https://github.com/sheth007/flutter-recon/blob/main/content.js"
click node_background "https://github.com/sheth007/flutter-recon/blob/main/background.js"
click node_popup_logic "https://github.com/sheth007/flutter-recon/blob/main/popup/popup.js"
click node_popup_view "https://github.com/sheth007/flutter-recon/blob/main/popup/popup.html"
click node_popup_style "https://github.com/sheth007/flutter-recon/blob/main/popup/popup.css"

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_engine,node_url_filter,node_resource_scan,node_flutter_detect,node_package_fingerprint,node_sourcemap,node_asset_scan toneBlue
class node_bridge,node_stored_results,node_background toneAmber
class node_popup_logic,node_popup_view,node_popup_style toneMint
class node_researcher,node_website toneIndigo
```

## Components

### Page Recon

- [Recon Engine](https://github.com/sheth007/flutter-recon/blob/main/inject.js): `inject.js`
- [URL Filtering](https://github.com/sheth007/flutter-recon/blob/main/inject.js): `inject.js`
- [Resource Scanning](https://github.com/sheth007/flutter-recon/blob/main/inject.js): `inject.js`
- [Flutter Detection](https://github.com/sheth007/flutter-recon/blob/main/inject.js): `inject.js`
- [Package Fingerprinting](https://github.com/sheth007/flutter-recon/blob/main/inject.js): `inject.js`
- [Source Map Analysis](https://github.com/sheth007/flutter-recon/blob/main/inject.js): `inject.js`
- [Asset Discovery](https://github.com/sheth007/flutter-recon/blob/main/inject.js): `inject.js`

### Extension Flow

- [Page Bridge](https://github.com/sheth007/flutter-recon/blob/main/content.js): `content.js`
- **Scan Results**
- [Background Worker](https://github.com/sheth007/flutter-recon/blob/main/background.js): `background.js`

### Results UI

- [Popup Logic](https://github.com/sheth007/flutter-recon/blob/main/popup/popup.js): `popup/popup.js`
- [Popup View](https://github.com/sheth007/flutter-recon/blob/main/popup/popup.html): `popup/popup.html`
- [Popup Styling](https://github.com/sheth007/flutter-recon/blob/main/popup/popup.css): `popup/popup.css`

### Other components

- **Researcher**
- **Open Website**

## Connections

- Researcher → Open Website: opens (evidence: `README.md`)
- Open Website → Recon Engine: scans page (evidence: `README.md`)
- Recon Engine → URL Filtering: filters URLs (evidence: `inject.js`)
- Recon Engine → Resource Scanning: scans resources (evidence: `inject.js`)
- Recon Engine → Flutter Detection: checks signals (evidence: `inject.js`)
- Recon Engine → Asset Discovery: scans manifest (evidence: `inject.js`)
- Resource Scanning → Source Map Analysis: processes maps (evidence: `inject.js`)
- Source Map Analysis → Package Fingerprinting: checks signatures (evidence: `inject.js`)
- Source Map Analysis → Flutter Detection: checks core (evidence: `inject.js`)
- Asset Discovery → Package Fingerprinting: adds detections (evidence: `inject.js`)
- Recon Engine → Page Bridge: publishes results (evidence: `README.md`)
- Page Bridge → Scan Results: stores payload (evidence: `content.js`)
- Page Bridge → Background Worker: sends updates (evidence: `content.js`)
- Background Worker → Scan Results: reads state (evidence: `background.js`)
- Researcher → Popup Logic: opens popup (evidence: `README.md`)
- Popup Logic → Scan Results: reads results (evidence: `popup/popup.js`)
- Popup Logic → Popup View: renders state (evidence: `README.md`)
- Popup Styling → Popup View: styles view
