# ali1180-uni/file-organizer architecture

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

- Interactive diagram: https://gitdiagram.com/ali1180-uni/file-organizer
- Repository: https://github.com/ali1180-uni/file-organizer

## Overview

File Organizer is a single-script command-line utility: it organizes non-hidden files in the current directory into extension-based folders. The README documents the workflow and capabilities; the sampled script implements them in one function, so the graph focuses on those runtime stages. The executable is present in the tree, but its internals were not sampled.

Main entry points: [`Organizer.py`](https://github.com/ali1180-uni/file-organizer/blob/main/Organizer.py) (Organizer command)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_organization["File organization"]
  node_classification["Extension classification<br/>[Organizer.py]"]
  node_folder_creation["Category folders<br/>[Organizer.py]"]
  node_collision_handling["Collision protection<br/>[Organizer.py]"]
  node_file_mover["File movement<br/>[Organizer.py]"]
end

subgraph group_runtime["Command-line runtime"]
  node_organizer["Organizer command<br/>[Organizer.py]"]
end

node_user(("Folder owner"))
node_filesystem[("Current folder")]

node_user -->|"runs in"| node_organizer
node_organizer -->|"classifies files"| node_classification
node_organizer -->|"creates folders"| node_folder_creation
node_organizer -->|"resolves clashes"| node_collision_handling
node_organizer -->|"moves files"| node_file_mover
node_organizer -->|"scans current folder"| node_filesystem
node_classification -->|"selects destination"| node_file_mover
node_folder_creation -->|"provides destination"| node_file_mover
node_collision_handling -->|"sets safe name"| node_file_mover
node_file_mover -->|"writes files"| node_filesystem

click node_organizer "https://github.com/ali1180-uni/file-organizer/blob/main/Organizer.py"
click node_classification "https://github.com/ali1180-uni/file-organizer/blob/main/Organizer.py"
click node_folder_creation "https://github.com/ali1180-uni/file-organizer/blob/main/Organizer.py"
click node_collision_handling "https://github.com/ali1180-uni/file-organizer/blob/main/Organizer.py"
click node_file_mover "https://github.com/ali1180-uni/file-organizer/blob/main/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_classification,node_folder_creation,node_collision_handling,node_file_mover toneBlue
class node_organizer,node_filesystem toneAmber
class node_user toneIndigo
```

## Components

### File organization

- [Extension classification](https://github.com/ali1180-uni/file-organizer/blob/main/Organizer.py): `Organizer.py`
- [Category folders](https://github.com/ali1180-uni/file-organizer/blob/main/Organizer.py): `Organizer.py`
- [Collision protection](https://github.com/ali1180-uni/file-organizer/blob/main/Organizer.py): `Organizer.py`
- [File movement](https://github.com/ali1180-uni/file-organizer/blob/main/Organizer.py): `Organizer.py`

### Command-line runtime

- [Organizer command](https://github.com/ali1180-uni/file-organizer/blob/main/Organizer.py): `Organizer.py`

### Other components

- **Folder owner**
- **Current folder**

## Connections

- Folder owner → Organizer command: runs in (evidence: `README.md`)
- Organizer command → Extension classification: classifies files (evidence: `Organizer.py`)
- Organizer command → Category folders: creates folders (evidence: `Organizer.py`)
- Organizer command → Collision protection: resolves clashes (evidence: `Organizer.py`)
- Organizer command → File movement: moves files (evidence: `Organizer.py`)
- Organizer command → Current folder: scans current folder (evidence: `Organizer.py`)
- Extension classification → File movement: selects destination (evidence: `Organizer.py`)
- Category folders → File movement: provides destination (evidence: `Organizer.py`)
- Collision protection → File movement: sets safe name (evidence: `Organizer.py`)
- File movement → Current folder: writes files (evidence: `Organizer.py`)
