# kanopi/saplings architecture

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

- Interactive diagram: https://gitdiagram.com/kanopi/saplings
- Repository: https://github.com/kanopi/saplings

## Overview

##### Main Components

a. Core Components:
- Saplings Base System
- Content Management Layer
- Administrative Interface
- Media Management System
- Theme System
- Testing Framework

b. Sub-recipes Layer:
- Gin Admin Experience
- Saplings Base
- Saplings Editorial
- Saplings Launch
- Saplings Tests (Cypress)
- Saplings Content Types

##### Additional Elements

- Configuration Management
- Custom Modules (saplings_custom, saplings_paragraphs)
- Third-party Integrations

##### Notes for Implementation

- Use standardized UML or similar notation
- Version indicators for major components
- Clear boundaries between different sub-systems
- Points where future extensions (Phase 2 & 3) will connect

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph UI
        GinAdmin["Gin Admin Experience"]
        SaplingsTheme["Saplings Child Theme"]
        Frontend["Frontend Interface"]
    end

    subgraph ContentManagement
        CMS["Content Management System"]:::cms
        ContentTypes["Content Types"]:::content
        EditSystem["Editorial System"]
        CompTypes["Component Types"]:::component
        MediaMgmt["Media Management"]:::media
        TaxSystem["Taxonomy System"]:::taxonomy
        MenuSys["Menu System"]:::menu
    end

    subgraph CoreFunctionality
        BaseConfig["Base Configuration"]:::config
        ParagraphSys["Paragraph Systems"]
        ImageMagick["ImageMagick Config"]
        CustomModules["Custom Modules"]
    end

    subgraph Infrastructure
        Testing["Cypress Testing"]
        LaunchConfig["Launch Configuration"]
        BaseSystem["Base System Config"]
    end

    subgraph AddOns
        LangSwitch["Language Switcher"]:::addon
        MegaMenu["Mega Menu"]:::addon
        Search["Search System"]:::addon
    end

    subgraph RecipeSystem
        Recipe["Recipe Manager"]:::recipe
        Dependencies["Recipe Dependencies"]
    end

    %% Relationships
    GinAdmin --> CMS
    Frontend --> CMS
    SaplingsTheme --> Frontend

    CMS --> ContentTypes
    CMS --> EditSystem
    CMS --> CompTypes
    CMS --> MediaMgmt
    CMS --> TaxSystem
    CMS --> MenuSys

    BaseConfig --> ParagraphSys
    BaseConfig --> ImageMagick
    BaseConfig --> CustomModules

    Recipe --> Dependencies
    Recipe --> BaseConfig

    AddOns --> CMS

    Testing --> BaseSystem
    LaunchConfig --> BaseSystem

    %% Click Events
    click ContentTypes "https://github.com/kanopi/saplings/blob/main/docs/content-types.md"
    click MediaMgmt "https://github.com/kanopi/saplings/blob/main/docs/media.md"
    click CompTypes "https://github.com/kanopi/saplings/blob/main/docs/components.md"
    click TaxSystem "https://github.com/kanopi/saplings/blob/main/docs/taxonomies.md"
    click MenuSys "https://github.com/kanopi/saplings/blob/main/docs/menus.md"
    click LangSwitch "https://github.com/kanopi/saplings/blob/main/docs/add-on-language-switcher.md"
    click MegaMenu "https://github.com/kanopi/saplings/blob/main/docs/add-on-mega-menu.md"
    click Search "https://github.com/kanopi/saplings/blob/main/docs/add-on-search.md"
    click Recipe "https://github.com/kanopi/saplings/blob/main/docs/recipes-introduction.md"
    click BaseConfig "https://github.com/kanopi/saplings/blob/main/composer.json"

    %% Styling
    classDef cms fill:#3498db
    classDef content fill:#2ecc71
    classDef component fill:#e74c3c
    classDef media fill:#9b59b6
    classDef taxonomy fill:#f1c40f
    classDef menu fill:#e67e22
    classDef config fill:#95a5a6
    classDef addon fill:#1abc9c
    classDef recipe fill:#34495e

    %% Legend
    subgraph Legend
        L1["CMS Components"]:::cms
        L2["Content Components"]:::content
        L3["Component System"]:::component
        L4["Media System"]:::media
        L5["Taxonomy"]:::taxonomy
        L6["Menu System"]:::menu
        L7["Configuration"]:::config
        L8["Add-ons"]:::addon
        L9["Recipe System"]:::recipe
    end
```
