# buneeisslo/yt-playlist-report architecture

> Architecture diagram of the GitHub repository buneeisslo/yt-playlist-report, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/buneeisslo/yt-playlist-report
- Repository: https://github.com/buneeisslo/yt-playlist-report

## Overview

##### Project Overview
This is a frontend-focused web application that interacts with the YouTube Data API to generate detailed reports for YouTube playlists. The application is built using modern React technologies and follows a component-based architecture.

##### Main System Components

A. Client-Side Application:
- Frontend UI Layer (React + TypeScript)
- API Integration Layer
- State Management Layer (Tanstack Query)

B. External Services:
- YouTube Data API

##### Connection Flows

- User Interactions → UI Components
- UI Components → Application Logic
- Application Logic → API Integration
- API Integration → YouTube Data API

##### Important Elements to Highlight

a) Key Features:
- Playlist Analysis
- Video Filtering
- Sorting Capabilities
- Playback Speed Adjustment

b) Technical Stack:
- React + TypeScript
- Vite
- Tailwind CSS
- Shadcn UI
- Tanstack Query

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "User Interface Layer"
        UI[User Interface]
        CoreUI[Core UI Components]
        ShadcnUI[Shadcn UI Components]
        Pages[Application Pages]
        
        UI --> CoreUI
        UI --> ShadcnUI
        UI --> Pages
        
        subgraph "Core Components"
            Hero[Hero]
            Features[Features]
            VideosTable[Videos Table]
            Form[Form]
            HeaderNav[Header Navigation]
            Footer[Footer]
        end
        
        subgraph "UI Library Components"
            Button[Button]
            Table[Table]
            Input[Input]
            Select[Select]
            DataTableHeader[Data Table Header]
            DataTablePagination[Data Table Pagination]
            DataTableToolbar[Data Table Toolbar]
        end
        
        subgraph "Pages"
            Landing[Landing Page]
            Report[Report Page]
        end
    end
    
    subgraph "Application Logic Layer"
        AppLogic[Application Logic]
        StateManagement[State Management]
        Utils[Utilities]
        Router[Route Management]
        
        AppLogic --> StateManagement
        AppLogic --> Utils
        AppLogic --> Router
    end
    
    subgraph "API Integration Layer"
        APIIntegration[API Integration]
        PlaylistAPI[Playlist API]
        YouTubeAPI[YouTube Data API]
        
        APIIntegration --> PlaylistAPI
        PlaylistAPI --> YouTubeAPI
    end
    
    UI --> AppLogic
    AppLogic --> APIIntegration
    
    %% Click Events
    click Hero "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/Hero.tsx"
    click Features "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/Features.tsx"
    click VideosTable "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/VideosTable.tsx"
    click Form "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/Form.tsx"
    click HeaderNav "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/HeaderNav.tsx"
    click Footer "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/Footer.tsx"
    click Button "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/ui/button.tsx"
    click Table "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/ui/table.tsx"
    click Input "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/ui/input.tsx"
    click Select "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/ui/select.tsx"
    click Landing "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/pages/Landing.tsx"
    click Report "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/pages/Report.tsx"
    click PlaylistAPI "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/api/PlaylistApi.tsx"
    click Utils "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/lib/utils.ts"
    click DataTableHeader "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/ui/data-table-column-header.tsx"
    click DataTablePagination "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/ui/data-table-pagination.tsx"
    click DataTableToolbar "https://github.com/buneeIsSlo/yt-playlist-report/blob/master/src/components/ui/data-table-toolbar.tsx"
    click ShadcnUI "https://github.com/buneeIsSlo/yt-playlist-report/tree/master/src/components/ui/"
    
    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef ui fill:#e1f5fe,stroke:#01579b
    classDef logic fill:#f3e5f5,stroke:#4a148c
    classDef api fill:#fff3e0,stroke:#e65100
    
    class CoreUI,ShadcnUI,Pages ui
    class AppLogic,StateManagement,Utils,Router logic
    class APIIntegration,PlaylistAPI,YouTubeAPI api
    
    %% Legend
    subgraph Legend
        UI_Legend[UI Components]:::ui
        Logic_Legend[Logic Components]:::logic
        API_Legend[API Components]:::api
    end
```
