# xm4ddy/ofgb architecture

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

- Interactive diagram: https://gitdiagram.com/xm4ddy/ofgb
- Repository: https://github.com/xm4ddy/ofgb

## Overview

OFGB is a small WPF utility for disabling Windows 11 advertising and suggested content by changing per-user Registry values. The user works through the main window: its code reads and initializes option values, reflects them in checkboxes, and writes corresponding values when options change. Administrator status gates the Search and Edge widget options. The graph focuses on this runtime; the source excerpts do not show XAML event wiring or application startup configuration.

Main entry points: [`MainWindow.xaml.cs`](https://github.com/xm4ddy/ofgb/blob/main/MainWindow.xaml.cs) (Options window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Windows app"]
  node_main["Options window<br/>[MainWindow.xaml.cs]"]
end

subgraph group_system["Windows system"]
  node_registry[("Current-user Registry")]
  node_identity["Windows identity"]
end

node_user(("User"))

node_user -->|"uses"| node_main
node_main -->|"reads and initializes"| node_registry
node_main -->|"writes toggles"| node_registry
node_main -->|"checks administrator"| node_identity

click node_main "https://github.com/xm4ddy/ofgb/blob/main/MainWindow.xaml.cs"

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_main,node_user toneBlue
class node_registry,node_identity toneAmber
```

## Components

### Windows app

- [Options window](https://github.com/xm4ddy/ofgb/blob/main/MainWindow.xaml.cs): `MainWindow.xaml.cs`

### Windows system

- **Current-user Registry**
- **Windows identity**

### Other components

- **User**

## Connections

- User → Options window: uses (evidence: `README.md`)
- Options window → Current-user Registry: reads and initializes (evidence: `MainWindow.xaml.cs`)
- Options window → Current-user Registry: writes toggles (evidence: `MainWindow.xaml.cs`)
- Options window → Windows identity: checks administrator (evidence: `MainWindow.xaml.cs`)
