# amay-xd/reconmind architecture

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

- Interactive diagram: https://gitdiagram.com/amay-xd/reconmind
- Repository: https://github.com/amay-xd/reconmind

## Overview

ReconMind is an OSINT investigation tool for IPs, emails, domains, and usernames. Its principal workflow accepts a target, classifies it, gathers applicable intelligence from multiple sources, and produces an AI-authored threat report. Users can access a web dashboard and a REST API; the repository also includes a CLI workflow with terminal, JSON, and PDF output. The graph separates collection, analysis, and reporting. README documentation describes the dashboard and API, but the sampled frontend source did not establish its runtime connection to the backend, so that link is left out.

Main entry points: [`main.py`](https://github.com/amay-xd/reconmind/blob/main/main.py) (CLI Scanner), [`Backend/app.py`](https://github.com/amay-xd/reconmind/blob/main/Backend/app.py) (Flask Scan API), [`collectors/shodan_collector.py`](https://github.com/amay-xd/reconmind/blob/main/collectors/shodan_collector.py) (Shodan Collector), [`collectors/hibp_collector.py`](https://github.com/amay-xd/reconmind/blob/main/collectors/hibp_collector.py) (HIBP Collector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interfaces"]
  node_dashboard["Web Dashboard<br/>[script.js]"]
  node_cli["CLI Scanner<br/>[main.py]"]
end

subgraph group_orchestration["Scan Orchestration"]
  node_api["Flask Scan API<br/>[app.py]"]
end

subgraph group_collection["Intelligence Collection"]
  node_shodan["Shodan Collector"]
  node_hibp["HIBP Collector<br/>[hibp_collector.py]"]
  node_whois["WHOIS Collector<br/>[whois_collector.py]"]
  node_github["GitHub Collector"]
  node_google["Google Dorks"]
  node_social["Social Scanner"]
end

subgraph group_analysis["Analysis and Reporting"]
  node_analysis["Groq AI Analysis<br/>[groq_analysis.py]"]
  node_pdf["PDF Export<br/>[pdf_export.py]"]
  node_terminal["Terminal Report<br/>[terminal_report.py]"]
end

subgraph group_configuration["Configuration"]
  node_config["API Key Config<br/>[config.py]"]
end

node_user(("Investigator"))
node_shodan_service{{"Shodan API"}}
node_hibp_service{{"HIBP API"}}
node_whois_service{{"WHOIS Service"}}
node_github_service{{"GitHub API"}}
node_google_service{{"Google Search"}}
node_social_sites{{"Social Platforms"}}
node_groq_service{{"Groq API"}}

node_user -->|"enters target"| node_dashboard
node_user -->|"submits scan"| node_api
node_user -->|"runs scan"| node_cli
node_api -->|"routes target"| node_shodan
node_api -->|"routes target"| node_hibp
node_api -->|"routes target"| node_whois
node_api -->|"routes target"| node_github
node_api -->|"routes target"| node_google
node_api -->|"routes target"| node_social
node_api -->|"analyzes scan"| node_analysis
node_api -->|"exports report"| node_pdf
node_cli -->|"collects data"| node_shodan
node_cli -->|"collects data"| node_hibp
node_cli -->|"collects data"| node_whois
node_cli -->|"collects data"| node_github
node_cli -->|"collects data"| node_google
node_cli -->|"collects data"| node_social
node_cli -->|"analyzes scan"| node_analysis
node_cli -->|"renders report"| node_terminal
node_cli -->|"exports report"| node_pdf
node_shodan -->|"queries host"| node_shodan_service
node_hibp -->|"checks breaches"| node_hibp_service
node_whois -->|"looks up domain"| node_whois_service
node_github -->|"queries profile"| node_github_service
node_google -->|"searches dorks"| node_google_service
node_social -->|"checks profiles"| node_social_sites
node_analysis -->|"analyzes findings"| node_groq_service
node_analysis -->|"reads API key"| node_config
node_shodan -->|"reads API key"| node_config
node_hibp -->|"reads API key"| node_config
node_github -->|"reads API token"| node_config

click node_dashboard "https://github.com/amay-xd/reconmind/blob/main/Frontend/script.js"
click node_cli "https://github.com/amay-xd/reconmind/blob/main/main.py"
click node_api "https://github.com/amay-xd/reconmind/blob/main/Backend/app.py"
click node_shodan "https://github.com/amay-xd/reconmind/blob/main/collectors/shodan_collector.py"
click node_hibp "https://github.com/amay-xd/reconmind/blob/main/collectors/hibp_collector.py"
click node_whois "https://github.com/amay-xd/reconmind/blob/main/collectors/whois_collector.py"
click node_github "https://github.com/amay-xd/reconmind/blob/main/collectors/github_collector.py"
click node_google "https://github.com/amay-xd/reconmind/blob/main/collectors/google_collector.py"
click node_social "https://github.com/amay-xd/reconmind/blob/main/collectors/social_scan_collectors.py"
click node_analysis "https://github.com/amay-xd/reconmind/blob/main/ai_engine/groq_analysis.py"
click node_pdf "https://github.com/amay-xd/reconmind/blob/main/output/pdf_export.py"
click node_terminal "https://github.com/amay-xd/reconmind/blob/main/output/terminal_report.py"
click node_config "https://github.com/amay-xd/reconmind/blob/main/config.py"

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_dashboard,node_cli toneBlue
class node_api toneAmber
class node_shodan,node_hibp,node_whois,node_github,node_google,node_social,node_shodan_service,node_hibp_service,node_github_service,node_groq_service toneMint
class node_analysis,node_pdf,node_terminal toneRose
class node_config,node_user,node_whois_service,node_google_service,node_social_sites toneIndigo
```

## Components

### User Interfaces

- [Web Dashboard](https://github.com/amay-xd/reconmind/blob/main/Frontend/script.js): `Frontend/script.js`
- [CLI Scanner](https://github.com/amay-xd/reconmind/blob/main/main.py): `main.py`

### Scan Orchestration

- [Flask Scan API](https://github.com/amay-xd/reconmind/blob/main/Backend/app.py): `Backend/app.py`

### Intelligence Collection

- [Shodan Collector](https://github.com/amay-xd/reconmind/blob/main/collectors/shodan_collector.py): `collectors/shodan_collector.py`
- [HIBP Collector](https://github.com/amay-xd/reconmind/blob/main/collectors/hibp_collector.py): `collectors/hibp_collector.py`
- [WHOIS Collector](https://github.com/amay-xd/reconmind/blob/main/collectors/whois_collector.py): `collectors/whois_collector.py`
- [GitHub Collector](https://github.com/amay-xd/reconmind/blob/main/collectors/github_collector.py): `collectors/github_collector.py`
- [Google Dorks](https://github.com/amay-xd/reconmind/blob/main/collectors/google_collector.py): `collectors/google_collector.py`
- [Social Scanner](https://github.com/amay-xd/reconmind/blob/main/collectors/social_scan_collectors.py): `collectors/social_scan_collectors.py`

### Analysis and Reporting

- [Groq AI Analysis](https://github.com/amay-xd/reconmind/blob/main/ai_engine/groq_analysis.py): `ai_engine/groq_analysis.py`
- [PDF Export](https://github.com/amay-xd/reconmind/blob/main/output/pdf_export.py): `output/pdf_export.py`
- [Terminal Report](https://github.com/amay-xd/reconmind/blob/main/output/terminal_report.py): `output/terminal_report.py`

### Configuration

- [API Key Config](https://github.com/amay-xd/reconmind/blob/main/config.py): `config.py`

### Other components

- **Investigator**
- **Shodan API**
- **HIBP API**
- **WHOIS Service**
- **GitHub API**
- **Google Search**
- **Social Platforms**
- **Groq API**

## Connections

- Investigator → Web Dashboard: enters target (evidence: `README.md`)
- Investigator → Flask Scan API: submits scan (evidence: `README.md`)
- Investigator → CLI Scanner: runs scan (evidence: `main.py`)
- Flask Scan API → Shodan Collector: routes target (evidence: `Backend/app.py`)
- Flask Scan API → HIBP Collector: routes target (evidence: `Backend/app.py`)
- Flask Scan API → WHOIS Collector: routes target (evidence: `Backend/app.py`)
- Flask Scan API → GitHub Collector: routes target (evidence: `Backend/app.py`)
- Flask Scan API → Google Dorks: routes target (evidence: `Backend/app.py`)
- Flask Scan API → Social Scanner: routes target (evidence: `Backend/app.py`)
- Flask Scan API → Groq AI Analysis: analyzes scan (evidence: `Backend/app.py`)
- Flask Scan API → PDF Export: exports report (evidence: `Backend/app.py`)
- CLI Scanner → Shodan Collector: collects data (evidence: `main.py`)
- CLI Scanner → HIBP Collector: collects data (evidence: `main.py`)
- CLI Scanner → WHOIS Collector: collects data (evidence: `main.py`)
- CLI Scanner → GitHub Collector: collects data (evidence: `main.py`)
- CLI Scanner → Google Dorks: collects data (evidence: `main.py`)
- CLI Scanner → Social Scanner: collects data (evidence: `main.py`)
- CLI Scanner → Groq AI Analysis: analyzes scan (evidence: `main.py`)
- CLI Scanner → Terminal Report: renders report (evidence: `main.py`)
- CLI Scanner → PDF Export: exports report (evidence: `main.py`)
- Shodan Collector → Shodan API: queries host (evidence: `collectors/shodan_collector.py`)
- HIBP Collector → HIBP API: checks breaches (evidence: `collectors/hibp_collector.py`)
- WHOIS Collector → WHOIS Service: looks up domain (evidence: `collectors/whois_collector.py`)
- GitHub Collector → GitHub API: queries profile (evidence: `collectors/github_collector.py`)
- Google Dorks → Google Search: searches dorks (evidence: `collectors/google_collector.py`)
- Social Scanner → Social Platforms: checks profiles (evidence: `collectors/social_scan_collectors.py`)
- Groq AI Analysis → Groq API: analyzes findings (evidence: `README.md`)
- Groq AI Analysis → API Key Config: reads API key (evidence: `ai_engine/groq_analysis.py`)
- Shodan Collector → API Key Config: reads API key (evidence: `collectors/shodan_collector.py`)
- HIBP Collector → API Key Config: reads API key (evidence: `collectors/hibp_collector.py`)
- GitHub Collector → API Key Config: reads API token (evidence: `collectors/github_collector.py`)
