# schiavoanto/homp-ultimate architecture

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

- Interactive diagram: https://gitdiagram.com/schiavoanto/homp-ultimate
- Repository: https://github.com/schiavoanto/homp-ultimate

## Overview

##### Main Components

A. User Interface Layer (Presentation)
- MainWindow (primary interface)
- BigInputBox (custom input dialog)
- InputBox (standard input dialog)
- ListItem (playlist item representation)
- SussyWindow (auxiliary window)
- Use rectangles with rounded corners for UI components

B. Core Components Layer
- Playlist Manager (from Playlist.cs)
- Utils (utility functions)
- KeyboardHook (keyboard input handling)

C. Hotkey System Layer
- GlobalHotkeys
- Constants

##### Relationships and Interactions

B. Include data flow indicators:
- Media file handling paths
- User input processing flow
- Hotkey event propagation

##### External Dependencies
- A container for WPF Framework
- System-level interactions for media playback
- File system interactions for playlist management

##### Technical Details

A. Framework Information:
- .NET Framework (specified in App.config)
- WPF UI Framework
- Native Windows API hooks (for global hotkeys)

B. Component Communication:
- Event-based communication patterns
- XAML-based UI architecture
- Command pattern for hotkey handling

##### Additional Elements

- A "Styles and Resources" section showing CommonStyles.xaml
- An "Assets" container for media resources
- Configuration management flow
- Persistence mechanisms for settings

##### Architectural Patterns to Highlight

- Event-driven architecture for media playback
- Service locator pattern for global hotkey management
- UI composition pattern for custom controls
- Resource management pattern for media handling

Remember to:
- Use consistent notation throughout
- Version information
- Notes about the restructure branch mentioned in the README
- Document any platform-specific dependencies

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef ui fill:#e1f5fe,stroke:#01579b
    classDef core fill:#e8f5e9,stroke:#1b5e20
    classDef hotkey fill:#fff3e0,stroke:#e65100
    classDef config fill:#f3e5f5,stroke:#4a148c
    classDef framework fill:#fafafa,stroke:#212121
    classDef resource fill:#fff8e1,stroke:#ff6f00

    %% Framework Layer
    subgraph Framework
        WPF["WPF Framework"]:::framework
        WIN["Windows API"]:::framework
    end

    %% UI Layer
    subgraph UI["User Interface Layer"]
        MW["Main Window"]:::ui
        BIB["Big Input Box"]:::ui
        IB["Input Box"]:::ui
        LI["List Item"]:::ui
        SW["Sussy Window"]:::ui
        CS["Common Styles"]:::resource
    end

    %% Core Layer
    subgraph Core["Core Components"]
        PM["Playlist Manager"]:::core
        UT["Utils"]:::core
        KH["Keyboard Hook"]:::core
    end

    %% Hotkey System
    subgraph Hotkeys["Hotkey System"]
        GH["Global Hotkeys"]:::hotkey
        CN["Constants"]:::hotkey
    end

    %% Configuration
    subgraph Config["Configuration"]
        AC["App Config"]:::config
        SM["Settings Manager"]:::config
        APP["App Entry"]:::config
    end

    %% Relationships
    MW --> PM
    MW --> KH
    BIB --> UT
    IB --> UT
    LI --> PM
    SW --> UT
    PM --> UT
    KH --> GH
    GH --> CN
    APP --> WPF
    KH --> WIN
    CS --> MW
    CS --> BIB
    CS --> IB
    CS --> LI
    CS --> SW
    AC --> APP
    SM --> APP

    %% Click Events
    click MW "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/MainWindow.xaml"
    click BIB "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/BigInputBox.xaml"
    click IB "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/InputBox.xaml"
    click LI "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/ListItem.xaml"
    click SW "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/SussyWindow.xaml"
    click PM "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/Playlist.cs"
    click UT "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/Utils.cs"
    click KH "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/KeyboardHook.cs"
    click GH "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/WPFHotkeys/WPFHotkeys/WPFHotkeys/GlobalHotkeys.cs"
    click CN "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/WPFHotkeys/WPFHotkeys/WPFHotkeys/Constants.cs"
    click CS "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/CommonStyles.xaml"
    click AC "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/App.config"
    click SM "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/Properties/Settings.settings"
    click APP "https://github.com/SchiavoAnto/homp-ultimate/blob/restructure/CustomMediaPlayerUltimate/CustomMediaPlayerUltimate/App.xaml"
```
