# yezz123/soig architecture

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

- Interactive diagram: https://gitdiagram.com/yezz123/soig
- Repository: https://github.com/yezz123/soig

## Overview

SoIG is a command-line Instagram OSINT tool. The user supplies a username and optional flags; the CLI creates a scraper that fetches and parses the profile, then displays profile information and common tags. Optional flags request post details and saving profile, post, and tag data locally. The README documents broader profile and post fields than the excerpts show. The graph follows the sampled calls; some extraction and persistence details are only partially excerpted.

Main entry points: [`main.py`](https://github.com/yezz123/soig/blob/master/main.py) (CLI options), [`api/api.py`](https://github.com/yezz123/soig/blob/master/api/api.py) (Profile fetch and parse)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Command line"]
  node_cli["CLI options<br/>[main.py]"]
end

subgraph group_scraping["Instagram scraping"]
  node_scraper["Scraper entry<br/>[api.py]"]
  node_profile["Profile fetch and parse<br/>[api.py]"]
  node_postdata["Post data<br/>[api.py]"]
  node_tags["Tag extraction<br/>[api.py]"]
end

subgraph group_results["Results and export"]
  node_display["Result display<br/>[api.py]"]
  node_postscan["Upload scan<br/>[api.py]"]
  node_save["Save results<br/>[api.py]"]
  node_files[("Local files")]
end

subgraph group_external["External services"]
  node_instagram["Instagram"]
  node_tinyurl["TinyURL"]
end

node_user(("User"))

node_user -->|"supplies options"| node_cli
node_cli -->|"creates scraper"| node_scraper
node_cli -->|"prints results"| node_display
node_cli -->|"optionally scans"| node_postscan
node_cli -->|"optionally saves"| node_save
node_scraper -->|"loads profile"| node_profile
node_profile -->|"requests profile"| node_instagram
node_profile -->|"shortens picture URL"| node_tinyurl
node_profile -->|"reads timeline"| node_postdata
node_postdata -->|"extracts hashtags"| node_tags
node_display -->|"counts tags"| node_tags
node_postscan -->|"prints upload details"| node_postdata
node_save -->|"writes result files"| node_files
node_save -->|"downloads profile picture"| node_instagram

click node_cli "https://github.com/yezz123/soig/blob/master/main.py"
click node_scraper "https://github.com/yezz123/soig/blob/master/api/api.py"
click node_profile "https://github.com/yezz123/soig/blob/master/api/api.py"
click node_postdata "https://github.com/yezz123/soig/blob/master/api/api.py"
click node_tags "https://github.com/yezz123/soig/blob/master/api/api.py"
click node_display "https://github.com/yezz123/soig/blob/master/api/api.py"
click node_postscan "https://github.com/yezz123/soig/blob/master/api/api.py"
click node_save "https://github.com/yezz123/soig/blob/master/api/api.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_user toneBlue
class node_scraper,node_profile,node_postdata,node_tags toneAmber
class node_display,node_postscan,node_save,node_files toneMint
class node_instagram,node_tinyurl toneRose
```

## Components

### Command line

- [CLI options](https://github.com/yezz123/soig/blob/master/main.py): `main.py`

### Instagram scraping

- [Scraper entry](https://github.com/yezz123/soig/blob/master/api/api.py): `api/api.py`
- [Profile fetch and parse](https://github.com/yezz123/soig/blob/master/api/api.py): `api/api.py`
- [Post data](https://github.com/yezz123/soig/blob/master/api/api.py): `api/api.py`
- [Tag extraction](https://github.com/yezz123/soig/blob/master/api/api.py): `api/api.py`

### Results and export

- [Result display](https://github.com/yezz123/soig/blob/master/api/api.py): `api/api.py`
- [Upload scan](https://github.com/yezz123/soig/blob/master/api/api.py): `api/api.py`
- [Save results](https://github.com/yezz123/soig/blob/master/api/api.py): `api/api.py`
- **Local files**

### External services

- **Instagram**
- **TinyURL**

### Other components

- **User**

## Connections

- User → CLI options: supplies options (evidence: `README.md`)
- CLI options → Scraper entry: creates scraper (evidence: `main.py`)
- CLI options → Result display: prints results (evidence: `main.py`)
- CLI options → Upload scan: optionally scans (evidence: `main.py`)
- CLI options → Save results: optionally saves (evidence: `main.py`)
- Scraper entry → Profile fetch and parse: loads profile (evidence: `api/api.py`)
- Profile fetch and parse → Instagram: requests profile (evidence: `api/api.py`)
- Profile fetch and parse → TinyURL: shortens picture URL (evidence: `api/api.py`)
- Profile fetch and parse → Post data: reads timeline (evidence: `api/api.py`)
- Post data → Tag extraction: extracts hashtags (evidence: `api/api.py`)
- Result display → Tag extraction: counts tags (evidence: `api/api.py`)
- Upload scan → Post data: prints upload details (evidence: `api/api.py`)
- Save results → Local files: writes result files (evidence: `api/api.py`)
- Save results → Instagram: downloads profile picture (evidence: `api/api.py`)
