# cvolton/betterinfo-geode architecture

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

- Interactive diagram: https://gitdiagram.com/cvolton/betterinfo-geode
- Repository: https://github.com/cvolton/betterinfo-geode

## Overview

##### Project type and purpose
- This is a native C++ “mod” plugin for an existing game (likely Geometry Dash based on symbol names such as GJBaseGameLayer, GJLevelList, etc.).
- Its purpose is to hook into the game’s UI and logic layers, enrich level-info, leaderboards, search, and reward history, and surface “better info” via custom UI panels.

##### File structure
- CMakeLists.txt + .github/workflows/build.yml – shows it’s built via CMake and CI.
- src/hooks – modules that intercept or extend game code paths.
- src/layers – custom UI panels and popups inserted into the game’s scene graph.
- src/delegates – dialog/result handlers for asynchronous or modal UI interactions.
- src/managers – standalone subsystems for JSON caching, online lookups, scheduling, and statistics.
- src/integrations – connectors into other mods or external event systems (eclipse, qolmod, ServerAPIEvents).
- src/objects, src/ui, src/utils – shared data types, UI primitives, and utility functions.
- Top-level resources & metadata (mod.json, about.md, changelog.md) define mod metadata and assets.

##### README for additional insights
- The README is minimal (“This is where she makes a mod.”) – architectural details must be inferred entirely from the file tree and naming conventions.

##### Be detailed but focused
- JSON→Cache→Online flow explicitly, as well as the Hook→UI invocation path.

## Diagram (Mermaid)

