# unxsist/jet-pilot architecture

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

- Interactive diagram: https://gitdiagram.com/unxsist/jet-pilot
- Repository: https://github.com/unxsist/jet-pilot

## Overview

##### Main Components Identification

The system consists of these primary components:
- Frontend (Vue.js application)
- Backend (Tauri/Rust)
- Kubernetes Integration Layer
- File System Interface
- Shell Interface

**┌─ User Interface Layer ─────────────────────────────────┐**
- Vue.js Components                                    │
- Command Palette                                      │
- Monaco Editor                                        │
- UI Components (Tables, Forms, Dialogs)               │
- Application Logic Layer ────────────────────────────┐ │
- Vue Router                                         │ │
- State Management                                   │ │
- Service Providers                                  │ │
- Tauri Backend Layer ──────────────────────────────┐ │ │
- Rust Core                                        │ │ │
- Access Log Parser                                │ │ │
- Shell Integration                                │ │ │
- External Integration Layer ────────────────────┐   │ │ │
- Kubernetes API                               │   │ │ │
- File System Access                           │   │ │ │
- Terminal/Shell Access                        │   │ │ │
- ┘   │ │ │

- ┘─┘

##### Component Details

a. User Interface Layer (Blue):
- Command palette system
- Monaco editor integration
- Table system for K8s resources

b. Application Logic Layer (Green):
- Providers (src/providers/)
- Routing system (src/router.ts)
- Service layer (src/services/)
- Composables (src/composables/)

c. Tauri Backend Layer (Orange):
- Rust core components (src-tauri/src/)
- Access log parser subsystem
- Shell integration module

d. External Integration Layer (Purple):
- Kubernetes API connection
- File system access points
- Shell/terminal integration

##### Connection Flows

- User interaction flows (top-down)
- Data flows between components (bi-directional where applicable)
- API calls to Kubernetes (external)
- File system operations (external)

##### Additional Elements

Specialized sections for:
- Port forwarding functionality
- Log viewing system
- Kubernetes object management
- Shell access system

##### Notes

- Clear boundaries between frontend and backend
- Tauri bridge between frontend and system resources
- Security boundaries and permission zones

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph UI_Layer
        UI["UI Components"]:::ui
        CP["Command Palette"]:::ui
        ME["Monaco Editor"]:::ui
        KT["K8s Tables"]:::ui
        LV["Log Viewer"]:::ui
        SA["Shell Access"]:::ui
        PF["Port Forwarding"]:::ui
        SM["Settings Manager"]:::ui
    end

    subgraph App_Logic
        RT["Router"]:::logic
        SP["Service Providers"]:::logic
        KS["Kubernetes Service"]:::logic
    end

    subgraph Tauri_Backend
        RC["Rust Core"]:::backend
        ALP["Access Log Parser"]:::backend
        SI["Shell Integration"]:::backend
        KI["K8s Integration"]:::backend
    end

    subgraph External
        K8S[("Kubernetes API")]:::external
        FS[("File System")]:::external
        SH[("System Shell")]:::external
    end

    %% UI Layer Connections
    UI --> RT
    CP --> RT
    ME --> RT
    KT --> KS
    LV --> KS
    SA --> SI
    PF --> KI
    SM --> SP

    %% App Logic Connections
    RT --> SP
    SP --> KS
    KS --> KI

    %% Backend Connections
    RC --> KI
    RC --> SI
    RC --> ALP
    KI --> K8S
    SI --> SH
    RC --> FS

    %% Styles
    classDef ui fill:#a8d1f0,stroke:#333,stroke-width:2px
    classDef logic fill:#90EE90,stroke:#333,stroke-width:2px
    classDef backend fill:#FFB347,stroke:#333,stroke-width:2px
    classDef external fill:#DDA0DD,stroke:#333,stroke-width:2px

    %% Click Events
    click UI "https://github.com/unxsist/jet-pilot/tree/main/src/components/ui/"
    click CP "https://github.com/unxsist/jet-pilot/tree/main/src/command-palette/"
    click ME "https://github.com/unxsist/jet-pilot/tree/main/src/components/monaco/"
    click KT "https://github.com/unxsist/jet-pilot/tree/main/src/components/tables/"
    click RT "https://github.com/unxsist/jet-pilot/blob/main/src/router.ts"
    click SP "https://github.com/unxsist/jet-pilot/tree/main/src/providers/"
    click KS "https://github.com/unxsist/jet-pilot/blob/main/src/services/Kubernetes.ts"
    click RC "https://github.com/unxsist/jet-pilot/blob/main/src-tauri/src/main.rs"
    click ALP "https://github.com/unxsist/jet-pilot/tree/main/src-tauri/src/crates/access_log_parser/"
    click SI "https://github.com/unxsist/jet-pilot/blob/main/src-tauri/src/shell.rs"
    click KI "https://github.com/unxsist/jet-pilot/blob/main/src-tauri/src/kubernetes.rs"
    click LV "https://github.com/unxsist/jet-pilot/blob/main/src/views/StructuredLogViewer.vue"
    click SA "https://github.com/unxsist/jet-pilot/blob/main/src/views/Shell.vue"
    click PF "https://github.com/unxsist/jet-pilot/blob/main/src/components/PortForwardingManager.vue"
    click SM "https://github.com/unxsist/jet-pilot/tree/main/src/views/settings/"
```
