# soxoj/maigret architecture

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

## Overview

Maigret is a username-focused OSINT application: a user submits an identifier, Maigret checks configured sites, records account findings and extracted identity links, and presents results or reports. Its documented capabilities also include recursive searches, site/tag selection, database updates, proxy and Tor support, a web interface, and optional AI summaries. The graph distinguishes orchestration, checking, site data, results, and presentation. Some relationships are documented in the README; unsampled implementation details are not inferred as confirmed calls.

Main entry points: [`maigret/maigret.py`](https://github.com/soxoj/maigret/blob/main/maigret/maigret.py) (Search orchestration), [`maigret/checking.py`](https://github.com/soxoj/maigret/blob/main/maigret/checking.py) (Site checker), [`maigret/sites.py`](https://github.com/soxoj/maigret/blob/main/maigret/sites.py) (Site definitions), [`maigret/ai.py`](https://github.com/soxoj/maigret/blob/main/maigret/ai.py) (AI analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Search workflow"]
  node_cli["Search orchestration<br/>[maigret.py]"]
  node_checker["Site checker<br/>[checking.py]"]
  node_activation["Site activation<br/>[activation.py]"]
  node_error_detection["Error detection<br/>[error_detection.py]"]
  node_executors["Executors<br/>[executors.py]"]
end

subgraph group_site_data["Site data"]
  node_site_database["Site definitions<br/>[sites.py]"]
  node_settings["Search settings<br/>[settings.py]"]
  node_database_update["Database updater<br/>[db_updater.py]"]
  node_site_submission["Site submission<br/>[submit.py]"]
  node_database_metadata["Database metadata"]
  node_site_check_tooling["Site-check tooling<br/>[site_check.py]"]
end

subgraph group_results["Findings and reports"]
  node_results["Result records<br/>[result.py]"]
  node_reports["Report generation<br/>[report.py]"]
  node_ai_analysis["AI analysis<br/>[ai.py]"]
end

subgraph group_interfaces["User interfaces"]
  node_cli_notifications["CLI notifications<br/>[notify.py]"]
  node_web_interface["Web interface<br/>[app.py]"]
end

subgraph group_capabilities["Search capabilities"]
  node_identifier_permutations["Recursive search<br/>[permutator.py]"]
end

node_user(("Investigator"))
node_external_sites{{"Public websites"}}
node_external_ai{{"OpenAI-compatible API"}}

node_user -->|"submits identifier"| node_cli
node_cli -.->|"checks sites"| node_checker
node_checker -->|"requests profiles"| node_external_sites
node_checker -.->|"activates sites"| node_activation
node_checker -.->|"detects blocks"| node_error_detection
node_checker -.->|"dispatches checks"| node_executors
node_cli -.->|"selects sites"| node_site_database
node_cli -.->|"loads options"| node_settings
node_cli -->|"updates database"| node_database_update
node_cli -->|"recurses on findings"| node_identifier_permutations
node_checker -.->|"records findings"| node_results
node_cli -->|"generates reports"| node_reports
node_cli -->|"requests summary"| node_ai_analysis
node_ai_analysis -->|"sends findings"| node_external_ai
node_cli -.->|"reports progress"| node_cli_notifications
node_user -->|"submits search"| node_web_interface
node_web_interface -->|"offers downloads"| node_reports
node_site_submission -.->|"edits definitions"| node_site_database
node_database_metadata -.->|"supports updates"| node_database_update
node_site_check_tooling -.->|"checks definitions"| node_site_database

click node_cli "https://github.com/soxoj/maigret/blob/main/maigret/maigret.py"
click node_checker "https://github.com/soxoj/maigret/blob/main/maigret/checking.py"
click node_activation "https://github.com/soxoj/maigret/blob/main/maigret/activation.py"
click node_error_detection "https://github.com/soxoj/maigret/blob/main/maigret/error_detection.py"
click node_executors "https://github.com/soxoj/maigret/blob/main/maigret/executors.py"
click node_site_database "https://github.com/soxoj/maigret/blob/main/maigret/sites.py"
click node_settings "https://github.com/soxoj/maigret/blob/main/maigret/settings.py"
click node_database_update "https://github.com/soxoj/maigret/blob/main/maigret/db_updater.py"
click node_site_submission "https://github.com/soxoj/maigret/blob/main/maigret/submit.py"
click node_results "https://github.com/soxoj/maigret/blob/main/maigret/result.py"
click node_reports "https://github.com/soxoj/maigret/blob/main/maigret/report.py"
click node_ai_analysis "https://github.com/soxoj/maigret/blob/main/maigret/ai.py"
click node_cli_notifications "https://github.com/soxoj/maigret/blob/main/maigret/notify.py"
click node_web_interface "https://github.com/soxoj/maigret/blob/main/maigret/web/app.py"
click node_identifier_permutations "https://github.com/soxoj/maigret/blob/main/maigret/permutator.py"
click node_database_metadata "https://github.com/soxoj/maigret/blob/main/utils/generate_db_meta.py"
click node_site_check_tooling "https://github.com/soxoj/maigret/blob/main/utils/site_check.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_cli,node_checker,node_activation,node_error_detection,node_executors toneBlue
class node_site_database,node_settings,node_database_update,node_site_submission,node_database_metadata,node_site_check_tooling toneAmber
class node_results,node_reports,node_ai_analysis,node_external_ai toneMint
class node_cli_notifications,node_web_interface toneRose
class node_identifier_permutations,node_user,node_external_sites toneIndigo
```

## Components

### Search workflow

- [Search orchestration](https://github.com/soxoj/maigret/blob/main/maigret/maigret.py): `maigret/maigret.py`
- [Site checker](https://github.com/soxoj/maigret/blob/main/maigret/checking.py): `maigret/checking.py`
- [Site activation](https://github.com/soxoj/maigret/blob/main/maigret/activation.py): `maigret/activation.py`
- [Error detection](https://github.com/soxoj/maigret/blob/main/maigret/error_detection.py): `maigret/error_detection.py`
- [Executors](https://github.com/soxoj/maigret/blob/main/maigret/executors.py): `maigret/executors.py`

### Site data

- [Site definitions](https://github.com/soxoj/maigret/blob/main/maigret/sites.py): `maigret/sites.py`
- [Search settings](https://github.com/soxoj/maigret/blob/main/maigret/settings.py): `maigret/settings.py`
- [Database updater](https://github.com/soxoj/maigret/blob/main/maigret/db_updater.py): `maigret/db_updater.py`
- [Site submission](https://github.com/soxoj/maigret/blob/main/maigret/submit.py): `maigret/submit.py`
- [Database metadata](https://github.com/soxoj/maigret/blob/main/utils/generate_db_meta.py): `utils/generate_db_meta.py`
- [Site-check tooling](https://github.com/soxoj/maigret/blob/main/utils/site_check.py): `utils/site_check.py`

### Findings and reports

- [Result records](https://github.com/soxoj/maigret/blob/main/maigret/result.py): `maigret/result.py`
- [Report generation](https://github.com/soxoj/maigret/blob/main/maigret/report.py): `maigret/report.py`
- [AI analysis](https://github.com/soxoj/maigret/blob/main/maigret/ai.py): `maigret/ai.py`

### User interfaces

- [CLI notifications](https://github.com/soxoj/maigret/blob/main/maigret/notify.py): `maigret/notify.py`
- [Web interface](https://github.com/soxoj/maigret/blob/main/maigret/web/app.py): `maigret/web/app.py`

### Search capabilities

- [Recursive search](https://github.com/soxoj/maigret/blob/main/maigret/permutator.py): `maigret/permutator.py`

### Other components

- **Investigator**
- **Public websites**
- **OpenAI-compatible API**

## Connections

- Investigator → Search orchestration: submits identifier (evidence: `README.md`)
- Search orchestration → Site checker: checks sites (evidence: `maigret/maigret.py`)
- Site checker → Public websites: requests profiles (evidence: `README.md`)
- Site checker → Site activation: activates sites (evidence: `maigret/checking.py`)
- Site checker → Error detection: detects blocks (evidence: `maigret/checking.py`)
- Site checker → Executors: dispatches checks (evidence: `maigret/checking.py`)
- Search orchestration → Site definitions: selects sites (evidence: `maigret/maigret.py`)
- Search orchestration → Search settings: loads options (evidence: `maigret/maigret.py`)
- Search orchestration → Database updater: updates database (evidence: `README.md`)
- Search orchestration → Recursive search: recurses on findings (evidence: `README.md`)
- Site checker → Result records: records findings (evidence: `maigret/checking.py`)
- Search orchestration → Report generation: generates reports (evidence: `README.md`)
- Search orchestration → AI analysis: requests summary (evidence: `README.md`)
- AI analysis → OpenAI-compatible API: sends findings (evidence: `README.md`)
- Search orchestration → CLI notifications: reports progress (evidence: `maigret/maigret.py`)
- Investigator → Web interface: submits search (evidence: `README.md`)
- Web interface → Report generation: offers downloads (evidence: `README.md`)
- Site submission → Site definitions: edits definitions (evidence: `maigret/submit.py`)
- Database metadata → Database updater: supports updates
- Site-check tooling → Site definitions: checks definitions (evidence: `utils/site_check.py`)
