# tomytate/win-debloat architecture

> Architecture diagram of the GitHub repository tomytate/win-debloat, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tomytate/win-debloat
- Repository: https://github.com/tomytate/win-debloat

## Overview

Win-Debloat is a PowerShell framework for Windows debloating, optimization, privacy, and hardening, with GUI and terminal interfaces. The user workflow is to launch the app with administrator privileges, choose or configure system changes, and apply them with encrypted snapshots intended to support rollback. README capabilities identify profiles, logging, software installation, networking, repair, and enterprise deployment. The launcher-to-script links are visible in source; most module-level wiring is unsampled, so those links are not inferred.

Main entry points: [`src/core/Launcher.cs`](https://github.com/tomytate/win-debloat/blob/main/src/core/Launcher.cs) (Folder launcher), [`src/core/LauncherEmbed.cs`](https://github.com/tomytate/win-debloat/blob/main/src/core/LauncherEmbed.cs) (Embedded launcher), [`src/core/Config.psm1`](https://github.com/tomytate/win-debloat/blob/main/src/core/Config.psm1) (Configuration), [`src/core/State.psm1`](https://github.com/tomytate/win-debloat/blob/main/src/core/State.psm1) (Snapshots and rollback)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and interface"]
  node_folder_launcher["Folder launcher<br/>[Launcher.cs]"]
  node_embedded_launcher["Embedded launcher<br/>[LauncherEmbed.cs]"]
  node_powershell_app["PowerShell application<br/>[Win-Debloat.ps1]"]
  node_gui["WPF interface<br/>[GUI.psm1]"]
  node_tui["Terminal menu<br/>[Menu.psm1]"]
end

subgraph group_engine["Configuration and state"]
  node_profiles["YAML profiles"]
  node_configuration["Configuration<br/>[Config.psm1]"]
  node_state[("Snapshots and rollback<br/>[State.psm1]")]
  node_logging["Structured logging<br/>[Logger.psm1]"]
  node_registry["Registry operations<br/>[Registry.psm1]"]
  node_system_state["System state<br/>[SystemState.psm1]"]
end

subgraph group_system["Windows operations"]
  node_bloatware["Bloatware removal<br/>[Bloatware.psm1]"]
  node_performance["Performance tuning"]
  node_network["Network and DNS<br/>[Network.psm1]"]
  node_software["Software catalog<br/>[Software.psm1]"]
  node_maintenance["Repair and maintenance<br/>[Repair.psm1]"]
end

subgraph group_security["Privacy and security"]
  node_privacy["Privacy controls<br/>[Privacy.psm1]"]
  node_security_hardening["Security hardening<br/>[Security.psm1]"]
  node_sysprep["Sysprep deployment<br/>[Sysprep.psm1]"]
end

node_user(("Administrator"))
node_windows["Windows system"]

node_user -->|"runs as admin"| node_folder_launcher
node_user -->|"runs as admin"| node_embedded_launcher
node_folder_launcher -->|"launches script"| node_powershell_app
node_embedded_launcher -->|"launches payload"| node_powershell_app
node_user -->|"uses interface"| node_gui
node_user -->|"uses interface"| node_tui
node_profiles -->|"configure changes"| node_configuration
node_configuration -->|"snapshot before changes"| node_state
node_state -->|"restore state"| node_windows
node_bloatware -->|"remove apps"| node_windows
node_performance -->|"optimize system"| node_windows
node_network -->|"configure networking"| node_windows
node_software -->|"install software"| node_windows
node_maintenance -->|"repair system"| node_windows
node_privacy -->|"reduce telemetry"| node_windows
node_security_hardening -->|"harden system"| node_windows
node_sysprep -->|"prepare deployment"| node_windows

click node_folder_launcher "https://github.com/tomytate/win-debloat/blob/main/src/core/Launcher.cs"
click node_embedded_launcher "https://github.com/tomytate/win-debloat/blob/main/src/core/LauncherEmbed.cs"
click node_powershell_app "https://github.com/tomytate/win-debloat/blob/main/Win-Debloat.ps1"
click node_gui "https://github.com/tomytate/win-debloat/blob/main/src/ui/gui/GUI.psm1"
click node_tui "https://github.com/tomytate/win-debloat/blob/main/src/ui/Menu.psm1"
click node_profiles "https://github.com/tomytate/win-debloat/tree/main/profiles"
click node_configuration "https://github.com/tomytate/win-debloat/blob/main/src/core/Config.psm1"
click node_state "https://github.com/tomytate/win-debloat/blob/main/src/core/State.psm1"
click node_logging "https://github.com/tomytate/win-debloat/blob/main/src/core/Logger.psm1"
click node_registry "https://github.com/tomytate/win-debloat/blob/main/src/core/Registry.psm1"
click node_system_state "https://github.com/tomytate/win-debloat/blob/main/src/core/SystemState.psm1"
click node_bloatware "https://github.com/tomytate/win-debloat/blob/main/src/modules/Bloatware/Bloatware.psm1"
click node_performance "https://github.com/tomytate/win-debloat/tree/main/src/modules/Performance"
click node_network "https://github.com/tomytate/win-debloat/blob/main/src/modules/Network/Network.psm1"
click node_software "https://github.com/tomytate/win-debloat/blob/main/src/modules/Software/Software.psm1"
click node_maintenance "https://github.com/tomytate/win-debloat/blob/main/src/modules/Repair/Repair.psm1"
click node_privacy "https://github.com/tomytate/win-debloat/blob/main/src/modules/Privacy/Privacy.psm1"
click node_security_hardening "https://github.com/tomytate/win-debloat/blob/main/src/modules/Security/Security.psm1"
click node_sysprep "https://github.com/tomytate/win-debloat/blob/main/src/core/Sysprep.psm1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_folder_launcher,node_embedded_launcher,node_powershell_app,node_gui,node_tui toneBlue
class node_profiles,node_configuration,node_state,node_logging,node_registry,node_system_state toneAmber
class node_bloatware,node_performance,node_network,node_software,node_maintenance toneMint
class node_privacy,node_security_hardening,node_sysprep toneRose
class node_user,node_windows toneIndigo
```

## Components

### Entry and interface

- [Folder launcher](https://github.com/tomytate/win-debloat/blob/main/src/core/Launcher.cs): `src/core/Launcher.cs`
- [Embedded launcher](https://github.com/tomytate/win-debloat/blob/main/src/core/LauncherEmbed.cs): `src/core/LauncherEmbed.cs`
- [PowerShell application](https://github.com/tomytate/win-debloat/blob/main/Win-Debloat.ps1): `Win-Debloat.ps1`
- [WPF interface](https://github.com/tomytate/win-debloat/blob/main/src/ui/gui/GUI.psm1): `src/ui/gui/GUI.psm1`
- [Terminal menu](https://github.com/tomytate/win-debloat/blob/main/src/ui/Menu.psm1): `src/ui/Menu.psm1`

### Configuration and state

- [YAML profiles](https://github.com/tomytate/win-debloat/tree/main/profiles): `profiles`
- [Configuration](https://github.com/tomytate/win-debloat/blob/main/src/core/Config.psm1): `src/core/Config.psm1`
- [Snapshots and rollback](https://github.com/tomytate/win-debloat/blob/main/src/core/State.psm1): `src/core/State.psm1`
- [Structured logging](https://github.com/tomytate/win-debloat/blob/main/src/core/Logger.psm1): `src/core/Logger.psm1`
- [Registry operations](https://github.com/tomytate/win-debloat/blob/main/src/core/Registry.psm1): `src/core/Registry.psm1`
- [System state](https://github.com/tomytate/win-debloat/blob/main/src/core/SystemState.psm1): `src/core/SystemState.psm1`

### Windows operations

- [Bloatware removal](https://github.com/tomytate/win-debloat/blob/main/src/modules/Bloatware/Bloatware.psm1): `src/modules/Bloatware/Bloatware.psm1`
- [Performance tuning](https://github.com/tomytate/win-debloat/tree/main/src/modules/Performance): `src/modules/Performance`
- [Network and DNS](https://github.com/tomytate/win-debloat/blob/main/src/modules/Network/Network.psm1): `src/modules/Network/Network.psm1`
- [Software catalog](https://github.com/tomytate/win-debloat/blob/main/src/modules/Software/Software.psm1): `src/modules/Software/Software.psm1`
- [Repair and maintenance](https://github.com/tomytate/win-debloat/blob/main/src/modules/Repair/Repair.psm1): `src/modules/Repair/Repair.psm1`

### Privacy and security

- [Privacy controls](https://github.com/tomytate/win-debloat/blob/main/src/modules/Privacy/Privacy.psm1): `src/modules/Privacy/Privacy.psm1`
- [Security hardening](https://github.com/tomytate/win-debloat/blob/main/src/modules/Security/Security.psm1): `src/modules/Security/Security.psm1`
- [Sysprep deployment](https://github.com/tomytate/win-debloat/blob/main/src/core/Sysprep.psm1): `src/core/Sysprep.psm1`

### Other components

- **Administrator**
- **Windows system**

## Connections

- Administrator → Folder launcher: runs as admin (evidence: `README.md`)
- Administrator → Embedded launcher: runs as admin (evidence: `README.md`)
- Folder launcher → PowerShell application: launches script (evidence: `src/core/Launcher.cs`)
- Embedded launcher → PowerShell application: launches payload (evidence: `src/core/LauncherEmbed.cs`)
- Administrator → WPF interface: uses interface (evidence: `README.md`)
- Administrator → Terminal menu: uses interface (evidence: `README.md`)
- YAML profiles → Configuration: configure changes (evidence: `README.md`)
- Configuration → Snapshots and rollback: snapshot before changes (evidence: `README.md`)
- Snapshots and rollback → Windows system: restore state (evidence: `README.md`)
- Bloatware removal → Windows system: remove apps (evidence: `README.md`)
- Performance tuning → Windows system: optimize system (evidence: `README.md`)
- Network and DNS → Windows system: configure networking (evidence: `README.md`)
- Software catalog → Windows system: install software (evidence: `README.md`)
- Repair and maintenance → Windows system: repair system (evidence: `README.md`)
- Privacy controls → Windows system: reduce telemetry (evidence: `README.md`)
- Security hardening → Windows system: harden system (evidence: `README.md`)
- Sysprep deployment → Windows system: prepare deployment (evidence: `README.md`)
