# echteralsfake/porn_fetch architecture

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

- Interactive diagram: https://gitdiagram.com/echteralsfake/porn_fetch
- Repository: https://github.com/echteralsfake/porn_fetch

## Overview

##### Project type and purpose
- Project type: Cross-platform, open-source desktop/CLI/video-downloader tool.
- Purpose: Provide both GUI (PySide6/Qt) and CLI interfaces to download videos, playlists, channels, or search results from multiple adult websites via their public APIs. It also supports packaging as native Android, macOS, Windows, and Linux executables.

##### File structure
- Top level:
- main.py – launches the GUI application
- Porn_Fetch_CLI.py – entry point for the command-line interface
- server.py – a minimal HTTP server (used for Android local debugging?)
- requirements*.txt – Python dependencies for GUI vs. CLI
- src/
– backend/ : business logic, API wrappers, shared utilities, URL lists
– frontend/: Qt .ui forms, generated Python UI classes, resources, stylesheets, translations
– build/: Nuitka/PySide6‐deploy spec files for each target platform
– scripts/: shell/PowerShell helpers to install, build, or package on various platforms
- CI/CD:
- .github/workflows/* : build pipelines for GUI and CLI on Windows/Linux

##### README for additional insights
- Architecture hints: “Python3.12 + Nuitka + Qt’s pyside6-deploy,” multi-threaded downloader, proxy support
- Supported sites implemented as separate API libraries under src/backend
- Build & packaging is standardized via spec files and install/build scripts

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Interfaces
    subgraph "User Interfaces"
        GUI["GUI (Qt/PySide6)"]:::frontend
        CLI["CLI Interface"]:::frontend
    end

    %% Core Backend
    subgraph "Core Backend"
        DE["Download Engine\n(multi-threaded HLS/HTTP)"]:::backend
        API["API Connectors\n(plugin modules)"]:::backend
        UTIL["Shared Utilities\n(logging, config)"]:::backend
        URLP["URL/Input Processor"]:::backend
    end

    %% Build & Deployment
    subgraph "Build & Deployment"
        BS["Build Scripts & Spec Files"]:::build
        CI["CI/CD Pipelines"]:::build
        PE["Packaged Executable"]:::build
    end

    %% External Systems
    subgraph "External Systems"
        WEB["Target Websites' HTTP APIs"]:::external
        FFMPEG["FFmpeg"]:::external
        FS["Local File System"]:::external
    end

    %% Server
    SERVER["Minimal HTTP Server"]:::backend

    %% Connections
    GUI -->|calls| DE
    GUI -->|calls| API
    CLI -->|calls| DE
    CLI -->|calls| API

    DE -->|requests| WEB
    API -->|requests| WEB
    DE -->|spawns subprocess| FFMPEG
    DE -->|reads/writes| FS
    UTIL -->|reads/writes| FS
    URLP -->|parses input| DE

    SERVER -->|serves local| GUI

    CI -->|triggers build| BS
    BS -->|produces| PE

    %% Click Events
    click GUI "https://github.com/echteralsfake/porn_fetch/blob/master/main.py"
    click GUI "https://github.com/echteralsfake/porn_fetch/tree/master/src/frontend/"
    click CLI "https://github.com/echteralsfake/porn_fetch/blob/master/Porn_Fetch_CLI.py"
    click DE "https://github.com/echteralsfake/porn_fetch/blob/master/src/backend/shared_functions.py"
    click UTIL "https://github.com/echteralsfake/porn_fetch/blob/master/src/backend/class_help.py"
    click UTIL "https://github.com/echteralsfake/porn_fetch/blob/master/src/backend/log_config.py"
    click UTIL "https://github.com/echteralsfake/porn_fetch/blob/master/src/backend/shared_gui.py"
    click API "https://github.com/echteralsfake/porn_fetch/tree/master/src/backend/"
    click URLP "https://github.com/echteralsfake/porn_fetch/blob/master/src/backend/urls.txt"
    click SERVER "https://github.com/echteralsfake/porn_fetch/blob/master/server.py"
    click BS "https://github.com/echteralsfake/porn_fetch/tree/master/src/build/"
    click BS "https://github.com/echteralsfake/porn_fetch/tree/master/src/scripts/"
    click CI "https://github.com/echteralsfake/porn_fetch/tree/master/.github/workflows/"

    %% Styles
    classDef frontend fill:#D0E8FF,stroke:#0366d6,stroke-width:2px,color:#0366d6;
    classDef backend fill:#DFFFE0,stroke:#228B22,stroke-width:2px,color:#228B22;
    classDef external fill:#FFF5CC,stroke:#DAA520,stroke-width:2px,color:#DAA520;
    classDef build fill:#E8E8E8,stroke:#636363,stroke-width:2px,color:#636363;
```
