# jhn-git/layerbounce architecture

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

- Interactive diagram: https://gitdiagram.com/jhn-git/layerbounce
- Repository: https://github.com/jhn-git/layerbounce

## Overview

##### Main Components

a. Core System Components:
- Core Handler (represented by Layerbounce_Handlers_Core.lua)
- Event System (represented by Layerbounce_Handlers_Events.lua)
- Configuration Module (represented by Layerbounce_Config.lua)
- AFK Handler (represented by Layerbounce_Handlers_AFK.lua)
- Invite Handler (represented by Layerbounce_Handlers_Invite.lua)

b. UI Components:
- Minimap Button Interface
- Status Indicators (using GreenButton.tga and RedButton.tga)

c. WoW Game Client Integration Point

##### Component Relationships

- Event Handler → Core Handler (event propagation)
- Core Handler → Invite Handler (layer switching requests)
- Core Handler → AFK Handler (player status monitoring)
- Configuration Module ↔ All Components (settings distribution)
- UI Elements → Core Handler (user interactions)

Create distinct sections for:
- User Interface Layer
- Business Logic Layer
- Game Integration Layer

##### Additional Elements

Annotations for:
- File dependencies
- Event types handled
- Configuration parameters
- State transitions

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles
    classDef ui fill:#90EE90,stroke:#333,stroke-width:2px
    classDef core fill:#ADD8E6,stroke:#333,stroke-width:2px
    classDef config fill:#FFD700,stroke:#333,stroke-width:2px
    classDef handler fill:#FFA500,stroke:#333,stroke-width:2px
    classDef external fill:#D3D3D3,stroke:#333,stroke-width:2px

    %% UI Layer
    subgraph UI
        MM["Minimap Button"]:::ui
        SI["Status Indicators"]:::ui
        MI["Main Interface"]:::ui
    end

    %% Core Layer
    subgraph Core
        CH["Core Handler"]:::core
        ES["Event System"]:::core
        CM["Configuration Module"]:::config
        AH["AFK Handler"]:::handler
        IH["Invite Handler"]:::handler
    end

    %% Game Integration Layer
    WC["WoW Client"]:::external

    %% Relationships
    MM --> CH
    SI --> CH
    MI --> CH
    ES --> CH
    CH --> IH
    CH --> AH
    CM --> CH
    CM --> ES
    CM --> AH
    CM --> IH
    CH --> WC
    WC --> ES

    %% Click Events
    click CH "https://github.com/Jhn-git/Layerbounce/blob/main/Layerbounce_Handlers_Core.lua"
    click ES "https://github.com/Jhn-git/Layerbounce/blob/main/Layerbounce_Handlers_Events.lua"
    click CM "https://github.com/Jhn-git/Layerbounce/blob/main/Layerbounce_Config.lua"
    click AH "https://github.com/Jhn-git/Layerbounce/blob/main/Layerbounce_Handlers_AFK.lua"
    click IH "https://github.com/Jhn-git/Layerbounce/blob/main/Layerbounce_Handlers_Invite.lua"
    click SI "https://github.com/Jhn-git/Layerbounce/blob/main/textures/GreenButton.tga"
    click MI "https://github.com/Jhn-git/Layerbounce/blob/main/Layerbounce.lua"

    %% Legend
    subgraph Legend
        UI_L["UI Components"]:::ui
        CORE_L["Core Components"]:::core
        CONFIG_L["Configuration"]:::config
        HANDLER_L["Handlers"]:::handler
        EXT_L["External Systems"]:::external
    end
```
