# salemaljebaly/penpot-heroicons-plugin architecture

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

- Interactive diagram: https://gitdiagram.com/salemaljebaly/penpot-heroicons-plugin
- Repository: https://github.com/salemaljebaly/penpot-heroicons-plugin

## Overview

##### Main Components

a. Client-Side Components:
- Penpot Integration Layer (handles communication with Penpot's canvas)

b. Asset Management:
- Static Assets Store (Heroicons collection)
- Public Assets Handler

c. Build/Deploy Systems:
- Vite Build Pipeline
- Deployment Platforms (Cloudflare Pages & Netlify)

- [Deployment Layer]
- ↑↓
- [Plugin Core]
- ↑↓
- [Penpot Platform]

##### Component Relationships to Highlight

- How the plugin interfaces with Penpot's canvas API
- Build and deployment pipeline

##### Specific Elements

a. Core Components:
- Main Plugin Module (src/plugin.ts)
- Style Management (src/style.css)

b. Build/Deploy Flow:
- Vite Configuration
- Cloudflare Pages Pipeline
- Netlify Deploy Pipeline

c. Asset Management:
- Public Assets Structure

##### Important Interactions

- User Input → Search Flow
- Build Process → Deployment
- Asset Loading → Plugin Rendering

##### Technical Details to Note

- TypeScript-based architecture
- Vite as the build tool
- Multiple deployment targets
- Static asset handling

Key Considerations:

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Deployment
        CF["Cloudflare Pages"]
        NF["Netlify"]
        click CF "https://github.com/salemaljebaly/penpot-heroicons-plugin/blob/main/.github/workflows/cloudflare-pages.yml"
        click NF "https://github.com/salemaljebaly/penpot-heroicons-plugin/blob/main/.github/workflows/netlify-deploy.yml"
    end

    subgraph BuildSystem
        VT["Vite Build"]
        TS["TypeScript Config"]
        click VT "https://github.com/salemaljebaly/penpot-heroicons-plugin/blob/main/vite.config.ts"
        click TS "https://github.com/salemaljebaly/penpot-heroicons-plugin/blob/main/tsconfig.json"
    end

    subgraph PluginCore
        UI["Plugin UI Layer"]
        IMS["Icon Management System"]
        PIL["Penpot Integration Layer"]
        Style["UI Styling"]
        click UI "https://github.com/salemaljebaly/penpot-heroicons-plugin/blob/main/src/main.ts"
        click IMS "https://github.com/salemaljebaly/penpot-heroicons-plugin/blob/main/src/icons.ts"
        click PIL "https://github.com/salemaljebaly/penpot-heroicons-plugin/blob/main/src/plugin.ts"
        click Style "https://github.com/salemaljebaly/penpot-heroicons-plugin/blob/main/src/style.css"
    end

    subgraph AssetManagement
        SAS["Static Assets Store"]
        PAC["Public Assets Config"]
        subgraph IconCollections
            SI["Solid Icons"]
            OI["Outline Icons"]
        end
        click SAS "https://github.com/salemaljebaly/penpot-heroicons-plugin/tree/main/public/assets/icons/"
        click PAC "https://github.com/salemaljebaly/penpot-heroicons-plugin/blob/main/public/manifest.json"
        click SI "https://github.com/salemaljebaly/penpot-heroicons-plugin/tree/main/public/assets/icons/solid"
        click OI "https://github.com/salemaljebaly/penpot-heroicons-plugin/tree/main/public/assets/icons/outline"
    end

    subgraph PenpotPlatform
        PC["Penpot Canvas"]
        PA["Penpot API"]
    end

    %% Relationships
    UI --> IMS
    IMS --> PIL
    Style --> UI
    PIL --> PA
    PA --> PC
    
    IconCollections --> SAS
    SAS --> IMS
    PAC --> UI

    UI --> BuildSystem
    IMS --> BuildSystem
    PIL --> BuildSystem
    
    VT --> CF
    VT --> NF
    TS --> VT

    %% Styling
    classDef deployment fill:#ff9900,stroke:#333,stroke-width:2px
    classDef build fill:#ff7700,stroke:#333,stroke-width:2px
    classDef core fill:#3498db,stroke:#333,stroke-width:2px
    classDef assets fill:#9b59b6,stroke:#333,stroke-width:2px
    classDef platform fill:#2ecc71,stroke:#333,stroke-width:2px
    
    class CF,NF deployment
    class VT,TS build
    class UI,IMS,PIL,Style core
    class SAS,PAC,SI,OI assets
    class PC,PA platform
```
