# hgalexx/hg-unit-frames architecture

> Architecture diagram of the GitHub repository hgalexx/hg-unit-frames, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hgalexx/hg-unit-frames
- Repository: https://github.com/hgalexx/hg-unit-frames

## Overview

Hg Unit Frames is a modular World of Warcraft addon that recreates Perl-style unit frames. Its main user workflow is to configure displays and presets, arrange or preview frames in positioning mode, then use the enabled frames to monitor player, pet, target, focus, and party information. The README documents capabilities but no source excerpts were provided, so the graph includes only documented relationships; it does not infer internal calls or undocumented wiring.

Main entry points: [`Hg_Rebirth/Config.lua`](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/Config.lua) (Addon settings), [`Hg_Rebirth/PreviewInspector.lua`](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/PreviewInspector.lua) (Positioning and preview), [`Hg_Rebirth_Player/Player.lua`](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Player/Player.lua) (Player frame), [`Hg_Rebirth_Target/Target.lua`](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Target/Target.lua) (Target frame)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Configuration and presets"]
  node_settings["Addon settings<br/>[Config.lua]"]
  node_database[("Character settings<br/>[Database.lua]")]
  node_presets["Presets and rules<br/>[Presets.lua]"]
  node_position["Positioning and preview"]
  node_sticky["Sticky links<br/>[Sticky.lua]"]
end

subgraph group_primary["Player and target displays"]
  node_player["Player frame<br/>[Player.lua]"]
  node_target["Target frame<br/>[Target.lua]"]
end

subgraph group_related["Related unit displays"]
  node_focus["Focus frame<br/>[Focus.lua]"]
  node_playerpet["Player pet frame<br/>[PlayerPet.lua]"]
  node_targettarget["Target of target<br/>[TargetTarget.lua]"]
  node_focustarget["Focus target<br/>[FocusTarget.lua]"]
  node_party["Party frames<br/>[Party.lua]"]
  node_partypet["Party pet frames<br/>[PartyPet.lua]"]
  node_partytarget["Party target frames<br/>[PartyTarget.lua]"]
end

subgraph group_extras["Auras and cast bars"]
  node_playeraura["Player auras<br/>[PlayerAura.lua]"]
  node_targetaura["Target auras<br/>[TargetAura.lua]"]
  node_focusaura["Focus auras<br/>[FocusAura.lua]"]
  node_auras["Aura support<br/>[Aura.lua]"]
  node_castbars["Cast bars<br/>[Castbars.lua]"]
end

node_user(("WoW player"))
node_wow{{"WoW game state"}}

node_user -->|"configures"| node_settings
node_user -->|"arranges"| node_position
node_settings -->|"per-character settings"| node_database
node_settings -->|"configures"| node_presets
node_presets -->|"preset options"| node_settings
node_position -->|"previews layouts"| node_player
node_position -->|"previews layouts"| node_target
node_wow -->|"supplies player data"| node_player
node_wow -->|"supplies target data"| node_target
node_wow -->|"supplies focus data"| node_focus
node_wow -->|"supplies pet data"| node_playerpet
node_wow -->|"supplies party data"| node_party
node_wow -->|"supplies pet data"| node_partypet
node_wow -->|"supplies target data"| node_partytarget
node_wow -->|"supplies target data"| node_targettarget
node_wow -->|"supplies target data"| node_focustarget
node_settings -->|"configures"| node_player
node_settings -->|"configures"| node_target
node_settings -->|"configures"| node_focus
node_settings -->|"configures"| node_party
node_settings -->|"configures"| node_playeraura
node_settings -->|"configures"| node_targetaura
node_settings -->|"configures"| node_focusaura
node_settings -->|"configures"| node_castbars

