# bookingjini-tech/bookingjini-icons architecture

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

- Interactive diagram: https://gitdiagram.com/bookingjini-tech/bookingjini-icons
- Repository: https://github.com/bookingjini-tech/bookingjini-icons

## Overview

##### Project Type & Purpose
- Key functionalities include SVG optimization (using oslllo-svg-fixer and svgo), font generation (using fantasticon), and an automated build/publishing process (via GitHub Actions).

##### Analyzing the File Structure
- Top-Level Files & Directories:
- “dist/svg”: Holds the SVGs after being processed/optimized.
- “dist/fonts”: Contains the final web font files (CSS, HTML, JSON, and TS definitions) generated by fantasticon.
- .fantasticonrc.js & svgo.config.js: Configuration files for fantasticon and svgo respectively.

##### Main Components to be Represented
a. Input Component:
b. Processing/Optimization Components:
c. Font Generation:
d. Automation & CI/CD:
e. Consumers:
- "npm Package & CDN Distribution": Show how the resulting fonts (CSS, fonts, and related files) are made accessible, emphasizing both local inclusion (via npm install) and CDN-based usage.

##### Relationships & Interactions
- Directional Flow:
- From "oslllo-svg-fixer" to "SVGO", indicating the optimized SVG output flow.
- GitHub Actions triggers the entire pipeline as an external, automated process that orchestrates these steps.

##### Architectural Patterns & Technologies
- Automated Build Pipeline: The project follows an automated pipeline where a series of scripts (defined in package.json) are executed in sequence (fix → compress → font).
- Modular Process Components: Each processing step (fixing, optimizing, and font generation) acts as an independent module that feeds into the next stage.
- Technologies and Tools:
- Node.js (runtime environment)
- oslllo-svg-fixer for formatting fixes
- svgo for SVG optimization (with a detailed configuration)
- fantasticon for converting SVGs to web fonts
- GitHub Actions to automate the workflow

##### Final Remarks for the Engineer
- The goal is to capture every essential element, from raw input through automated processing to final publishing/distribution. Even if some components seem small, representing them makes the overall architecture clearer.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Icon Processing Pipeline"
        svgSource["SVG Source (src/svg)"]:::blueBox
        svgFixer["SVG Fixer (oslllo-svg-fixer)"]:::greenBox
        svgo["SVGO (SVG Optimization)"]:::greenBox
        fantasticon["Fantasticon (Font Generation)"]:::greenBox
        distribution["Distribution (npm & CDN)"]:::blueBox
    end
    githubActions["GitHub Actions Workflow (CI/CD)"]:::orangeBox

    githubActions -->|"triggers"| svgFixer
    svgSource -->|"feeds"| svgFixer
    svgFixer -->|"outputs"| svgo
    svgo -->|"converts"| fantasticon
    fantasticon -->|"generates"| distribution

    click svgSource "https://github.com/bookingjini-tech/bookingjini-icons/tree/main/src/svg"
    click svgFixer "https://github.com/bookingjini-tech/bookingjini-icons/blob/main/package.json"
    click svgo "https://github.com/bookingjini-tech/bookingjini-icons/blob/main/svgo.config.js"
    click fantasticon "https://github.com/bookingjini-tech/bookingjini-icons/blob/main/.fantasticonrc.js"
    click githubActions "https://github.com/bookingjini-tech/bookingjini-icons/blob/main/.github/workflows/icon-build.yml"
    click distribution "https://github.com/bookingjini-tech/bookingjini-icons/tree/main/dist/fonts"

    classDef blueBox fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef greenBox fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef orangeBox fill:#ffeeba,stroke:#856404,stroke-width:2px;
```