```mermaid
graph TB
    %% External Host
    GameHost["Game Host (C++ Engine)"]:::external

    %% Core Integration
    subgraph "Core Integration"
        direction TB
        ModLoader["Mod Loader/Injector"]:::core
        HookFramework["Hooking Framework"]:::core
    end

    %% Hooks Module
    subgraph "Hooks Module"
        direction TB
        GJBaseGameLayer["GJBaseGameLayer Hooks"]:::core
        GameLevelManager["GameLevelManager Hooks"]:::core
        InfoLayer["InfoLayer Hooks"]:::core
        DosPuntoDosLength["DosPuntoDosLength Bugfix"]:::core
    end

    %% Business Logic
    subgraph "Managers & Utils"
        direction TB
        BaseJsonManager["BaseJsonManager"]:::logic
        BetterInfoCache["BetterInfoCache Cache"]:::logic
        BetterInfoOnline["BetterInfoOnline Service"]:::logic
        BetterInfoScheduler["BetterInfoScheduler"]:::logic
        BetterInfoStats["BetterInfoStats"]:::logic
        subgraph "Utility Library"
            direction TB
            Utils["Utils"]:::logic
            TimeUtils["TimeUtils"]:::logic
            ServerUtils["ServerUtils"]:::logic
            LevelUtils["LevelUtils"]:::logic
            BISearchObject["BISearchObject"]:::logic
            Enums["Enums"]:::logic
        end
    end

    %% Presentation Layer
    subgraph "UI Layer & Delegates"
        direction TB
        subgraph "UI Layers"
            BIBaseLayer["BIBaseLayer"]:::pres
            BIViewLayer["BIViewLayer"]:::pres
            CustomLevelSearchLayer["CustomLevelSearchLayer"]:::pres
            CreatorInfoPopup["CreatorInfoPopup"]:::pres
            RewardViewLayer["RewardViewLayer"]:::pres
        end
        subgraph "UI Primitives"
            CopyableLabel["CopyableLabel"]:::pres
            DoubleArrow["DoubleArrow"]:::pres
            FolderButton["FolderButton"]:::pres
            EnumSelectNode["EnumSelectNode"]:::pres
        end
        subgraph "Delegates"
            BILeaderboardDelegate["BILeaderboardDelegate"]:::pres
            BISearchObjectDelegate["BISearchObjectDelegate"]:::pres
            DialogCloseDelegate["DialogCloseDelegate"]:::pres
            EnumSelectDelegate["EnumSelectDelegate"]:::pres
        end
    end

    %% Integrations
    subgraph "Integrations Module"
        direction TB
        EclipseInt["Eclipse Integration"]:::logic
        QOLModInt["QOLMod Integration"]:::logic
        ServerAPIEvents["ServerAPIEvents"]:::logic
    end

    %% External Services and Mods
    ExternalServices["Server API"]:::external
    OtherMods["Other Mods (QOLMod, Eclipse)"]:::external

    %% Resources
    Resources["Resources & Config"]:::external

    %% Connections
    GameHost --> ModLoader
    ModLoader --> HookFramework
    HookFramework --> GJBaseGameLayer
    HookFramework --> GameLevelManager
    HookFramework --> InfoLayer
    HookFramework --> DosPuntoDosLength

    GJBaseGameLayer --> BaseJsonManager
    GameLevelManager --> BetterInfoCache
    InfoLayer --> BetterInfoOnline
    DosPuntoDosLength --> BetterInfoScheduler

    BetterInfoCache --> BetterInfoOnline
    BetterInfoOnline --> ExternalServices
    BetterInfoScheduler --> BetterInfoStats

    BaseJsonManager --> BIBaseLayer
    BetterInfoOnline --> BIViewLayer

    BIBaseLayer --> BILeaderboardDelegate
    BIViewLayer --> BISearchObjectDelegate
    CustomLevelSearchLayer --> DialogCloseDelegate
    CreatorInfoPopup --> EnumSelectDelegate
    RewardViewLayer --> BetterInfoStats

    BILeaderboardDelegate --> BetterInfoCache
    BISearchObjectDelegate --> BaseJsonManager
    DialogCloseDelegate --> BetterInfoScheduler
    EnumSelectDelegate --> BetterInfoOnline

    EclipseInt --> OtherMods
    QOLModInt --> OtherMods
    ServerAPIEvents --> ExternalServices

    HookFramework --> EclipseInt
    HookFramework --> QOLModInt
    HookFramework --> ServerAPIEvents

    BIBaseLayer --> CopyableLabel
    BIViewLayer --> DoubleArrow
    CustomLevelSearchLayer --> FolderButton
    CreatorInfoPopup --> EnumSelectNode

    Resources --- ModLoader

    %% Click Events
    click ModLoader "https://github.com/cvolton/betterinfo-geode/blob/master/src/main.cpp"
    click ModLoader "https://github.com/cvolton/betterinfo-geode/blob/master/CMakeLists.txt"
    click ModLoader "https://github.com/cvolton/betterinfo-geode/blob/master/.github/workflows/build.yml"
    click GJBaseGameLayer "https://github.com/cvolton/betterinfo-geode/blob/master/src/hooks/GJBaseGameLayer.cpp"
    click GameLevelManager "https://github.com/cvolton/betterinfo-geode/blob/master/src/hooks/GameLevelManager.cpp"
    click InfoLayer "https://github.com/cvolton/betterinfo-geode/blob/master/src/hooks/InfoLayer.cpp"
    click DosPuntoDosLength "https://github.com/cvolton/betterinfo-geode/blob/master/src/hooks/bugfixes/DosPuntoDosLength.cpp"
    click BIBaseLayer "https://github.com/cvolton/betterinfo-geode/blob/master/src/layers/_bases/BIBaseLayer.cpp"
    click BIViewLayer "https://github.com/cvolton/betterinfo-geode/blob/master/src/layers/_bases/BIViewLayer.cpp"
    click CustomLevelSearchLayer "https://github.com/cvolton/betterinfo-geode/blob/master/src/layers/CustomLevelSearchLayer.cpp"
    click CreatorInfoPopup "https://github.com/cvolton/betterinfo-geode/blob/master/src/layers/CreatorInfoPopup.cpp"
    click RewardViewLayer "https://github.com/cvolton/betterinfo-geode/blob/master/src/layers/RewardHistory/RewardViewLayer.cpp"
    click BILeaderboardDelegate "https://github.com/cvolton/betterinfo-geode/blob/master/src/delegates/BILeaderboardDelegate.h"
    click BISearchObjectDelegate "https://github.com/cvolton/betterinfo-geode/blob/master/src/delegates/BISearchObjectDelegate.h"
    click DialogCloseDelegate "https://github.com/cvolton/betterinfo-geode/blob/master/src/delegates/DialogCloseDelegate.h"
    click EnumSelectDelegate "https://github.com/cvolton/betterinfo-geode/blob/master/src/delegates/EnumSelectDelegate.h"
    click BaseJsonManager "https://github.com/cvolton/betterinfo-geode/blob/master/src/managers/BaseJsonManager.cpp"
    click BetterInfoCache "https://github.com/cvolton/betterinfo-geode/blob/master/src/managers/BetterInfoCache.cpp"
    click BetterInfoOnline "https://github.com/cvolton/betterinfo-geode/blob/master/src/managers/BetterInfoOnline.cpp"
    click BetterInfoScheduler "https://github.com/cvolton/betterinfo-geode/blob/master/src/managers/BetterInfoScheduler.cpp"
    click BetterInfoStats "https://github.com/cvolton/betterinfo-geode/blob/master/src/managers/BetterInfoStats.cpp"
    click EclipseInt "https://github.com/cvolton/betterinfo-geode/blob/master/src/integrations/eclipse.cpp"
    click EclipseInt "https://github.com/cvolton/betterinfo-geode/blob/master/src/integrations/eclipse.hpp"
    click QOLModInt "https://github.com/cvolton/betterinfo-geode/blob/master/src/integrations/qolmod.cpp"
    click QOLModInt "https://github.com/cvolton/betterinfo-geode/blob/master/src/integrations/qolmod.hpp"
    click ServerAPIEvents "https://github.com/cvolton/betterinfo-geode/blob/master/src/integrations/ServerAPIEvents.hpp"
    click Utils "https://github.com/cvolton/betterinfo-geode/blob/master/src/utils.cpp"
    click Utils "https://github.com/cvolton/betterinfo-geode/blob/master/src/utils.hpp"
    click TimeUtils "https://github.com/cvolton/betterinfo-geode/blob/master/src/utils/TimeUtils.cpp"
    click TimeUtils "https://github.com/cvolton/betterinfo-geode/blob/master/src/utils/TimeUtils.h"
    click ServerUtils "https://github.com/cvolton/betterinfo-geode/blob/master/src/utils/ServerUtils.cpp"
    click ServerUtils "https://github.com/cvolton/betterinfo-geode/blob/master/src/utils/ServerUtils.h"
    click LevelUtils "https://github.com/cvolton/betterinfo-geode/blob/master/src/utils/LevelUtils.cpp"
    click LevelUtils "https://github.com/cvolton/betterinfo-geode/blob/master/src/utils/LevelUtils.h"
    click BISearchObject "https://github.com/cvolton/betterinfo-geode/blob/master/src/objects/BISearchObject.h"
    click Enums "https://github.com/cvolton/betterinfo-geode/blob/master/src/enums.hpp"
    click CopyableLabel "https://github.com/cvolton/betterinfo-geode/blob/master/src/ui/CopyableLabel.cpp"
    click CopyableLabel "https://github.com/cvolton/betterinfo-geode/blob/master/src/ui/CopyableLabel.h"
    click DoubleArrow "https://github.com/cvolton/betterinfo-geode/blob/master/src/ui/DoubleArrow.cpp"
    click DoubleArrow "https://github.com/cvolton/betterinfo-geode/blob/master/src/ui/DoubleArrow.h"
    click FolderButton "https://github.com/cvolton/betterinfo-geode/blob/master/src/ui/FolderButton.cpp"
    click FolderButton "https://github.com/cvolton/betterinfo-geode/blob/master/src/ui/FolderButton.h"
    click EnumSelectNode "https://github.com/cvolton/betterinfo-geode/blob/master/src/ui/EnumSelectNode.h"
    click Resources "https://github.com/cvolton/betterinfo-geode/blob/master/mod.json"
    click Resources "https://github.com/cvolton/betterinfo-geode/blob/master/about.md"
    click Resources "https://github.com/cvolton/betterinfo-geode/blob/master/changelog.md"
    click Resources "https://github.com/cvolton/betterinfo-geode/tree/master/resources/"

    %% Styles
    classDef core fill:#ADD8E6,stroke:#000
    classDef logic fill:#90EE90,stroke:#000
    classDef pres fill:#FFA500,stroke:#000
    classDef external fill:#D3D3D3,stroke:#000
```
