# peterstrick/vivetool-gui architecture

> Architecture diagram of the GitHub repository peterstrick/vivetool-gui, 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/peterstrick/vivetool-gui
- Repository: https://github.com/peterstrick/vivetool-gui

## Overview

##### Main Components
- Main GUI Application ("vivetool-gui" folder): This is the primary user interface component. It includes forms such as the main GUI, About and Settings screens, Search functionality, and display elements for feature groups.
- Feature Scanner Module ("ViVeTool-GUI.FeatureScanner" folder): A dedicated component for scanning Windows builds to create custom feature lists.
- External APIs and Integrations:
- ViVe API: Provided by the original ViVe/ViVeTool projects, it drives the enabling/disabling functionality.
- mach2 Dependency: Used to populate build information and feature lists.
- External Libraries:
- Telerik-based components: Present in the "lib/RCWF" directory, these support additional UI elements (e.g., grid views, charts) and are critical for the enhanced display and reporting functionality.
- Configuration and Support Files:
- Various configuration files (App.config, manifest, packages.config) along with localization resources and licensing information.

##### Relationships and Interactions
- The Main GUI accepts user interaction (e.g., selecting a Windows build, choosing a feature) and then dispatches commands to the backend components.
- The Feature Scanner module operates as a sub-component that can be invoked either automatically during startup or manually when scanning a build.
- Both modules interact with the underlying ViVe API to perform actions on the Windows Feature Store.
- The system imports and leverages external libraries (Telerik UI components) which support the user interface, data grid displays, and sorting/grouping of features.
- The configuration files (like app.manifest and packages.config) are used during startup to initialize settings and external dependencies.

##### Architectural Patterns and Design Principles
- Separation of concerns is apparent with the main UI separated from the scanning logic. This makes it easier to maintain and extend each module independently.
- Use of modular design for the feature scanner and UI components.
- Event-based programming: The GUI components trigger events (e.g., button clicks to perform an action) that tie into backend scanning and API calls.
- Integration of external libraries (e.g., Telerik) is abstracted from core business logic while enhancing presentation.

##### Final Elements
- Clear labels for each component.

## Diagram (Mermaid)

```mermaid
flowchart TD
    U("User"):::external

    subgraph "Frontend (vivetool-gui)"
        FG("Main GUI Application"):::frontend
    end

    subgraph "Backend (Feature Scanner)"
        BS("Feature Scanner Module"):::backend
    end

    VA("ViVe API"):::external
    M2("mach2 Dependency"):::external
    TL("Telerik UI Library"):::external
    CFG("Configuration & Support Files"):::config

    U -->|"triggers"| FG
    FG -->|"startScan"| BS
    FG <-->|"API_calls"| VA
    BS -->|"uses"| M2
    BS -->|"invokes"| VA
    FG -->|"UI_support"| TL
    CFG -->|"loads"| FG
    CFG -->|"loads"| BS

    classDef frontend fill:#AED6F1,stroke:#1f78b4,stroke-width:2px;
    classDef backend fill:#F5B7B1,stroke:#c0392b,stroke-width:2px;
    classDef external fill:#A9DFBF,stroke:#27ae60,stroke-width:2px;
    classDef config fill:#F9E79F,stroke:#d4ac0d,stroke-width:2px;

    click FG "https://github.com/peterstrick/vivetool-gui/tree/master/vivetool-gui"
    click BS "https://github.com/peterstrick/vivetool-gui/blob/master/ViVeTool-GUI.FeatureScanner"
    click TL "https://github.com/peterstrick/vivetool-gui/tree/master/lib/RCWF"
    click CFG "https://github.com/peterstrick/vivetool-gui/blob/master/vivetool-gui/App.config"
```
