# anyel1to/atsmatrix-pc-cleaner architecture

> Architecture diagram of the GitHub repository anyel1to/atsmatrix-pc-cleaner, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anyel1to/atsmatrix-pc-cleaner
- Repository: https://github.com/anyel1to/atsmatrix-pc-cleaner

## Overview

ATS Matrix PC Cleaner is a Windows desktop utility for reviewing and removing junk files. The user launches the app, reviews discovered categories and their estimated sizes, scans locations, selects categories, confirms cleanup, and sees progress and results. The engine separates target discovery, parallel size scanning, and cleaning; shared utilities resolve Windows and browser-cache paths and perform safe filesystem operations. The excerpts show the main module relationships, but omit some UI worker details, so those internal call paths are not expanded.

Main entry points: [`cleaner/core.py`](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/core.py) (Cleaner engine), [`cleaner/ui.py`](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/ui.py) (Cleaner GUI), [`main.py`](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/main.py) (App launcher), [`cleaner/utils.py`](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/utils.py) (Safe deletion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_launcher["App launcher<br/>[main.py]"]
  node_gui["Cleaner GUI<br/>[ui.py]"]
  node_disk["Disk overview<br/>[ui.py]"]
  node_targets_ui["Target selection<br/>[ui.py]"]
end

subgraph group_cleaning["Cleaning engine"]
  node_engine["Cleaner engine<br/>[core.py]"]
  node_discovery["Target discovery<br/>[core.py]"]
  node_scanning["Size scanning<br/>[core.py]"]
  node_cleanup["Selected cleanup<br/>[core.py]"]
end

subgraph group_helpers["Path and file utilities"]
  node_path_helpers["Path discovery<br/>[utils.py]"]
  node_safe_delete["Safe deletion<br/>[utils.py]"]
end

node_user(("User"))
node_filesystem[("Local filesystem")]
node_recycle_api["Windows recycle API"]
node_psutil["psutil"]

node_user -->|"launches"| node_launcher
node_launcher -->|"starts"| node_gui
node_gui -->|"uses"| node_engine
node_gui -->|"formats sizes"| node_path_helpers
node_gui -->|"reads disk usage"| node_psutil
node_gui -->|"discovers targets"| node_engine
node_engine -->|"resolves locations"| node_path_helpers
node_engine -->|"scans targets"| node_scanning
node_engine -->|"cleans selections"| node_cleanup
node_engine -->|"deletes contents"| node_safe_delete
node_engine -->|"measures and removes"| node_filesystem
node_safe_delete -->|"removes files"| node_filesystem
node_engine -->|"empties bin"| node_recycle_api

click node_launcher "https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/main.py"
click node_gui "https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/ui.py"
click node_disk "https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/ui.py"
click node_targets_ui "https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/ui.py"
click node_engine "https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/core.py"
click node_discovery "https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/core.py"
click node_scanning "https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/core.py"
click node_cleanup "https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/core.py"
click node_path_helpers "https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/utils.py"
click node_safe_delete "https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/utils.py"

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_launcher,node_gui,node_disk,node_targets_ui,node_user toneBlue
class node_engine,node_discovery,node_scanning,node_cleanup,node_filesystem toneAmber
class node_path_helpers,node_safe_delete,node_recycle_api toneMint
class node_psutil toneIndigo
```

## Components

### Desktop interface

- [App launcher](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/main.py): `main.py`
- [Cleaner GUI](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/ui.py): `cleaner/ui.py`
- [Disk overview](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/ui.py): `cleaner/ui.py`
- [Target selection](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/ui.py): `cleaner/ui.py`

### Cleaning engine

- [Cleaner engine](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/core.py): `cleaner/core.py`
- [Target discovery](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/core.py): `cleaner/core.py`
- [Size scanning](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/core.py): `cleaner/core.py`
- [Selected cleanup](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/core.py): `cleaner/core.py`

### Path and file utilities

- [Path discovery](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/utils.py): `cleaner/utils.py`
- [Safe deletion](https://github.com/anyel1to/atsmatrix-pc-cleaner/blob/main/cleaner/utils.py): `cleaner/utils.py`

### Other components

- **User**
- **Local filesystem**
- **Windows recycle API**
- **psutil**

## Connections

- User → App launcher: launches (evidence: `README.md`)
- App launcher → Cleaner GUI: starts (evidence: `main.py`)
- Cleaner GUI → Cleaner engine: uses (evidence: `cleaner/ui.py`)
- Cleaner GUI → Path discovery: formats sizes (evidence: `cleaner/ui.py`)
- Cleaner GUI → psutil: reads disk usage (evidence: `cleaner/ui.py`)
- Cleaner GUI → Cleaner engine: discovers targets (evidence: `cleaner/ui.py`)
- Cleaner engine → Path discovery: resolves locations (evidence: `cleaner/core.py`)
- Cleaner engine → Size scanning: scans targets (evidence: `cleaner/core.py`)
- Cleaner engine → Selected cleanup: cleans selections (evidence: `cleaner/core.py`)
- Cleaner engine → Safe deletion: deletes contents (evidence: `cleaner/core.py`)
- Cleaner engine → Local filesystem: measures and removes (evidence: `cleaner/core.py`)
- Safe deletion → Local filesystem: removes files (evidence: `cleaner/utils.py`)
- Cleaner engine → Windows recycle API: empties bin (evidence: `cleaner/core.py`)
