# afaqcreate/clean-folder-and-arrange-files architecture

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

- Interactive diagram: https://gitdiagram.com/afaqcreate/clean-folder-and-arrange-files
- Repository: https://github.com/afaqcreate/clean-folder-and-arrange-files

## Overview

Folder Cleaner is a Tkinter desktop tool for inspecting a chosen folder and organizing its files by extension or configured type. The user selects a folder; the UI calls scanning helpers to display its contents, or invokes the organizer, which scans again, classifies files, and moves them into destination folders. Configuration supplies image and document extensions, while filesystem operations read folder contents and move files. The README also advertises custom rules and preview, but these are not visible in the supplied implementation excerpts.

Main entry points: [`organizer.py`](https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/organizer.py) (File organizer), [`ui.py.py`](https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/ui.py.py) (Tkinter app), [`file_utils.py`](https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/file_utils.py) (Folder utilities), [`config.py`](https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/config.py) (File-type config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_gui["Tkinter app<br/>[ui.py.py]"]
end

subgraph group_organization["File organization"]
  node_organizer["File organizer<br/>[organizer.py]"]
end

subgraph group_support["Supporting logic"]
  node_config["File-type config<br/>[config.py]"]
  node_file_utils["Folder utilities<br/>[file_utils.py]"]
end

node_user(("User"))
node_filesystem[("Local filesystem")]

node_user -->|"uses"| node_gui
node_gui -->|"scans and describes"| node_file_utils
node_gui -->|"requests organization"| node_organizer
node_organizer -->|"scans and separates"| node_file_utils
node_organizer -->|"reads extensions"| node_config
node_file_utils -->|"reads entries and metadata"| node_filesystem
node_organizer -->|"moves files"| node_filesystem

click node_gui "https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/ui.py.py"
click node_organizer "https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/organizer.py"
click node_config "https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/config.py"
click node_file_utils "https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/file_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_gui,node_user toneBlue
class node_organizer,node_filesystem toneAmber
class node_config,node_file_utils toneMint
```

## Components

### User interface

- [Tkinter app](https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/ui.py.py): `ui.py.py`

### File organization

- [File organizer](https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/organizer.py): `organizer.py`

### Supporting logic

- [File-type config](https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/config.py): `config.py`
- [Folder utilities](https://github.com/afaqcreate/clean-folder-and-arrange-files/blob/main/file_utils.py): `file_utils.py`

### Other components

- **User**
- **Local filesystem**

## Connections

- User → Tkinter app: uses (evidence: `ui.py.py`)
- Tkinter app → Folder utilities: scans and describes (evidence: `ui.py.py`)
- Tkinter app → File organizer: requests organization (evidence: `ui.py.py`)
- File organizer → Folder utilities: scans and separates (evidence: `organizer.py`)
- File organizer → File-type config: reads extensions (evidence: `organizer.py`)
- Folder utilities → Local filesystem: reads entries and metadata (evidence: `file_utils.py`)
- File organizer → Local filesystem: moves files (evidence: `organizer.py`)
