# techieyuvraj/reconx architecture

> Architecture diagram of the GitHub repository techieyuvraj/reconx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/techieyuvraj/reconx
- Repository: https://github.com/techieyuvraj/reconx

## Overview

##### Project Type and Purpose
- ReconX is a full-stack ethical hacking reconnaissance tool.
- It exposes three interfaces:
– Command Line Interface (reconx.py)
– Graphical User Interface (gui.py)
– Web API (FastAPI in app/)

##### File Structure
- Top-level entry points:
– reconx.py (CLI)
– gui.py (GUI)
– app/main.py (Web API)
- Core logic: core/parallel_crawler.py, app/core/reconx_runner.py
- Integrations: integrations/dirsearch_runner.py, integrations/sublist3r_runner.py
- Bundled tools: dirsearch/ and sublist3r/ directories
- Utilities: utils/*.py (export, forms, screenshots, reporting)
- Frontend assets: frontend/style.css, script.js, templates/*.html
- Reports and Storage: (implicit) reports/ and screenshots/ folders

##### README for Insights
- Tech stack: Python, FastAPI, Uvicorn, external tools (Dirsearch, Sublist3r)
- Features: parallel crawling, robots.txt, keyword/form detection, PDF reports
- Usage modes: CLI, GUI, API

##### Main Components & Data Flows
a. Interfaces (Clients)
– CLI (reconx.py)
– GUI (gui.py)
– Web clients (browser → FastAPI)
b. API Layer
– Uvicorn / ASGI server
– FastAPI app/main.py with routers in app/api/routes.py
– Pydantic schemas in app/api/schemas.py
c. Business Logic
– reconx_runner.py (orchestrates scan)
– parallel_crawler.py (core crawler implementation)
d. Integration Adapters
– Dirsearch runner calls dirsearch/dirsearch.py and its library modules
– Sublist3r runner calls sublist3r modules
e. Utilities & Reporting
– File management (app/utils/file_manager.py)
– Scanning helpers (utils/robots.py, utils/forms.py, etc.)
– Report generation (utils/report_generator.py → produces PDF/HTML)
– Screenshot capture (utils/screenshotter.py)
f. Storage & Artifacts
– Local file system: reports/, screenshots/, export files
– Optional: Database files (if any, e.g., SQLite via utils/export)

##### Architectural Patterns & Principles
- Layered architecture:
– Presentation (CLI, GUI, Web)
– API/Controller (FastAPI routes)
– Service layer (reconx_runner)
– Domain logic (parallel_crawler, integration runners)
– Utility modules (I/O, reporting, screenshotting)
- Modular integration: wrappers around external tools (Dirsearch, Sublist3r)
- Separation of concerns: each interface calls the same core runner

##### Final Checklist
– All major components (interfaces, API, services, core, integrations, utilities, storage)
– Labels with module names and protocols
– Optional annotations for concurrency (parallel crawling) and external calls

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Interfaces Layer
    CLI["CLI Interface\nreconx.py"]:::interface
    GUI["GUI Interface\ngui.py"]:::interface
    Browser(["Browser"]):::interface

    %% Web UI Assets
    subgraph "Web UI Assets"
        FrontendJS["script.js"]:::frontend
        FrontendCSS["style.css"]:::frontend
        Templates["HTML Templates\ntemplates/*.html"]:::frontend
    end

    %% API Layer
    API["FastAPI + Uvicorn\napp/main.py"]:::api
    Routes["API Routes\napp/api/routes.py"]:::api
    Schemas["Pydantic Schemas\napp/api/schemas.py"]:::api

    %% Service Layer
    Runner["ReconX Runner\napp/core/reconx_runner.py"]:::service

    %% Core Engine
    Crawler["Parallel Crawler\ncore/parallel_crawler.py"]:::core

    %% Integration Adapters & Tools
    DirRunner["Dirsearch Runner\nintegrations/dirsearch_runner.py"]:::integration
    SubRunner["Sublist3r Runner\nintegrations/sublist3r_runner.py"]:::integration
    DirTool[/"Dirsearch Tool\ndirsearch/dirsearch.py"/]:::integration
    SubTool[/"Sublist3r Tool\nsublist3r/"/]:::integration

    %% Utilities
    FileMgr["File Manager\napp/utils/file_manager.py"]:::util
    Robots["Robots.txt Helper\nutils/robots.py"]:::util
    Forms["Form Detection\nutils/forms.py"]:::util
    Keywords["Keyword Scanner\nutils/keywords.py"]:::util
    Links["Link Extraction\nutils/links.py"]:::util
    ReportGen["Report Generator\nutils/report_generator.py"]:::util
    Screenshot["Screenshot Capture\nutils/screenshotter.py"]:::util
    Export["Export Utility\nutils/export.py"]:::util

    %% Storage
    Reports[(Reports Folder)]:::storage
    Screenshots[(Screenshots Folder)]:::storage
    Exports[(Exports Folder)]:::storage

    %% Connections
    CLI -->|internal call| Runner
    GUI -->|internal call| Runner
    Browser -->|HTTP request| API
    FrontendJS -->|assets| Browser
    FrontendCSS -->|assets| Browser
    Templates -->|served| Browser

    API -->|routes| Routes
    Routes -->|validates via Pydantic| Schemas
    Routes -->|invokes| Runner

    Runner -->|orchestrates| Crawler
    Runner -->|calls| DirRunner
    Runner -->|calls| SubRunner
    Runner -->|uses| FileMgr
    Runner -->|exports via| Export

    Crawler -->|parallel scan| Robots
    Crawler -->|form detect| Forms
    Crawler -->|keyword scan| Keywords
    Crawler -->|link extract| Links
    Crawler -->|captures screenshot| Screenshot
    Crawler -->|generates report| ReportGen

    DirRunner -->|executes| DirTool
    SubRunner -->|executes| SubTool

    ReportGen -->|writes| Reports
    Screenshot -->|saves| Screenshots
    Export -->|writes| Exports

    %% Click Events
    click CLI "https://github.com/techieyuvraj/reconx/blob/main/reconx.py"
    click GUI "https://github.com/techieyuvraj/reconx/blob/main/gui.py"
    click API "https://github.com/techieyuvraj/reconx/blob/main/app/main.py"
    click Routes "https://github.com/techieyuvraj/reconx/blob/main/app/api/routes.py"
    click Schemas "https://github.com/techieyuvraj/reconx/blob/main/app/api/schemas.py"
    click Runner "https://github.com/techieyuvraj/reconx/blob/main/app/core/reconx_runner.py"
    click Crawler "https://github.com/techieyuvraj/reconx/blob/main/core/parallel_crawler.py"
    click DirRunner "https://github.com/techieyuvraj/reconx/blob/main/integrations/dirsearch_runner.py"
    click SubRunner "https://github.com/techieyuvraj/reconx/blob/main/integrations/sublist3r_runner.py"
    click DirTool "https://github.com/techieyuvraj/reconx/blob/main/dirsearch/dirsearch.py"
    click SubTool "https://github.com/techieyuvraj/reconx/tree/main/sublist3r/"
    click FileMgr "https://github.com/techieyuvraj/reconx/blob/main/app/utils/file_manager.py"
    click Robots "https://github.com/techieyuvraj/reconx/blob/main/utils/robots.py"
    click Forms "https://github.com/techieyuvraj/reconx/blob/main/utils/forms.py"
    click Keywords "https://github.com/techieyuvraj/reconx/blob/main/utils/keywords.py"
    click Links "https://github.com/techieyuvraj/reconx/blob/main/utils/links.py"
    click ReportGen "https://github.com/techieyuvraj/reconx/blob/main/utils/report_generator.py"
    click Screenshot "https://github.com/techieyuvraj/reconx/blob/main/utils/screenshotter.py"
    click Export "https://github.com/techieyuvraj/reconx/blob/main/utils/export.py"
    click FrontendJS "https://github.com/techieyuvraj/reconx/blob/main/frontend/script.js"
    click FrontendCSS "https://github.com/techieyuvraj/reconx/blob/main/frontend/style.css"
    click Templates "https://github.com/techieyuvraj/reconx/tree/main/templates/"

    %% Styles
    classDef interface fill:#D6EAF8,stroke:#1B4F72,color:#1B2631;
    classDef api fill:#AED6F1,stroke:#1A5276,color:#1B2631;
    classDef service fill:#A3E4D7,stroke:#117A65,color:#1B2631;
    classDef core fill:#82E0AA,stroke:#186A3B,color:#1B2631;
    classDef integration fill:#F9E79F,stroke:#B9770E,color:#1B2631;
    classDef util fill:#F5CBA7,stroke:#B03A2E,color:#1B2631;
    classDef storage fill:#D7BDE2,stroke:#6C3483,color:#1B2631;
    classDef frontend fill:#E8DAEF,stroke:#6C3483,color:#1B2631;
```
