# blackblazent/blackvideo architecture

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

- Interactive diagram: https://gitdiagram.com/blackblazent/blackvideo
- Repository: https://github.com/blackblazent/blackvideo

## Overview

##### Project type and purpose
- BlackVideo is a cross-platform desktop video player built with Tauri.
- The front-end uses React + Vite (TypeScript/TSX), and the back-end/core logic lives in Rust under src-tauri.
- It integrates with local file system (app registry, backups) and external media APIs (YouTube, Google, etc.).

##### File structure
- Top level
– package.json, pnpm-lock.yaml, tsconfig.json/node.json, vite.config.ts → front-end build/config
– index.html, public/ → static assets for the UI WebView
– src/ → React/Vite TypeScript code (App.tsx, main.tsx, styles, assets)
- src-tauri/
– Cargo.toml/Cargo.lock → Rust dependencies and metadata
– tauri.conf.json → Tauri configuration (bundle targets, permissions)
– src/main.rs & lib.rs → Rust “commands” exposed to the front-end IPC
– capabilities/default.json → lists OS capabilities (camera, audio, file)
- .app-registry/ → local database for backup/trash management

##### README insights
- Clear statement: “A video player with integration of wide variety of playback functionalities.”
- Tech stack: Tauri (Rust + WebView), React, Vite, TypeScript.
- External API integrations recommended (YouTube, Google, Facebook, etc.).
- Desktop app distribution (macOS, Windows, Linux).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        direction TB
        App["App.tsx"]:::frontend
        Main["main.tsx"]:::frontend
        CSS["App.css"]:::frontend
        Assets["assets/"]:::frontend
        IndexHTML["index.html"]:::frontend
        Public["public/"]:::frontend
        ViteConfig["vite.config.ts"]:::frontend
        TSConfig["tsconfig.json"]:::frontend
        TSNodeConfig["tsconfig.node.json"]:::frontend
        Package["package.json"]:::frontend
        Lock["pnpm-lock.yaml"]:::frontend
    end

    %% Tauri Bridge
    subgraph "Tauri Bridge (IPC)"
        direction TB
        TauriConf["tauri.conf.json"]:::bridge
        LibRsBridge["lib.rs"]:::bridge
        BridgeMain["main.rs"]:::bridge
    end

    %% Core Engine
    subgraph "Core Engine (Rust)"
        direction TB
        CargoToml["Cargo.toml"]:::backend
        CargoLock["Cargo.lock"]:::backend
        BuildRs["build.rs"]:::backend
        CoreMain["src/main.rs"]:::backend
        CoreLib["src/lib.rs"]:::backend
    end

    %% OS Capabilities & Icons
    subgraph "OS Capabilities & Icons"
        direction TB
        CapJSON["default.json"]:::os
        IconICNS["icon.icns"]:::os
        IconsDir["icons/"]:::os
    end

    %% Local Storage
    subgraph "Local Storage"
        direction TB
        BackupJSON["backup.json"]:::storage
        TrashDB["trash_bin.db"]:::storage
    end

    %% External Services
    subgraph "External Services"
        direction TB
        YouTube["YouTube Data API"]:::external
        Google["Google Search API"]:::external
        Facebook["Facebook Graph API"]:::external
    end

    %% OS & Multimedia Layer
    subgraph "OS & Multimedia Layer"
        direction TB
        NativeCodecs["Native codecs & drivers"]:::os
        WindowSys["Windowing system"]:::os
    end

    %% Connections
    App -->|"user action"| BridgeMain
    Main -->|"init"| BridgeMain
    BridgeMain -->|"RPC call"| CoreMain
    CoreMain -->|"uses commands"| CoreLib
    CoreMain -->|"build step"| BuildRs
    CoreMain -->|"access capabilities"| CapJSON
    CoreMain -->|"package icons"| IconICNS
    CoreMain -->|"package icons"| IconsDir
    CoreMain -->|"read/write"| BackupJSON
    CoreMain -->|"read/write"| TrashDB
    CoreMain -->|"stream metadata"| YouTube
    CoreMain -->|"stream metadata"| Google
    CoreMain -->|"stream metadata"| Facebook
    YouTube -->|"response"| CoreMain
    Google -->|"response"| CoreMain
    Facebook -->|"response"| CoreMain
    CoreMain -->|"invoke"| NativeCodecs
    CoreMain -->|"invoke"| WindowSys
    NativeCodecs -->|"output"| CoreMain
    CoreMain -->|"send result"| BridgeMain
    BridgeMain -->|"update UI"| App

    %% Click Events
    click App "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src/App.tsx"
    click Main "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src/main.tsx"
    click CSS "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src/App.css"
    click Assets "https://github.com/blackblazent/blackvideo/tree/blackvideo-master/BlackVideo/src/assets/"
    click IndexHTML "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/index.html"
    click Public "https://github.com/blackblazent/blackvideo/tree/blackvideo-master/BlackVideo/public/"
    click ViteConfig "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/vite.config.ts"
    click TSConfig "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/tsconfig.json"
    click TSNodeConfig "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/tsconfig.node.json"
    click Package "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/package.json"
    click Lock "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/pnpm-lock.yaml"
    click TauriConf "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src-tauri/tauri.conf.json"
    click LibRsBridge "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src-tauri/src/lib.rs"
    click BridgeMain "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src-tauri/src/main.rs"
    click CargoToml "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src-tauri/Cargo.toml"
    click CargoLock "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src-tauri/Cargo.lock"
    click BuildRs "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src-tauri/build.rs"
    click CoreMain "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src-tauri/src/main.rs"
    click CoreLib "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src-tauri/src/lib.rs"
    click CapJSON "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src-tauri/capabilities/default.json"
    click IconICNS "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/src-tauri/icons/icon.icns"
    click IconsDir "https://github.com/blackblazent/blackvideo/tree/blackvideo-master/BlackVideo/src-tauri/icons/"
    click BackupJSON "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/.app-registry/.backup/backup.json"
    click TrashDB "https://github.com/blackblazent/blackvideo/blob/blackvideo-master/BlackVideo/.app-registry/recycle/trash_bin.db"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#3399ff,color:#000
    classDef bridge fill:#d4f7d4,stroke:#2d8f2d,color:#000
    classDef backend fill:#e2ffe2,stroke:#28a428,color:#000
    classDef storage fill:#f0f0f0,stroke:#888888,color:#000
    classDef external fill:#ffe5b4,stroke:#ff9933,color:#000
    classDef os fill:#f3e6ff,stroke:#9933ff,color:#000
```
