# baifdz/artex architecture

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

## Overview

ARTEX is a Flask reconnaissance and threat-exposure analysis application. A user submits a scan through the web interface or documented REST API; the app coordinates discovery and assessment modules, combines their results for security analysis, and exposes results and report exports. The README also describes scan profiles, owner/hunter perspectives, AI recommendations, and PDF/JSON reporting. The graph reflects documented capabilities where source excerpts are absent; unsampled implementation details and some wiring are therefore not asserted.

Main entry points: [`app.py`](https://github.com/baifdz/artex/blob/main/app.py) (Flask scan app), [`modules/real_ip_discovery.py`](https://github.com/baifdz/artex/blob/main/modules/real_ip_discovery.py) (Real IP discovery), [`utils/reporting.py`](https://github.com/baifdz/artex/blob/main/utils/reporting.py) (PDF and JSON reports), [`modules/dns_scan.py`](https://github.com/baifdz/artex/blob/main/modules/dns_scan.py) (DNS scanning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Scan orchestration"]
  node_app["Flask scan app<br/>[app.py]"]
  node_results_store[("Scan results and status<br/>[app.py]")]
end

subgraph group_recon["Reconnaissance"]
  node_subdomains["Subdomain discovery<br/>[subdomains.py]"]
  node_real_ip["Real IP discovery"]
  node_http_client["HTTP client<br/>[http_client.py]"]
  node_ip_utils["IP utilities<br/>[ip_utils.py]"]
  node_dns_scan["DNS scanning<br/>[dns_scan.py]"]
  node_dns_utils["DNS utilities<br/>[dns_utils.py]"]
end

subgraph group_assessment["Security assessment"]
  node_port_scan["Port scanning<br/>[port_scanner.py]"]
  node_ssl_scan["TLS assessment<br/>[ssl_scanner.py]"]
  node_tech_detect["Technology detection<br/>[tech_detector.py]"]
  node_tech_implementation["Fingerprint implementation<br/>[tech_imp.py]"]
  node_auth_enum["Auth and email enumeration<br/>[enumeration.py]"]
end

subgraph group_analysis_output["Analysis and reporting"]
  node_fast_analysis["Rule-based analysis<br/>[FastAnalyst.py]"]
  node_ai_analysis["AI recommendations<br/>[AI_analyst.py]"]
  node_reporting["PDF and JSON reports<br/>[reporting.py]"]
  node_helpers["Scan and display helpers<br/>[helpers.py]"]
end

node_user(("Security assessor"))
node_groq{{"Groq AI service"}}
node_target(("Authorized target"))

node_user -->|"starts scan"| node_app
node_target -.->|"supplies domain"| node_app
node_app -->|"tracks status"| node_results_store
node_app -->|"enumerates"| node_subdomains
node_app -->|"scans ports"| node_port_scan
node_app -.->|"scans DNS"| node_dns_scan
node_app -.->|"discovers IPs"| node_real_ip
node_app -->|"assesses TLS"| node_ssl_scan
node_app -->|"detects technologies"| node_tech_detect
node_app -.->|"enumerates auth"| node_auth_enum
node_app -->|"analyzes results"| node_fast_analysis
node_app -.->|"requests recommendations"| node_ai_analysis
node_app -.->|"exports reports"| node_reporting
node_real_ip -->|"makes requests"| node_http_client
node_real_ip -->|"checks addresses"| node_ip_utils
node_dns_scan -->|"queries records"| node_dns_utils
node_tech_detect -.->|"uses fingerprinting"| node_tech_implementation
node_ai_analysis -->|"requests completions"| node_groq
node_reporting -->|"uses helpers"| node_helpers
node_reporting -.->|"formats scan data"| node_results_store

click node_app "https://github.com/baifdz/artex/blob/main/app.py"
click node_subdomains "https://github.com/baifdz/artex/blob/main/modules/subdomains.py"
click node_real_ip "https://github.com/baifdz/artex/blob/main/modules/real_ip_discovery.py"
click node_http_client "https://github.com/baifdz/artex/blob/main/core/http_client.py"
click node_ip_utils "https://github.com/baifdz/artex/blob/main/core/ip_utils.py"
click node_dns_scan "https://github.com/baifdz/artex/blob/main/modules/dns_scan.py"
click node_dns_utils "https://github.com/baifdz/artex/blob/main/core/dns_utils.py"
click node_port_scan "https://github.com/baifdz/artex/blob/main/modules/port_scanner.py"
click node_ssl_scan "https://github.com/baifdz/artex/blob/main/modules/ssl_scanner.py"
click node_tech_detect "https://github.com/baifdz/artex/blob/main/modules/tech_detector.py"
click node_tech_implementation "https://github.com/baifdz/artex/blob/main/core/tech_imp.py"
click node_auth_enum "https://github.com/baifdz/artex/blob/main/modules/enumeration.py"
click node_fast_analysis "https://github.com/baifdz/artex/blob/main/modules/FastAnalyst.py"
click node_ai_analysis "https://github.com/baifdz/artex/blob/main/modules/AI_analyst.py"
click node_reporting "https://github.com/baifdz/artex/blob/main/utils/reporting.py"
click node_helpers "https://github.com/baifdz/artex/blob/main/utils/helpers.py"
click node_results_store "https://github.com/baifdz/artex/blob/main/app.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_app,node_results_store toneBlue
class node_subdomains,node_real_ip,node_http_client,node_ip_utils,node_dns_scan,node_dns_utils toneAmber
class node_port_scan,node_ssl_scan,node_tech_detect,node_tech_implementation,node_auth_enum toneMint
class node_fast_analysis,node_ai_analysis,node_reporting,node_helpers toneRose
class node_user,node_groq,node_target toneIndigo
```

## Components

### Scan orchestration

- [Flask scan app](https://github.com/baifdz/artex/blob/main/app.py): `app.py`
- [Scan results and status](https://github.com/baifdz/artex/blob/main/app.py): `app.py`

### Reconnaissance

- [Subdomain discovery](https://github.com/baifdz/artex/blob/main/modules/subdomains.py): `modules/subdomains.py`
- [Real IP discovery](https://github.com/baifdz/artex/blob/main/modules/real_ip_discovery.py): `modules/real_ip_discovery.py`
- [HTTP client](https://github.com/baifdz/artex/blob/main/core/http_client.py): `core/http_client.py`
- [IP utilities](https://github.com/baifdz/artex/blob/main/core/ip_utils.py): `core/ip_utils.py`
- [DNS scanning](https://github.com/baifdz/artex/blob/main/modules/dns_scan.py): `modules/dns_scan.py`
- [DNS utilities](https://github.com/baifdz/artex/blob/main/core/dns_utils.py): `core/dns_utils.py`

### Security assessment

- [Port scanning](https://github.com/baifdz/artex/blob/main/modules/port_scanner.py): `modules/port_scanner.py`
- [TLS assessment](https://github.com/baifdz/artex/blob/main/modules/ssl_scanner.py): `modules/ssl_scanner.py`
- [Technology detection](https://github.com/baifdz/artex/blob/main/modules/tech_detector.py): `modules/tech_detector.py`
- [Fingerprint implementation](https://github.com/baifdz/artex/blob/main/core/tech_imp.py): `core/tech_imp.py`
- [Auth and email enumeration](https://github.com/baifdz/artex/blob/main/modules/enumeration.py): `modules/enumeration.py`

### Analysis and reporting

- [Rule-based analysis](https://github.com/baifdz/artex/blob/main/modules/FastAnalyst.py): `modules/FastAnalyst.py`
- [AI recommendations](https://github.com/baifdz/artex/blob/main/modules/AI_analyst.py): `modules/AI_analyst.py`
- [PDF and JSON reports](https://github.com/baifdz/artex/blob/main/utils/reporting.py): `utils/reporting.py`
- [Scan and display helpers](https://github.com/baifdz/artex/blob/main/utils/helpers.py): `utils/helpers.py`

### Other components

- **Security assessor**
- **Groq AI service**
- **Authorized target**

## Connections

- Security assessor → Flask scan app: starts scan (evidence: `README.md`)
- Authorized target → Flask scan app: supplies domain
- Flask scan app → Scan results and status: tracks status (evidence: `app.py`)
- Flask scan app → Subdomain discovery: enumerates (evidence: `app.py`)
- Flask scan app → Port scanning: scans ports (evidence: `app.py`)
- Flask scan app → DNS scanning: scans DNS (evidence: `README.md`)
- Flask scan app → Real IP discovery: discovers IPs (evidence: `README.md`)
- Flask scan app → TLS assessment: assesses TLS (evidence: `app.py`)
- Flask scan app → Technology detection: detects technologies (evidence: `app.py`)
- Flask scan app → Auth and email enumeration: enumerates auth (evidence: `README.md`)
- Flask scan app → Rule-based analysis: analyzes results (evidence: `app.py`)
- Flask scan app → AI recommendations: requests recommendations (evidence: `README.md`)
- Flask scan app → PDF and JSON reports: exports reports (evidence: `README.md`)
- Real IP discovery → HTTP client: makes requests (evidence: `modules/real_ip_discovery.py`)
- Real IP discovery → IP utilities: checks addresses (evidence: `modules/real_ip_discovery.py`)
- DNS scanning → DNS utilities: queries records (evidence: `modules/dns_scan.py`)
- Technology detection → Fingerprint implementation: uses fingerprinting
- AI recommendations → Groq AI service: requests completions (evidence: `modules/AI_analyst.py`)
- PDF and JSON reports → Scan and display helpers: uses helpers (evidence: `utils/reporting.py`)
- PDF and JSON reports → Scan results and status: formats scan data (evidence: `app.py`)
