# cyntoolkit/pipelab architecture

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

- Interactive diagram: https://gitdiagram.com/cyntoolkit/pipelab
- Repository: https://github.com/cyntoolkit/pipelab

## Overview

##### Main Components Identification

a) Core Application Layer:
- Desktop Application (Pipelab)
- Plugin System
- Runtime Environments (Electron/Tauri)

b) Frontend Layer:
- Vue.js based renderer (/src/renderer)
- Component system
- Router and Store management

c) Backend Layer:
- Main process handlers (/src/main)
- File system operations
- IPC communication

**┌─ User Interface Layer ─────────────────────┐**
- Vue Components                           │
- Pages & Routes                           │
- Store Management                         │
- ┬───────────────────────┘
- ↕ (IPC)
**┌─ Core Application Layer ───────────────────┐**
- ┌─ Plugin System ─┐  ┌─ Handler System ─┐  │
- Construct    │  │ - File System    │  │
- Steam        │  │ - Dialog         │  │
- Filesystem   │  │ - Window         │  │
- System       │  │ - General        │  │
- ┘  └────────────────────┘ │
- ┬───────────────────────┘
- ↕
**┌─ Runtime Layer ──────────────────────────┐**
- ┌─ Electron ─┐    ┌─ Tauri ─┐           │
- Main Process│    │ Rust Backend        │
- Renderer   │    │ WebView             │
- ┘    └──────────────────┘   │
- ┘

##### Important Details to Capture

- Relationship between the plugin system and game editors
- How the core messaging library connects components
- Demonstrate the build/packaging process flow
- Deployment paths to various platforms

##### Technical Stack Indicators

Technology badges or labels for:
- Vue.js (Frontend framework)
- Electron/Tauri (Runtime environments)
- TypeScript (Programming language)
- Supabase (Database, based on the presence of Supabase files)

##### Specific Implementation Notes

- Relationship between the renderer and main processes
- How the plugin system integrates with external platforms

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and classes
    classDef frontend fill:#42b883,color:white
    classDef backend fill:#2c3e50,color:white
    classDef plugin fill:#3498db,color:white
    classDef runtime fill:#e74c3c,color:white
    classDef core fill:#9b59b6,color:white
    classDef store fill:#f1c40f,color:black
    classDef ipc fill:#1abc9c,color:white
    classDef fs fill:#34495e,color:white

    subgraph UI["User Interface Layer"]
        VueComponents["Vue Components"]:::frontend
        Pages["Pages & Routes"]:::frontend
        Store["Store Management"]:::store
        Router["Router"]:::frontend
    end

    subgraph Core["Core Application Layer"]
        CoreApp["Core Application"]:::core
        IPC["IPC Communication"]:::ipc
        Handlers["Handler System"]:::backend
        
        subgraph PluginSystem["Plugin System"]
            PluginCore["Plugin Core"]:::plugin
            PluginConstruct["Construct Plugin"]:::plugin
            PluginSteam["Steam Plugin"]:::plugin
            PluginFS["Filesystem Plugin"]:::plugin
            PluginSystem["System Plugin"]:::plugin
        end
    end

    subgraph Runtime["Runtime Layer"]
        subgraph Electron["Electron"]
            MainProcess["Main Process"]:::runtime
            Renderer["Renderer Process"]:::runtime
        end
        
        subgraph Tauri["Tauri"]
            RustBackend["Rust Backend"]:::runtime
            WebView["WebView"]:::runtime
        end
    end

    %% Relationships
    VueComponents --> Store
    VueComponents --> Router
    Pages --> Store
    
    Store --> IPC
    IPC --> Handlers
    
    Handlers --> PluginSystem
    PluginCore --> PluginConstruct
    PluginCore --> PluginSteam
    PluginCore --> PluginFS
    PluginCore --> PluginSystem
    
    IPC --> MainProcess
    IPC --> RustBackend
    
    MainProcess --> Renderer
    RustBackend --> WebView

    %% Click events
    click VueComponents "https://github.com/cyntoolkit/pipelab/tree/main//src/renderer/components"
    click Pages "https://github.com/cyntoolkit/pipelab/tree/main//src/renderer/pages"
    click Store "https://github.com/cyntoolkit/pipelab/tree/main//src/renderer/store"
    click Router "https://github.com/cyntoolkit/pipelab/blob/main//src/renderer/router/router.ts"
    click CoreApp "https://github.com/cyntoolkit/pipelab/tree/main//src/shared/libs/core-app"
    click IPC "https://github.com/cyntoolkit/pipelab/blob/main//src/preload.ts"
    click Handlers "https://github.com/cyntoolkit/pipelab/blob/main//src/main/handlers.ts"
    click PluginCore "https://github.com/cyntoolkit/pipelab/tree/main//src/shared/libs/plugin-core"
    click PluginConstruct "https://github.com/cyntoolkit/pipelab/tree/main//src/shared/libs/plugin-construct"
    click PluginSteam "https://github.com/cyntoolkit/pipelab/tree/main//src/shared/libs/plugin-steam"
    click PluginFS "https://github.com/cyntoolkit/pipelab/tree/main//src/shared/libs/plugin-filesystem"
    click PluginSystem "https://github.com/cyntoolkit/pipelab/tree/main//src/shared/libs/plugin-system"
    click MainProcess "https://github.com/cyntoolkit/pipelab/tree/main//assets/electron/template"
    click RustBackend "https://github.com/cyntoolkit/pipelab/tree/main//assets/tauri/template"
```
