# builtbybel/bloatynosy architecture

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

## Overview

##### Main Project Purpose and Type
- The README clarifies that this project resurrects the “Bloatynosy” tool – a native Windows application designed to “debloat” the OS by removing ads, unwanted features, and built-in bloatware.
- It is a desktop application written in C# (as evident from .csproj, .sln, and Windows Forms files) that integrates various plugin scripts (both JSON configuration files and PowerShell scripts) for executing specific debloating tasks.
- There is also an element named “Winpilot,” which appears to serve as either a sibling or complementary component, featuring both GUI and a lightweight backend (HTML, CSS, JavaScript) in its “app-backend” folder.

##### File Structure to Identify Key Components
- Top-Level Directories:
– “plugins”: Holds JSON/Powershell scripts that encapsulate discrete debloating actions. This folder is central to the extensibility of the application.
– “src”: The main source code directory, subdivided into projects for “Bloatynosy” (the revamped debloating application) and “Winpilot” (which contains its own set of Interop classes, Walks, and an “app-backend” web component).
- Within the “src” directory:
– The “Bloatynosy” project is organized with segregated subfolders under Experience (covering diverse domains like AI, Ads, Gaming, Privacy, and UI). This hints at a modular design where each domain is encapsulated as its own feature module.
– Helper directories (Helper, Logger, Utils, Views) indicate support libraries used across the application.
– The presence of JSON Plugin Handlers (JsonPluginHandler.cs and PSPluginHandler.cs) reveals a plugin-based mechanism for dynamically wiring specific debloating tasks.
– The “Winpilot” project includes a similar structure but also integrates an “app-backend” (comprising HTML, CSS, and JavaScript) which likely serves a dual role for UI rendering or additional functionality.

##### Key Components
a. User Interface (UI) Layer:
– Represent the main forms and views (MainForm, various Views under the “Views” directories) that interact with end users.
– Differentiate between Bloatynosy’s desktop GUI and the Winpilot/“app-backend” HTML/CSS interface.
b. Core Application Logic:
– Show the main application entry points (Program.cs) that initialize the application.
c. Plugin Management System:
– Highlight the plugin subsystem that uses the JSON/Powershell plugin definitions (from the “plugins” folder) along with the JsonPluginHandler.cs and PSPluginHandler.cs classes.
– Indicate how the plugins are loaded, possibly showing dynamic integration points where each plugin specifies tasks like “Remove Windows AI” or “Uninstall OneDrive.”
d. Feature-Specific Modules:
– Break out feature modules under the “Experience” folders (for Ads, Gaming, Privacy, UI, etc.) that represent different debloating domains.
– Represent each as components that the main application orchestrates.
e. Localization Module:
– Include the internationalization component sourced from the “languages” folder and under Locales inside project folders. This component handles multiple languages and resources.
f. Auxiliary Components:
– The “Helper” modules (Logger, Utils, Views) should be shown as supporting libraries used by multiple parts of the application.
– With Winpilot, include its Interop layer that interacts with system settings (like AppPackages, Clippy handlers, etc.).
g. External Assets & Backend (For Winpilot):
– Represent the “app-backend” component within the Winpilot project to highlight the blend of desktop and inline web components (HTML, CSS, JS).

##### Relationships and Interactions
- Dependency of the core logic on configuration files and helper modules.
- Data flow from the UI through to the plugin subsystem, which then calls specific functions in the feature modules (e.g., removing ads, modifying the taskbar).
- For Winpilot’s web-based elements, show the connection between the backend (static assets and JavaScript) and the main Interop layer.