click node_settings "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/Config.lua"
click node_database "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/Database.lua"
click node_presets "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/Presets.lua"
click node_position "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/PreviewInspector.lua"
click node_sticky "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/Sticky.lua"
click node_player "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Player/Player.lua"
click node_target "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Target/Target.lua"
click node_focus "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Focus/Focus.lua"
click node_playerpet "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Player_Pet/PlayerPet.lua"
click node_targettarget "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Target_Target/TargetTarget.lua"
click node_focustarget "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Focus_Target/FocusTarget.lua"
click node_party "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Party/Party.lua"
click node_partypet "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Party_Pet/PartyPet.lua"
click node_partytarget "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Party_Target/PartyTarget.lua"
click node_playeraura "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Player_Aura/PlayerAura.lua"
click node_targetaura "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Target_Aura/TargetAura.lua"
click node_focusaura "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Focus_Aura/FocusAura.lua"
click node_auras "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Aura/Aura.lua"
click node_castbars "https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Castbars/Castbars.lua"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_settings,node_database,node_presets,node_position,node_sticky toneBlue
class node_player,node_target toneAmber
class node_focus,node_playerpet,node_targettarget,node_focustarget,node_party,node_partypet,node_partytarget toneMint
class node_playeraura,node_targetaura,node_focusaura,node_auras,node_castbars toneRose
class node_user,node_wow toneIndigo
```

## Components

### Configuration and presets

- [Addon settings](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/Config.lua): `Hg_Rebirth/Config.lua`
- [Character settings](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/Database.lua): `Hg_Rebirth/Database.lua`
- [Presets and rules](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/Presets.lua): `Hg_Rebirth/Presets.lua`
- [Positioning and preview](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/PreviewInspector.lua): `Hg_Rebirth/PreviewInspector.lua`
- [Sticky links](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth/Sticky.lua): `Hg_Rebirth/Sticky.lua`

### Player and target displays

- [Player frame](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Player/Player.lua): `Hg_Rebirth_Player/Player.lua`
- [Target frame](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Target/Target.lua): `Hg_Rebirth_Target/Target.lua`

### Related unit displays

- [Focus frame](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Focus/Focus.lua): `Hg_Rebirth_Focus/Focus.lua`
- [Player pet frame](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Player_Pet/PlayerPet.lua): `Hg_Rebirth_Player_Pet/PlayerPet.lua`
- [Target of target](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Target_Target/TargetTarget.lua): `Hg_Rebirth_Target_Target/TargetTarget.lua`
- [Focus target](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Focus_Target/FocusTarget.lua): `Hg_Rebirth_Focus_Target/FocusTarget.lua`
- [Party frames](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Party/Party.lua): `Hg_Rebirth_Party/Party.lua`
- [Party pet frames](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Party_Pet/PartyPet.lua): `Hg_Rebirth_Party_Pet/PartyPet.lua`
- [Party target frames](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Party_Target/PartyTarget.lua): `Hg_Rebirth_Party_Target/PartyTarget.lua`

### Auras and cast bars

- [Player auras](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Player_Aura/PlayerAura.lua): `Hg_Rebirth_Player_Aura/PlayerAura.lua`
- [Target auras](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Target_Aura/TargetAura.lua): `Hg_Rebirth_Target_Aura/TargetAura.lua`
- [Focus auras](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Focus_Aura/FocusAura.lua): `Hg_Rebirth_Focus_Aura/FocusAura.lua`
- [Aura support](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Aura/Aura.lua): `Hg_Rebirth_Aura/Aura.lua`
- [Cast bars](https://github.com/hgalexx/hg-unit-frames/blob/main/Hg_Rebirth_Castbars/Castbars.lua): `Hg_Rebirth_Castbars/Castbars.lua`

### Other components

- **WoW player**
- **WoW game state**

## Connections

- WoW player → Addon settings: configures (evidence: `README.md`)
- WoW player → Positioning and preview: arranges (evidence: `README.md`)
- Addon settings → Character settings: per-character settings (evidence: `README.md`)
- Addon settings → Presets and rules: configures (evidence: `README.md`)
- Presets and rules → Addon settings: preset options (evidence: `README.md`)
- Positioning and preview → Player frame: previews layouts (evidence: `README.md`)
- Positioning and preview → Target frame: previews layouts (evidence: `README.md`)
- WoW game state → Player frame: supplies player data (evidence: `README.md`)
- WoW game state → Target frame: supplies target data (evidence: `README.md`)
- WoW game state → Focus frame: supplies focus data (evidence: `README.md`)
- WoW game state → Player pet frame: supplies pet data (evidence: `README.md`)
- WoW game state → Party frames: supplies party data (evidence: `README.md`)
- WoW game state → Party pet frames: supplies pet data (evidence: `README.md`)
- WoW game state → Party target frames: supplies target data (evidence: `README.md`)
- WoW game state → Target of target: supplies target data (evidence: `README.md`)
- WoW game state → Focus target: supplies target data (evidence: `README.md`)
- Addon settings → Player frame: configures (evidence: `README.md`)
- Addon settings → Target frame: configures (evidence: `README.md`)
- Addon settings → Focus frame: configures (evidence: `README.md`)
- Addon settings → Party frames: configures (evidence: `README.md`)
- Addon settings → Player auras: configures (evidence: `README.md`)
- Addon settings → Target auras: configures (evidence: `README.md`)
- Addon settings → Focus auras: configures (evidence: `README.md`)
- Addon settings → Cast bars: configures (evidence: `README.md`)
