# archiveteam/youtube-grab architecture

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

- Interactive diagram: https://gitdiagram.com/archiveteam/youtube-grab
- Repository: https://github.com/archiveteam/youtube-grab

## Overview

##### Main Components

a) Client-Side Components:
- Docker Container / Warrior VM (primary execution environments)
- Pipeline System (represented by pipeline.py)
- YouTube Data Grabber (represented by youtube.lua)

b) Infrastructure Components:
- Archive Team Tracker
- YouTube API/Services
- Archive Team Storage Infrastructure
- Watchtower (for Docker updates)

##### Component Relationships

Key interactions:
- Docker/Warrior → Pipeline Orchestrator
- Pipeline Orchestrator → YouTube Grabber
- YouTube Grabber → YouTube Services
- Pipeline Orchestrator → Archive Team Tracker
- Watchtower → Docker Container

##### Additional Elements

Annotations for:
- Maximum concurrent item limits
- Network requirements
- System requirements (x64 architecture)
- Error handling flows

##### The deployment options and their characteristics

This design should reflect both the technical architecture and the project's mission-critical requirements for data integrity and proper archival procedures.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and classes
    classDef deployment fill:#e1f5fe,stroke:#01579b
    classDef core fill:#e8f5e9,stroke:#2e7d32
    classDef external fill:#fff3e0,stroke:#ff6f00
    classDef infrastructure fill:#f3e5f5,stroke:#7b1fa2
    classDef support fill:#eceff1,stroke:#455a64

    %% Legend
    subgraph Legend
        L1[Client Component]:::deployment
        L2[Core Component]:::core
        L3[External Service]:::external
        L4[Infrastructure]:::infrastructure
        L5[Support Service]:::support
        L6["--> Data Flow"]
        L7["-.-> Control Flow"]
        L8["..-> Update Flow"]
    end

    %% Top Layer - Deployment Options
    subgraph "Deployment Layer"
        Docker["Docker Container"]:::deployment
        Warrior["Archive Team Warrior VM"]:::deployment
    end

    %% Middle Layer - Core Components
    subgraph "Core Processing Layer"
        Pipeline["Pipeline Orchestrator"]:::core
        YouTubeGrabber["YouTube Data Grabber"]:::core
        Config["Configuration Management"]:::core
    end

    %% Bottom Layer - External Services
    subgraph "External Services Layer"
        YouTube["YouTube Services"]:::external
        ArchiveTracker["Archive Team Tracker"]:::external
        Storage["Archive Team Storage"]:::infrastructure
        Watchtower["Watchtower"]:::support
    end

    %% Relationships
    Docker --> Pipeline
    Warrior --> Pipeline
    Pipeline --> YouTubeGrabber
    YouTubeGrabber --> YouTube
    Pipeline --> ArchiveTracker
    ArchiveTracker --> Storage
    Watchtower -.-> Docker
    Config -.-> Pipeline
    Config -.-> YouTubeGrabber

    %% Click events
    click Docker "https://github.com/ArchiveTeam/youtube-grab/tree/master/Dockerfile"
    click Warrior "https://github.com/ArchiveTeam/youtube-grab/blob/master/warrior-install.sh"
    click Pipeline "https://github.com/ArchiveTeam/youtube-grab/blob/master/pipeline.py"
    click YouTubeGrabber "https://github.com/ArchiveTeam/youtube-grab/blob/master/youtube.lua"

    %% Notes
    classDef note fill:#fff,stroke:#999
    Note1["Concurrent Processing: 1-20 items"]:::note
    Note2["No VPN/Proxy Allowed"]:::note
    Note3["x64 Architecture Required"]:::note

    Pipeline --- Note1
    Docker --- Note2
    Warrior --- Note3
```
