# alpkeskin/mosint architecture

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

- Interactive diagram: https://gitdiagram.com/alpkeskin/mosint
- Repository: https://github.com/alpkeskin/mosint

## Overview

##### Project type and purpose
- Project Type: A Go-based command-line OSINT (Open Source Intelligence) tool
- Purpose: Given an email address, it orchestrates calls to multiple external services (breach databases, social APIs, DNS lookup, Google Search, etc.), verifies and consolidates the results, and outputs them (JSON or console) for security researchers.

##### File structure
Top-level artifacts:
- Dockerfile, example-config.yaml, static/ (logo/images), README, LICENSE
Versioned Go module at v3/:
– cmd/mosint/main.go → CLI entrypoint
– internal/ → core orchestration modules
· config/ (config loader, API-key management)
· runner/ (coordinates tasks)
· spinner/ (console progress indicator)
· output/ (JSON or console formatting)
– pkg/ → pluggable task implementations
· dns (DNS/IP lookups)
· engine (core execution engine)
· scrape/googlesearch
· services/* (Breachdirectory, HaveIBeenPwned, psbdmp, etc.)
· social/* (Twitter, Instagram, Spotify)
· verification (email verification)

##### Key README insights
- Describes supported features (breach lookup, social media, paste dumps)
- Notes use of a YAML config file for API keys
- Emphasizes lightweight, fast CLI operation
- Mentions Docker support

##### Detail
- Parallel branches from Runner to each Task Module
- YAML config file as an external dependency loaded at startup
- Docker build/runtime contexts if relevant (e.g., container interfaces)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Legend
    subgraph "Legend"
        direction LR
        A[Core/Internal]:::core
        B[Pluggable Module]:::module
        C[External API]:::external
        D[Config/Aux]:::aux
    end

    %% CLI Layer
    subgraph "CLI Layer"
        CLI["CLI: cmd/mosint"]:::core
    end

    %% Configuration Manager
    subgraph "Configuration Manager"
        CONFIG["config: internal/config"]:::aux
    end

    %% Core Components
    subgraph "Core Orchestrator"
        RUNNER["runner: internal/runner"]:::core
        ENGINE["engine: pkg/engine"]:::core
        SPINNER["spinner: internal/spinner"]:::aux
    end

    %% Output Module
    subgraph "Output Module"
        OUTPUT["output: internal/output"]:::aux
    end

    %% Task Modules
    subgraph "Task Modules"
        DNS["DNS Lookup"]:::module
        VERIF["Email Verification"]:::module
        GS["Google Search"]:::module
        BD["BreachDirectory"]:::module
        HIBP["HaveIBeenPwned"]:::module
        PSB["PSBDMP"]:::module
        HUNTER["Hunter.io"]:::module
        INTELX["IntelX"]:::module
        IPAPI["IPAPI"]:::module
        EMAILREP["EmailRep"]:::module
        TWITTER["Twitter"]:::module
        INSTAGRAM["Instagram"]:::module
        SPOTIFY["Spotify"]:::module
    end

    %% External Systems
    subgraph "External Systems"
        IPAPI_API["IPAPI"]:::external
        HUNTER_API["Hunter.io"]:::external
        EMAILREP_API["EmailRep"]:::external
        HIBP_API["HaveIBeenPwned"]:::external
        BD_API["BreachDirectory"]:::external
        PSB_API["Pastebin Dumps"]:::external
        GS_API["Google Search"]:::external
        DNS_API["DNS Servers"]:::external
        TW_API["Twitter API"]:::external
        INSTA_API["Instagram API"]:::external
        SPOT_API["Spotify API"]:::external
        INTELX_API["IntelX API"]:::external
    end

    %% Connections
    CLI -->|"flags: email, config-path"| CONFIG
    CONFIG -->|"provides API keys"| RUNNER
    RUNNER -->|"spawns"| ENGINE
    RUNNER <-->|"progress"| SPINNER
    ENGINE -->|"schedule tasks"| DNS
    ENGINE -->|"schedule tasks"| VERIF
    ENGINE -->|"schedule tasks"| GS
    ENGINE -->|"schedule tasks"| BD
    ENGINE -->|"schedule tasks"| HIBP
    ENGINE -->|"schedule tasks"| PSB
    ENGINE -->|"schedule tasks"| HUNTER
    ENGINE -->|"schedule tasks"| INTELX
    ENGINE -->|"schedule tasks"| IPAPI
    ENGINE -->|"schedule tasks"| EMAILREP
    ENGINE -->|"schedule tasks"| TWITTER
    ENGINE -->|"schedule tasks"| INSTAGRAM
    ENGINE -->|"schedule tasks"| SPOTIFY

    DNS -->|"lookup"| DNS_API
    VERIF -->|"verify email"| EMAILREP_API
    GS -->|"search query"| GS_API
    BD -->|"breach lookup"| BD_API
    HIBP -->|"breach lookup"| HIBP_API
    PSB -->|"paste dumps"| PSB_API
    HUNTER -->|"email info"| HUNTER_API
    INTELX -->|"intelligence"| INTELX_API
    IPAPI -->|"geo IP"| IPAPI_API
    EMAILREP -->|"reputation"| EMAILREP_API
    TWITTER -->|"profile data"| TW_API
    INSTAGRAM -->|"profile data"| INSTA_API
    SPOTIFY -->|"profile data"| SPOT_API

    DNS -->|results| RUNNER
    VERIF -->|results| RUNNER
    GS -->|results| RUNNER
    BD -->|results| RUNNER
    HIBP -->|results| RUNNER
    PSB -->|results| RUNNER
    HUNTER -->|results| RUNNER
    INTELX -->|results| RUNNER
    IPAPI -->|results| RUNNER
    EMAILREP -->|results| RUNNER
    TWITTER -->|results| RUNNER
    INSTAGRAM -->|results| RUNNER
    SPOTIFY -->|results| RUNNER

    RUNNER -->|"aggregated data"| OUTPUT
    OUTPUT -->|"writes JSON/text"| CLI

    %% Click Events
    click CLI "https://github.com/alpkeskin/mosint/blob/master/v3/cmd/mosint/main.go"
    click CONFIG "https://github.com/alpkeskin/mosint/blob/master/v3/internal/config/config.go"
    click RUNNER "https://github.com/alpkeskin/mosint/blob/master/v3/internal/runner/runner.go"
    click ENGINE "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/engine/engine.go"
    click SPINNER "https://github.com/alpkeskin/mosint/blob/master/v3/internal/spinner/spinner.go"
    click OUTPUT "https://github.com/alpkeskin/mosint/blob/master/v3/internal/output/output.go"
    click DNS "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/dns/dns.go"
    click VERIF "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/verification/verification.go"
    click GS "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/scrape/googlesearch/google_search.go"
    click BD "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/services/breachdirectory/breachdirectory.go"
    click HIBP "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/services/haveibeenpwned/haveibeenpwned.go"
    click PSB "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/services/psbdmp/psbdmp.go"
    click HUNTER "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/services/hunter/hunter.go"
    click INTELX "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/services/intelx/intelx.go"
    click IPAPI "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/services/ipapi/ipapi.go"
    click EMAILREP "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/services/emailrep/emailrep.go"
    click TWITTER "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/social/twitter/twitter.go"
    click INSTAGRAM "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/social/instagram/instagram.go"
    click SPOTIFY "https://github.com/alpkeskin/mosint/blob/master/v3/pkg/social/spotify/spotify.go"

    %% Styles
    classDef core fill:#D0E8FF,stroke:#0366d6,stroke-width:1px
    classDef module fill:#D4F6C8,stroke:#28a745,stroke-width:1px
    classDef external fill:#FFE5B4,stroke:#d9730d,stroke-width:1px
    classDef aux fill:#E8E8E8,stroke:#6a737d,stroke-width:1px
    classDef legend fill:#ffffff,stroke:#000000,stroke-width:1px,line-height:12px;padding:4px;font-size:12px
```
