# community-scripts/proxmoxved architecture

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

- Interactive diagram: https://gitdiagram.com/community-scripts/proxmoxved
- Repository: https://github.com/community-scripts/proxmoxved

## Overview

##### Project type and purpose
- This is a monorepo for “ProxmoxVED Helper-Scripts” that combines:
- A library of Bash scripts (under ct/, install/, misc/, tools/, vm/) to automate Proxmox VE tasks.
- A Go-based API service (in /api) for serving or generating metadata.
- A Next.js/React frontend (under /frontend) that displays script categories, versions, and provides JSON editing.
- A set of GitHub Actions workflows (.github/workflows) for CI/CD: testing scripts, generating JSON, building and deploying components.
- The README confirms it is a development-stage, community-driven automation toolkit for Proxmox VE.

##### File structure
- Top-level directories:
- api/         → Go service for metadata or version management
- ct/, install/, misc/, tools/, vm/
→ Core Bash script modules, organized by use case (container templates, installers, shared functions, PVE tools, VM helpers)
- frontend/    → Next.js application (static JSON in public/json, TSX pages, API routes under src/app/api)
- CI/CD configuration under .github/workflows:
- script testing, JSON validation, version updates, changelog generation, Docker runner builds, etc.

##### README for additional insights
- The project is unstable and under active development.

##### Final advice
- Be very detailed: break out each script module as a sub-component.
- Essential flows: metadata generation, deployment, user interaction, script execution.
- The goal is maximum clarity for contributors, maintainers, and new engineers joining the project.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "DevOps Layer"
        Repo["GitHub Monorepo"]:::devops
        CICD["CI/CD (GitHub Actions)"]:::devops
    end

    subgraph "Script Library" 
        CT["ct (Container Templates)"]:::scripts
        INST["install (Installer Scripts)"]:::scripts
        MISC["misc (Shared Functions)"]:::scripts
        TOOLS["tools (PVE Tools)"]:::scripts
        VM["vm (VM Helper Scripts)"]:::scripts
    end

    subgraph "Backend/API Layer"
        API["Metadata API Service (Go)"]:::api
    end

    subgraph "Frontend Layer"
        FE["Frontend Web App (Next.js)"]:::frontend
        FEAPI["Frontend API Routes"]:::frontend
        JSON["Static JSON Store"]:::data
    end

    Developer["Developer"]:::external
    Browser["Browser Client"]:::external
    PVE["Proxmox VE Servers"]:::external

    Developer -->|"push code"| Repo
    Repo -->|"trigger workflows"| CICD
    CICD -->|"run shellcheck & tests"| CT
    CICD -->|"run shellcheck & tests"| INST
    CICD -->|"run shellcheck & tests"| MISC
    CICD -->|"run shellcheck & tests"| TOOLS
    CICD -->|"run shellcheck & tests"| VM
    CICD -->|"generate/update JSON"| JSON
    CICD -->|"build & deploy API"| API
    CICD -->|"build & deploy Frontend"| FE

    CT -->|"metadata scripts"| JSON
    INST -->|"metadata scripts"| JSON
    MISC -->|"shared functions"| JSON
    TOOLS -->|"tools metadata"| JSON
    VM -->|"vm helpers metadata"| JSON

    Browser -->|"view UI"| FE
    FE -->|"fetch static data"| JSON
    FE -->|"API calls"| FEAPI
    FEAPI -->|"proxy requests"| API
    Browser -->|"download scripts"| PVE

    classDef devops fill:#D8BFD8,stroke:#DDA0DD
    classDef scripts fill:#FFA500,stroke:#FF8C00
    classDef api fill:#90EE90,stroke:#32CD32
    classDef frontend fill:#ADD8E6,stroke:#1E90FF
    classDef data fill:#D3D3D3,stroke:#A9A9A9
    classDef external fill:#FFFFE0,stroke:#FFD700

    click Repo "https://github.com/community-scripts/proxmoxved/tree/main//"
    click CICD "https://github.com/community-scripts/proxmoxved/tree/main/.github/workflows/"
    click CT "https://github.com/community-scripts/proxmoxved/tree/main/ct/"
    click INST "https://github.com/community-scripts/proxmoxved/tree/main/install/"
    click MISC "https://github.com/community-scripts/proxmoxved/tree/main/misc/"
    click TOOLS "https://github.com/community-scripts/proxmoxved/tree/main/tools/"
    click VM "https://github.com/community-scripts/proxmoxved/tree/main/vm/"
    click API "https://github.com/community-scripts/proxmoxved/tree/main/api/"
    click FE "https://github.com/community-scripts/proxmoxved/tree/main/frontend/"
    click FEAPI "https://github.com/community-scripts/proxmoxved/tree/main/frontend/src/app/api/"
    click JSON "https://github.com/community-scripts/proxmoxved/tree/main/frontend/public/json/"
```