##### On Architectural Patterns
- The project favors a modular design, wherein each debloating task is encapsulated in its own plugin or module – a good candidate for a plugin or microkernel pattern.
- There is a separation between the UI, business logic, and plugin management, indicating a clear separation of concerns.
- Some parts of the project appear to follow an MVC-like breakdown (with Views, Helpers, and core logic).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Bloatynosy Desktop Application
    subgraph "Bloatynosy Desktop Application"
        BloatynosyUI["Bloatynosy MainForm"]:::ui
        BloatynosyViews["Bloatynosy Views"]:::ui
    end

    %% Winpilot Desktop Application
    subgraph "Winpilot Desktop Application"
        WinpilotUI["Winpilot MainForm"]:::ui
        WinpilotViews["Winpilot Views"]:::ui
    end

    %% Winpilot Web Component
    subgraph "Winpilot Web Component"
        WinpilotWeb["Winpilot App Backend"]:::web
    end

    %% Application Core
    subgraph "Application Core"
        BloatEntry["Bloatynosy Program & Config"]:::core
        WinEntry["Winpilot Program & Config"]:::core
    end

    %% Plugin Management System
    subgraph "Plugin Management"
        PluginsFolder["Plugins Folder"]:::plugin
        JsonHandler["JSON Plugin Handler"]:::plugin
        PSHandler["PowerShell Plugin Handler"]:::plugin
    end

    %% Feature Modules
    subgraph "Feature Modules"
        BloatFeatures["Bloatynosy Experience Modules"]:::feature
        WinFeatures["Winpilot Walks Modules"]:::feature
    end

    %% Localization Module
    subgraph "Localization"
        Loc["Localization Resources"]:::loc
    end

    %% Auxiliary Components
    subgraph "Auxiliary Components"
        AuxBloat["Bloatynosy Helpers/Logger/Utils/Views"]:::aux
        AuxWin["Winpilot Helpers/Logger/Utils/Views"]:::aux
    end

    %% Winpilot Interop Layer
    subgraph "Interop"
        WinInterop["Winpilot Interop Layer"]:::interop
    end

    %% Connections within UI subgraphs
    BloatynosyUI --> BloatynosyViews
    WinpilotUI --> WinpilotViews

    %% UI to Core Application
    BloatynosyUI --> BloatEntry
    WinpilotUI --> WinEntry

    %% Core Application to Plugin Management
    BloatEntry --> PluginsFolder
    WinEntry --> PluginsFolder

    %% Plugin Management connections
    PluginsFolder --> JsonHandler
    PluginsFolder --> PSHandler

    JsonHandler --> BloatFeatures
    JsonHandler --> WinFeatures
    PSHandler --> BloatFeatures
    PSHandler --> WinFeatures

    %% Core Application direct connection to Feature Modules
    BloatEntry --> BloatFeatures
    WinEntry --> WinFeatures

    %% Localization supports UI
    Loc --> BloatynosyUI
    Loc --> WinpilotUI

    %% UI supported by Auxiliary Components
    BloatynosyUI --> AuxBloat
    WinpilotUI --> AuxWin

    %% Winpilot UI connects to Interop and Web Component
    WinpilotUI --> WinInterop
    WinInterop --> WinFeatures
    WinpilotUI --> WinpilotWeb

    %% Click Events
    click BloatynosyUI "https://github.com/builtbybel/bloatynosy/blob/main/src/Bloatynosy/MainForm.cs"
    click BloatynosyViews "https://github.com/builtbybel/bloatynosy/tree/main/src/Bloatynosy/Views"
    click WinpilotUI "https://github.com/builtbybel/bloatynosy/blob/main/src/Winpilot/MainForm.cs"
    click WinpilotViews "https://github.com/builtbybel/bloatynosy/tree/main/src/Winpilot/Views"
    click WinpilotWeb "https://github.com/builtbybel/bloatynosy/tree/main/src/Winpilot/app-backend"
    click BloatEntry "https://github.com/builtbybel/bloatynosy/blob/main/src/Bloatynosy/Program.cs"
    click WinEntry "https://github.com/builtbybel/bloatynosy/blob/main/src/Winpilot/Program.cs"
    click PluginsFolder "https://github.com/builtbybel/bloatynosy/tree/main/plugins"
    click JsonHandler "https://github.com/builtbybel/bloatynosy/blob/main/src/Bloatynosy/JsonPluginHandler.cs"
    click PSHandler "https://github.com/builtbybel/bloatynosy/blob/main/src/Bloatynosy/PSPluginHandler.cs"
    click BloatFeatures "https://github.com/builtbybel/bloatynosy/tree/main/src/Bloatynosy/Experience"
    click WinFeatures "https://github.com/builtbybel/bloatynosy/tree/main/src/Winpilot/Walks"
    click Loc "https://github.com/builtbybel/bloatynosy/tree/main/languages"
    click AuxBloat "https://github.com/builtbybel/bloatynosy/tree/main/src/Bloatynosy/Helper"
    click AuxWin "https://github.com/builtbybel/bloatynosy/tree/main/src/Winpilot/Helpers"
    click WinInterop "https://github.com/builtbybel/bloatynosy/tree/main/src/Winpilot/Interop"

    %% Styles
    classDef ui fill:#ADD8E6,stroke:#0000FF,color:#000;
    classDef core fill:#90EE90,stroke:#008000,color:#000;
    classDef plugin fill:#FFD700,stroke:#B8860B,color:#000;
    classDef feature fill:#FFB6C1,stroke:#FF69B4,color:#000;
    classDef loc fill:#E6E6FA,stroke:#9370DB,color:#000;
    classDef aux fill:#F5DEB3,stroke:#DAA520,color:#000;
    classDef interop fill:#D3D3D3,stroke:#696969,color:#000;
    classDef web fill:#FFA07A,stroke:#FF4500,color:#000;
```
