# kesava-wow/kuinameplates2 architecture

> Architecture diagram of the GitHub repository kesava-wow/kuinameplates2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kesava-wow/kuinameplates2
- Repository: https://github.com/kesava-wow/kuinameplates2

## Overview

##### Main Components Organization

- Kui_Media (Asset Management)
- Kui_Nameplates (Core Functionality)
- Kui_Nameplates_Core (Base Framework)
- Kui_Nameplates_Core_Config (Configuration System)

##### Component Relationships

a) Top Level:
**Kui_Media <---- Kui_Nameplates_Core <---- Kui_Nameplates <---- Kui_Nameplates_Core_Config**

b) Internal Structure:
For each major component, create sub-containers showing:

Kui_Nameplates:
- Elements System (elements/*.lua)
- Plugin System (plugins/*.lua)
- Core Systems (addon.lua, nameplate.lua)
- Libraries (lib/)

Kui_Nameplates_Core:
- Configuration Handler (config.lua)
- Creation System (create.lua)
- Hook System (hook.lua)
- Media Resources

##### Data Flow Indicators

- Configuration data flow
- Event handling paths
- Resource loading paths
- Plugin hook points

##### Integration Points

Interfaces with:
- WoW Client API
- External libraries (LibStub, CallbackHandler, etc.)
- Custom libraries (KuiConfig, KuiSpellList)

##### Technical Details

Create callouts for:
- Element initialization flow
- Plugin loading sequence
- Configuration management
- Media asset handling

Remember to:
- Version information
- File references
- Both runtime and initialization flows
- Optional versus required components

This structure reflects the addon's modular design while showing how the components interact to create the enhanced nameplate system.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and classes
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef media fill:#2ecc71,stroke:#27ae60,color:white
    classDef config fill:#e67e22,stroke:#d35400,color:white
    classDef library fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef plugin fill:#9b59b6,stroke:#8e44ad,color:white
    classDef element fill:#1abc9c,stroke:#16a085,color:white

    %% Main Components
    subgraph KuiMedia["Kui Media (Asset Management)"]
        MediaTextures["Textures"]
        MediaFonts["Fonts"]
    end

    subgraph KuiNamplatesCore["Kui Nameplates Core (Base Framework)"]
        ConfigHandler["Configuration Handler"]
        CreationSystem["Creation System"]
        CoreHookSystem["Hook System"]
        CoreMedia["Media Resources"]
        CoreLibs["Core Libraries"]
    end

    subgraph KuiNameplates["Kui Nameplates (Core Functionality)"]
        MainCore["Main Core"]
        NameplateSystem["Nameplate System"]
        
        subgraph Elements["Elements System"]
            HealthBar["Health Bar"]
            CastBar["Cast Bar"]
            Auras["Auras"]
            ClassPowers["Class Powers"]
            Threat["Threat System"]
        end
        
        subgraph Plugins["Plugin System"]
            Animation["Animation"]
            BossMods["Boss Mods"]
            CombatToggle["Combat Toggle"]
            Fading["Fading"]
            TankMode["Tank Mode"]
        end
        
        HookSystem["Hook System"]
        ExternalLibs["External Libraries"]
    end

    subgraph KuiNameplatesConfig["Kui Nameplates Core Config"]
        MainConfig["Main Configuration"]
        CreateInterface["Creation Interface"]
        HelperFunctions["Helper Functions"]
        LocaleSystem["Localization System"]
        ConfigLibs["Configuration Libraries"]
    end

    %% Relationships
    KuiMedia --> KuiNamplatesCore
    KuiNamplatesCore --> KuiNameplates
    KuiNameplates --> KuiNameplatesConfig

    %% Click events
    click MediaTextures "https://github.com/kesava-wow/kuinameplates2/tree/master/Kui_Media/t/"
    click MediaFonts "https://github.com/kesava-wow/kuinameplates2/tree/master/Kui_Media/f/"
    click ConfigHandler "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates_Core/config.lua"
    click CreationSystem "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates_Core/create.lua"
    click CoreHookSystem "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates_Core/hook.lua"
    click CoreMedia "https://github.com/kesava-wow/kuinameplates2/tree/master/Kui_Nameplates_Core/media/"
    click CoreLibs "https://github.com/kesava-wow/kuinameplates2/tree/master/Kui_Nameplates_Core/lib/"
    click MainCore "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/addon.lua"
    click NameplateSystem "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/nameplate.lua"
    click HookSystem "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/hook.lua"
    click ExternalLibs "https://github.com/kesava-wow/kuinameplates2/tree/master/Kui_Nameplates/lib/"
    click HealthBar "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/elements/healthbar.lua"
    click CastBar "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/elements/castbar.lua"
    click Auras "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/elements/auras.lua"
    click ClassPowers "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/elements/classpowers.lua"
    click Threat "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/elements/threat.lua"
    click Animation "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/plugins/animation.lua"
    click BossMods "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/plugins/bossmods.lua"
    click CombatToggle "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/plugins/combattoggle.lua"
    click Fading "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/plugins/fading.lua"
    click TankMode "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates/plugins/tankmode.lua"
    click MainConfig "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates_Core_Config/main.lua"
    click CreateInterface "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates_Core_Config/create.lua"
    click HelperFunctions "https://github.com/kesava-wow/kuinameplates2/blob/master/Kui_Nameplates_Core_Config/helpers.lua"
    click LocaleSystem "https://github.com/kesava-wow/kuinameplates2/tree/master/Kui_Nameplates_Core_Config/locale/"
    click ConfigLibs "https://github.com/kesava-wow/kuinameplates2/tree/master/Kui_Nameplates_Core_Config/lib/"

    %% Style Applications
    class MainCore,NameplateSystem,HookSystem core
    class MediaTextures,MediaFonts,CoreMedia media
    class MainConfig,ConfigHandler,CreateInterface,HelperFunctions config
    class ExternalLibs,CoreLibs,ConfigLibs library
    class Animation,BossMods,CombatToggle,Fading,TankMode plugin
    class HealthBar,CastBar,Auras,ClassPowers,Threat element
```
