# neylsullivan/hazardtools architecture

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

- Interactive diagram: https://gitdiagram.com/neylsullivan/hazardtools
- Repository: https://github.com/neylsullivan/hazardtools

## Overview

##### Project Type and Purpose
- The README explicitly states that HazardTools is an “Unreal Engine plugin with a collection of developer tools.” This indicates that the project extends the Unreal Engine editor by adding additional tool modules.
- The plugin includes various developer tools such as Object Outliner enhancements, Package Flags customization, a Style Browser, and a Recent Assets button.

##### Key Components
- Configuration: Illustrate the presence of configuration through the Config directory (including FilterPlugin.ini) and any settings defined in the public headers (e.g., HazardToolsSettings.h). This indicates how the plugin can be configured.
- Submodules (Developer Tools): Break out the main tool areas into separate components:
- Object Outliner: Represent this module with its associated files (files related to ObjectOutliner, such as ObjectOutlinerFilter, ObjectOutlinerModel, SObjectOutliner, etc.), which likely handles customization of the object listing in the Unreal Editor.
- Package Flags: Represent this module with its associated source files (HazardToolsPackageFlags.cpp/h and related headers) which modify or control package-related behaviors.
- Style Browser: Represent this module with its dedicated files (files such as SStyleBrowser, StyleBrowserModel, StyleBrowserItem, and related settings files) to manage styling or theme aspects.
- Recent Assets Button: Represent this smaller module which likely integrates into the editor by adding a button for recent assets, as evidenced by its self-contained files.
- Build and Integration: Include a node for the build configuration (indicated by HazardTools.Build.cs) to show how the plugin is compiled as part of the Unreal Engine project/extension system.

##### Relationships and Interactions
- A bi-directional relationship between the Core Plugin Module and Unreal Engine. The plugin both receives events and data from, and then sends back enhanced functionality.
- How build configuration (Build.cs) impacts integration and dependency management.

##### Architectural Patterns and Design Principles
- Modular Design: The plugin is broken into distinct modules (sub-tools) that are loosely coupled but share the common framework of Unreal Engine’s extension system.
- Separation of Concerns: Each folder (e.g., ObjectOutliner, PackageFlags, StyleBrowser) contains code that is focused on a single tool or aspect of the plugin.
- Layered Integration: Clearly indicate that the lower level (configuration and build integration) supports higher-level modules that directly interact with the engine editor.
- Use clear labeling and organized grouping (e.g., grouping all files and functionalities related to Object Outliner together).

- Surround it with nodes for each of the tools (Object Outliner, Package Flags, Style Browser, Recent Assets Button).
- Optionally, include a node for “Build Integration” to represent the build scripts (HazardTools.Build.cs) and show their linkage to the overall system.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Core Plugin Subgraph
    subgraph "HazardTools Plugin (Core)"
        core_priv["Core (Private)"]:::core
        core_pub["API (Public)"]:::core
    end

    %% Configuration Subgraph
    subgraph "Configuration"
        config_ini["Config (FilterPlugin.ini)"]:::config
        settings["Settings (HazardToolsSettings.h)"]:::config
    end

    %% Submodules
    ObjectOutliner["Object Outliner –EnhancesAssetListing"]:::submodule
    PackageFlags["Package Flags –ManagePackageBehavior"]:::submodule
    StyleBrowser["Style Browser –ManageUIThemes"]:::submodule
    RecentAssets["Recent Assets Button –QuickAccess"]:::submodule

    %% Build Integration
    BuildIntegration["Build Integration (HazardTools.Build.cs)"]:::build

    %% External Unreal Engine
    UnrealEngine["Unreal Engine"]:::external

    %% Relationships from Configuration to Core Plugin and Submodules
    config_ini -->|"configures"| core_priv
    config_ini -->|"configures"| ObjectOutliner
    config_ini -->|"configures"| PackageFlags
    config_ini -->|"configures"| StyleBrowser
    config_ini -->|"configures"| RecentAssets

    settings -->|"configures"| core_pub
    settings -->|"configures"| ObjectOutliner
    settings -->|"configures"| PackageFlags
    settings -->|"configures"| StyleBrowser
    settings -->|"configures"| RecentAssets

    %% Relationships from Core Plugin to Submodules
    core_priv -->|"loads"| ObjectOutliner
    core_priv -->|"loads"| PackageFlags
    core_priv -->|"loads"| StyleBrowser
    core_priv -->|"loads"| RecentAssets

    %% Build Integration relationships
    BuildIntegration -->|"builds"| core_priv
    BuildIntegration -->|"integrates"| UnrealEngine

    %% Bidirectional Relationship with Unreal Engine
    core_priv <-->|"interacts"| UnrealEngine

    %% Styles
    classDef core fill:#a0c4ff,stroke:#000,stroke-width:2px;
    classDef submodule fill:#caffbf,stroke:#000,stroke-width:2px;
    classDef config fill:#ffd6a5,stroke:#000,stroke-width:2px;
    classDef build fill:#ffadad,stroke:#000,stroke-width:2px;
    classDef external fill:#fdffb6,stroke:#000,stroke-width:2px;

    %% Click Events
    click core_priv "https://github.com/neylsullivan/hazardtools/blob/master/Source/HazardTools/Private/HazardTools.cpp"
    click core_pub "https://github.com/neylsullivan/hazardtools/blob/master/Source/HazardTools/Public/HazardTools.h"
    click config_ini "https://github.com/neylsullivan/hazardtools/blob/master/Config/FilterPlugin.ini"
    click settings "https://github.com/neylsullivan/hazardtools/blob/master/Source/HazardTools/Public/HazardToolsSettings.h"
    click ObjectOutliner "https://github.com/neylsullivan/hazardtools/tree/master/Source/HazardTools/Private/ObjectOutliner"
    click PackageFlags "https://github.com/neylsullivan/hazardtools/tree/master/Source/HazardTools/Private/PackageFlags"
    click StyleBrowser "https://github.com/neylsullivan/hazardtools/tree/master/Source/HazardTools/Private/StyleBrowser"
    click RecentAssets "https://github.com/neylsullivan/hazardtools/tree/master/Source/HazardTools/Private/RecentAssetsButton"
    click BuildIntegration "https://github.com/neylsullivan/hazardtools/blob/master/Source/HazardTools/HazardTools.Build.cs"
```
