# nickvisionapps/parabolic architecture

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

- Interactive diagram: https://gitdiagram.com/nickvisionapps/parabolic
- Repository: https://github.com/nickvisionapps/parabolic

## Overview

##### Main Components
- Core Library (Business Logic): Represented by the “libparabolic” directory. This contains all the core functionality including controllers, models, and events that implement the download management logic, configuration, and overall workflow.
- Frontends (Presentation Layer): There are two distinct user interface implementations:
– GNOME Frontend: Located in the “org.nickvision.tubeconverter.gnome” directory. It uses blueprints for UI elements and GTK components.
– QT Frontend: Found in the “org.nickvision.tubeconverter.qt” directory. This version uses Qt libraries and UI files.
- External Integration & Dependencies:
– yt-dlp: The underlying tool used for downloading; it is indirectly wrapped by the application.
– vcpkg-managed libraries (e.g., Boost, libnick, qtbase, etc.) whose dependencies should be noted.
- Build and Packaging Infrastructure: The project uses CMake for its build system and provides packaging scripts/configurations for Flatpak, Snap, and even Windows (Inno and MS Visual Studio build files). Documentation and translation files (docs, resources/po) also support the system.

##### Relationships and Interactions
- Both frontends (GNOME and QT) depend on the core library (libparabolic) for processing user actions, managing downloads, and handling business logic.
- The UI components issue commands (via controllers and callback events) that are processed by the core logic. Controllers in both the UI projects interact with the libparabolic controllers and models.
- Event-driven architecture: The libparabolic module triggers events (download added, progress updates, completion events) that the UI consumes to update the user state.
- External tools/integrations (such as yt-dlp) are utilized to perform the actual download tasks, meaning the core library or possibly dedicated helper modules serve as the abstraction layer to these services.

##### Architectural Patterns and Design Principles
- MVC (or a variant thereof): The clear division into “views” (the frontend specific UI files and blueprints), “controllers” (both in libparabolic and embedded within the frontend projects), and “models” in the core library suggests an MVC pattern.
- Modular design: The separate directories for GNOME and QT UI components indicate that the application is designed to support multiple presentation layers while reusing a shared backend.
- Event-driven communication: The presence of an “events” directory and event argument classes in libparabolic hints at a well-structured event propagation system between the backend and UI components.

##### Detailing Essential Architectural Elements
- Also, note the support for multiple languages and internationalization (the docs/po and resources/po directories), which is a supporting concern for the overall architecture.

– The separation between presentation (GNOME and QT UIs), business logic (libparabolic), and integration with external services (yt-dlp, vcpkg dependencies).
This detailed representation will be very helpful for understanding, maintaining, and extending the system architecture of Parabolic.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        GNOME["GNOME UI"]:::frontend
        QT["QT UI"]:::frontend
    end

    %% Application Core Layer
    subgraph "Application Core"
        Core["Core Library: libparabolic"]:::backend
        Controllers["Controllers"]:::backend
        Models["Models"]:::backend
        Events["Events"]:::backend
        Core --> Controllers
        Core --> Models
        Core --> Events
    end

    %% Build & Packaging Infrastructure
    subgraph "Build & Packaging Infrastructure"
        CMakeRoot["CMake (Root)"]:::build
        CMakeLib["CMake (libparabolic)"]:::build
        CMakeGNOME["CMake (GNOME)"]:::build
        CMakeQT["CMake (QT)"]:::build
        PackagingFlatpak["Packaging (Flatpak)"]:::build
        PackagingSnap["Packaging (Snap)"]:::build
        PackagingInno["Packaging (Inno)"]:::build
    end

    %% Integration Layer
    YTDLP["yt-dlp Integration"]:::integration

    %% Relationships - UI to Core
    GNOME -->|"UIcommand"| Controllers
    QT -->|"UIcommand"| Controllers

    %% Relationships within Core
    Controllers -->|"invokes"| Models
    Controllers -->|"triggers"| Events
    Models -->|"updates"| Events

    %% Core to Integration
    Controllers -->|"downloadCall"| YTDLP

    %% Build & Packaging support connections (dashed lines)
    CMakeRoot --- Core
    CMakeLib --- Core
    CMakeGNOME --- GNOME
    CMakeQT --- QT
    PackagingFlatpak --- Core
    PackagingSnap --- Core
    PackagingInno --- Core

    %% Styles
    classDef frontend fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef backend fill:#F9E79F,stroke:#9A7D0A,stroke-width:2px;
    classDef integration fill:#A9DFBF,stroke:#1E8449,stroke-width:2px;
    classDef build fill:#E8DAEF,stroke:#512E5F,stroke-width:2px,stroke-dasharray: 5 5;

    %% Click Events
    click GNOME "https://github.com/nickvisionapps/parabolic/blob/main/org.nickvision.tubeconverter.gnome"
    click QT "https://github.com/nickvisionapps/parabolic/blob/main/org.nickvision.tubeconverter.qt"
    click Core "https://github.com/nickvisionapps/parabolic/tree/main/libparabolic"
    click YTDLP "https://github.com/nickvisionapps/parabolic/tree/main/resources/yt-dlp-plugins"
    click CMakeRoot "https://github.com/nickvisionapps/parabolic/blob/main/CMakeLists.txt"
    click CMakeLib "https://github.com/nickvisionapps/parabolic/blob/main/libparabolic/CMakeLists.txt"
    click CMakeGNOME "https://github.com/nickvisionapps/parabolic/blob/main/org.nickvision.tubeconverter.gnome/CMakeLists.txt"
    click CMakeQT "https://github.com/nickvisionapps/parabolic/blob/main/org.nickvision.tubeconverter.qt/CMakeLists.txt"
    click PackagingFlatpak "https://github.com/nickvisionapps/parabolic/tree/main/flatpak"
    click PackagingSnap "https://github.com/nickvisionapps/parabolic/tree/main/snap"
    click PackagingInno "https://github.com/nickvisionapps/parabolic/tree/main/inno"
```
