# ignacemaes/ember-phosphor-icons architecture

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

- Interactive diagram: https://gitdiagram.com/ignacemaes/ember-phosphor-icons
- Repository: https://github.com/ignacemaes/ember-phosphor-icons

## Overview

##### Main Components
– Holds the Template Registry (template-registry.ts) and the main TypeScript code that drives the component logic.
- Build and Tooling Infrastructure – Notice the “bin” folder with assembly scripts (e.g., assemble.ts), along with configuration files such as “pnpm-workspace.yaml”, “package.json”, and the various .github workflow files. These show CI/CD, packaging, and distribution pipelines.
- Test Application – The “test-app” directory acts as a sample Ember app that consumes the addon, providing integration tests and serving as a demonstration of usage.

##### Relationships and Interactions
- The test-app illustrates how an Ember application consumes the addon—showing how routing, application configuration, and tests exercise the addon components.
- CI/CD workflows in “.github/workflows” are set up to run tests, create releases, and distribute the addon, thereby integrating the development and deployment cycles.

##### Architectural Patterns and Design Principles
- Ember Addon (V2) Structure: The project follows Ember’s recommended addon format to facilitate integration with modern Ember (especially with Embroider).
- TypeScript and Glint Integration: Emphasizes type safety and IDE support for both code and templates.

##### Relevant Technologies and Frameworks
- Ember.js (v4.5+), Embroider, and ember-auto-import as essential runtime environments.
- TypeScript for static typing, with a particular focus on Glimmer components (using “.gts” files).
- Build tools and dependency management via pnpm (with “pnpm-lock.yaml” and “pnpm-workspace.yaml”).
- CI/CD pipelines configured through GitHub Actions (.github/workflows directory).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Ember Phosphor Icons Addon Core
    subgraph "Ember Phosphor Icons Addon Core"
        A1["Icon Components (ember-phosphor-icons/src/components)"]:::addonCore
        A2["Template Registry (ember-phosphor-icons/src/template-registry.ts)"]:::addonCore
        A3["Component Logic (ember-phosphor-icons/src/ph-icon.ts)"]:::addonCore
    end

    %% Build & Distribution Pipeline
    subgraph "Build & Distribution Pipeline"
        subgraph "Build Scripts"
            BS1["assemble.ts (bin)"]:::build
            BS2["ph-icon.gts (bin)"]:::build
        end
        subgraph "Configuration Files"
            CF1["pnpm-workspace.yaml"]:::build
            CF2["package.json"]:::build
            CF3[".github/workflows"]:::build
        end
    end

    %% Test Application / Consumption Layer
    subgraph "Test Application / Consumption Layer"
        T1["Test App (test-app)"]:::test
    end

    %% Relationships: Test App uses Addon Core
    T1 -->|"uses"| A1
    T1 -->|"uses"| A2
    T1 -->|"uses"| A3

    %% Relationships: Build Scripts build Addon Core
    BS1 -->|"builds"| A1
    BS1 -->|"builds"| A2
    BS1 -->|"builds"| A3
    BS2 -->|"builds"| A1
    BS2 -->|"builds"| A2
    BS2 -->|"builds"| A3

    %% Relationships: Configuration Files configure Build Scripts
    CF1 -->|"configures"| BS1
    CF2 -->|"configures"| BS1
    CF3 -->|"configures"| BS1
    CF1 -->|"configures"| BS2

    %% Click Events for Ember Addon Core Components
    click A1 "https://github.com/ignacemaes/ember-phosphor-icons/tree/main/ember-phosphor-icons/src/components"
    click A2 "https://github.com/ignacemaes/ember-phosphor-icons/blob/main/ember-phosphor-icons/src/template-registry.ts"
    click A3 "https://github.com/ignacemaes/ember-phosphor-icons/blob/main/ember-phosphor-icons/src/ph-icon.ts"

    %% Click Events for Build Scripts and Configuration Files
    click BS1 "https://github.com/ignacemaes/ember-phosphor-icons/blob/main/bin/assemble.ts"
    click BS2 "https://github.com/ignacemaes/ember-phosphor-icons/blob/main/bin/ph-icon.gts"
    click CF1 "https://github.com/ignacemaes/ember-phosphor-icons/blob/main/pnpm-workspace.yaml"
    click CF2 "https://github.com/ignacemaes/ember-phosphor-icons/blob/main/package.json"
    click CF3 "https://github.com/ignacemaes/ember-phosphor-icons/tree/main/.github/workflows"

    %% Styles
    classDef addonCore fill:#f9e79f,stroke:#e67e22,stroke-width:2px;
    classDef build fill:#d5f5e3,stroke:#27ae60,stroke-width:2px;
    classDef test fill:#d6eaf8,stroke:#2980b9,stroke-width:2px;
```
