# ubehrmann/multiplicativepersistence architecture

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

- Interactive diagram: https://gitdiagram.com/ubehrmann/multiplicativepersistence
- Repository: https://github.com/ubehrmann/multiplicativepersistence

## Overview

##### Core Components
- User Interface Layer
- MainWindow and MP_Window as sub-components
- Computation Layer
- MultiplicativePersistence module
- MPType definitions
- Data Management Layer
- JSON data handling
- File I/O operations

##### External Dependencies
- Dear ImGui
- GLFW
- JSON library

- [UI Layer]
- ↓ ↑
- [Computation Layer]
- ↓ ↑
- [Data Layer]

##### Detailed Component Breakdown

UI Layer (Blue):
- [MainWindow] ← → [MP_Window]
- ↓
- [ImGui/GLFW Interface]

Parallel to:
- [ConsoleOutput]

Computation Layer (Green):
- [MultiplicativePersistence]
- ↓
- [MPType Definitions]

Data Layer (Yellow):
- [DataManagement]
- ↓
- [JSON Handler]

##### Important Relationships
- File I/O operations connecting DataManagement to external storage

##### Technical Details
- Data type limitations (ullong_max)
- File formats supported (JSON)
- UI framework dependencies

##### The external dependency management

This will give a complete picture of the system while highlighting both current functionality and planned improvements.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Interface Layer"
        UI["Base UI"]
        MainWindow["Main Window"]
        MPWindow["MP Window"]
        Console["Console Interface"]
        ImGuiInterface["ImGui Interface"]
    end

    subgraph "Computation Layer"
        MP["Multiplicative Persistence"]
        MPType["MPType Definitions"]
    end

    subgraph "Data Layer"
        DM["Data Management"]
        JSON["JSON Handler"]
        Storage[("Data Storage")]
    end

    subgraph "Entry Points"
        GUIEntry["GUI Entry"]
        ConsoleEntry["Console Entry"]
    end

    subgraph "External Dependencies"
        ImGui["Dear ImGui"]
        GLFW["GLFW"]
    end

    %% Relationships
    GUIEntry --> UI
    ConsoleEntry --> Console
    UI --> MainWindow
    UI --> MPWindow
    MainWindow --> ImGuiInterface
    MPWindow --> ImGuiInterface
    ImGuiInterface -.-> ImGui
    ImGuiInterface -.-> GLFW
    
    MainWindow <--> MP
    MPWindow <--> MP
    Console <--> MP
    
    MP --> MPType
    MP <--> DM
    DM <--> JSON
    JSON <--> Storage

    %% Styling
    classDef ui fill:#a8d1f0
    classDef compute fill:#90EE90
    classDef data fill:#FFE5B4
    classDef entry fill:#D3D3D3
    classDef external fill:#E6E6FA
    
    class UI,MainWindow,MPWindow,Console,ImGuiInterface ui
    class MP,MPType compute
    class DM,JSON,Storage data
    class GUIEntry,ConsoleEntry entry
    class ImGui,GLFW external

    %% Click Events
    click UI "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/UI/UI.h"
    click MainWindow "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/UI/Windows/MainWindow.h"
    click MPWindow "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/UI/Windows/MP_Window.h"
    click Console "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/UI/ConsoleOuput/ConsoleOutput.h"
    click ImGuiInterface "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/UI/Windows/ImguiWindow.h"
    click MP "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/MP/MultiplicativePersistence.h"
    click MPType "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/MP/MPType.h"
    click DM "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/Data/DataManagement.h"
    click JSON "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/Libs/json/json.hpp"
    click Storage "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/Data/data.json"
    click GUIEntry "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/main.cpp"
    click ConsoleEntry "https://github.com/UBehrmann/MultiplicativePersistence/blob/master/src/cmdMain.cpp"
```
