# neeradian/file_organizer architecture

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

- Interactive diagram: https://gitdiagram.com/neeradian/file_organizer
- Repository: https://github.com/neeradian/file_organizer

## Overview

File Organizer is a single-file desktop app for sorting files from a chosen source folder into category folders in a destination. The user selects folders and a theme, then starts organization; the app validates the folders, classifies each file by extension, creates category folders, avoids overwrites with unique names, moves files, and reports progress and totals. The README documents the workflow and safety features; the excerpt shows the GUI, theme handling, and parts of the organizer. Internal relationships not visible in the excerpt are grounded in the README.

Main entry points: [`file_organizer.py`](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py) (Folder validation), [`themes`](https://github.com/neeradian/file_organizer/tree/main/themes) (Color palettes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_app["Organizer window<br/>[file_organizer.py]"]
  node_folder_picker["Folder selection<br/>[file_organizer.py]"]
  node_progress["Progress and results<br/>[file_organizer.py]"]
end

subgraph group_organizing["File organization"]
  node_validation["Folder validation<br/>[file_organizer.py]"]
  node_file_scan["Source file scan<br/>[file_organizer.py]"]
  node_classifier["Extension categories<br/>[file_organizer.py]"]
  node_category_dirs["Category folders<br/>[file_organizer.py]"]
  node_unique_names["Unique filenames<br/>[file_organizer.py]"]
  node_file_move["File movement<br/>[file_organizer.py]"]
end

subgraph group_appearance["Appearance"]
  node_theme_controls["Theme controls<br/>[file_organizer.py]"]
  node_theme_loader["Theme loading<br/>[file_organizer.py]"]
  node_theme_files["Color palettes"]
end

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

node_user -->|"uses"| node_app
node_app -->|"offers selection"| node_folder_picker
node_user -->|"selects theme"| node_theme_controls
node_theme_controls -->|"changes appearance"| node_theme_loader
node_theme_loader -->|"loads palette"| node_theme_files
node_user -->|"starts organization"| node_validation
node_validation -->|"checks and scans"| node_file_scan
node_file_scan -->|"classifies extensions"| node_classifier
node_classifier -->|"selects category"| node_category_dirs
node_category_dirs -->|"sets destination"| node_unique_names
node_unique_names -->|"provides safe path"| node_file_move
node_file_move -->|"moves files"| node_filesystem
node_validation -->|"reports outcome"| node_progress
node_file_move -->|"updates counts"| node_progress
node_folder_picker -->|"chooses folders"| node_filesystem

click node_app "https://github.com/neeradian/file_organizer/blob/main/file_organizer.py"
click node_folder_picker "https://github.com/neeradian/file_organizer/blob/main/file_organizer.py"
click node_progress "https://github.com/neeradian/file_organizer/blob/main/file_organizer.py"
click node_theme_controls "https://github.com/neeradian/file_organizer/blob/main/file_organizer.py"
click node_theme_loader "https://github.com/neeradian/file_organizer/blob/main/file_organizer.py"
click node_theme_files "https://github.com/neeradian/file_organizer/tree/main/themes"
click node_validation "https://github.com/neeradian/file_organizer/blob/main/file_organizer.py"
click node_file_scan "https://github.com/neeradian/file_organizer/blob/main/file_organizer.py"
click node_classifier "https://github.com/neeradian/file_organizer/blob/main/file_organizer.py"
click node_category_dirs "https://github.com/neeradian/file_organizer/blob/main/file_organizer.py"
click node_unique_names "https://github.com/neeradian/file_organizer/blob/main/file_organizer.py"
click node_file_move "https://github.com/neeradian/file_organizer/blob/main/file_organizer.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_app,node_folder_picker,node_progress,node_user toneBlue
class node_validation,node_file_scan,node_classifier,node_category_dirs,node_unique_names,node_file_move,node_filesystem toneAmber
class node_theme_controls,node_theme_loader,node_theme_files toneMint
```

## Components

### Desktop interface

- [Organizer window](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`
- [Folder selection](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`
- [Progress and results](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`

### File organization

- [Folder validation](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`
- [Source file scan](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`
- [Extension categories](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`
- [Category folders](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`
- [Unique filenames](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`
- [File movement](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`

### Appearance

- [Theme controls](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`
- [Theme loading](https://github.com/neeradian/file_organizer/blob/main/file_organizer.py): `file_organizer.py`
- [Color palettes](https://github.com/neeradian/file_organizer/tree/main/themes): `themes`

### Other components

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

## Connections

- User → Organizer window: uses (evidence: `README.md`)
- Organizer window → Folder selection: offers selection (evidence: `file_organizer.py`)
- User → Theme controls: selects theme (evidence: `README.md`)
- Theme controls → Theme loading: changes appearance (evidence: `file_organizer.py`)
- Theme loading → Color palettes: loads palette (evidence: `README.md`)
- User → Folder validation: starts organization (evidence: `README.md`)
- Folder validation → Source file scan: checks and scans (evidence: `README.md`)
- Source file scan → Extension categories: classifies extensions (evidence: `README.md`)
- Extension categories → Category folders: selects category (evidence: `README.md`)
- Category folders → Unique filenames: sets destination (evidence: `README.md`)
- Unique filenames → File movement: provides safe path (evidence: `README.md`)
- File movement → Local filesystem: moves files (evidence: `README.md`)
- Folder validation → Progress and results: reports outcome (evidence: `README.md`)
- File movement → Progress and results: updates counts (evidence: `README.md`)
- Folder selection → Local filesystem: chooses folders (evidence: `README.md`)
