# alexprofmutua/neatify architecture

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

- Interactive diagram: https://gitdiagram.com/alexprofmutua/neatify
- Repository: https://github.com/alexprofmutua/neatify

## Overview

Neatify is a PySide6 desktop file organizer. Users select a folder, preview rule-based destinations, confirm moves, and can then find files or review, export, and undo arrange batches. The graph separates interface, organization, and durable history/recovery. Several connections are supported by the README or source index; unsampled implementation details are not inferred.

Main entry points: [`window.py`](https://github.com/alexprofmutua/neatify/blob/main/window.py) (Main window), [`neatify.py`](https://github.com/alexprofmutua/neatify/blob/main/neatify.py) (Arrange and undo), [`app_paths.py`](https://github.com/alexprofmutua/neatify/blob/main/app_paths.py) (App data paths), [`rules.py`](https://github.com/alexprofmutua/neatify/blob/main/rules.py) (Rules and search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_window["Main window<br/>[window.py]"]
  node_ui_helpers["UI components<br/>[components.py]"]
  node_app_style["Theme styling<br/>[style.py]"]
  node_runtime_state["Runtime state<br/>[state.py]"]
end

subgraph group_organizing["File organization"]
  node_arrangement["Arrange and undo<br/>[neatify.py]"]
  node_rules["Rules and search<br/>[rules.py]"]
end

subgraph group_history["History and recovery"]
  node_sqlite[("History database<br/>[sqlite_store.py]")]
  node_journal["Operation journal<br/>[journal.py]"]
end

subgraph group_support["App support"]
  node_preferences["Preferences<br/>[app_settings.py]"]
  node_paths["App data paths<br/>[app_paths.py]"]
  node_launcher["App launcher<br/>[gui.py]"]
end

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

node_user -->|"uses"| node_window
node_launcher -->|"opens"| node_window
node_window -->|"builds with"| node_ui_helpers
node_window -->|"applies"| node_app_style
node_window -->|"uses"| node_runtime_state
node_window -->|"loads and saves"| node_preferences
node_preferences -->|"gets data path"| node_paths
node_window -->|"requests preview and moves"| node_arrangement
node_window -->|"requests search"| node_rules
node_arrangement -->|"classifies files"| node_rules
node_arrangement -->|"moves and restores"| node_filesystem
node_arrangement -->|"records operations"| node_sqlite
node_arrangement -->|"records move states"| node_journal
node_arrangement -->|"gets data paths"| node_paths
node_journal -->|"gets journal path"| node_paths
node_sqlite -->|"gets database path"| node_paths
node_rules -->|"gets rules path"| node_paths
node_user -->|"chooses folder"| node_filesystem
node_window -.->|"reviews and exports history"| node_sqlite

click node_window "https://github.com/alexprofmutua/neatify/blob/main/window.py"
click node_ui_helpers "https://github.com/alexprofmutua/neatify/blob/main/components.py"
click node_app_style "https://github.com/alexprofmutua/neatify/blob/main/style.py"
click node_runtime_state "https://github.com/alexprofmutua/neatify/blob/main/state.py"
click node_arrangement "https://github.com/alexprofmutua/neatify/blob/main/neatify.py"
click node_rules "https://github.com/alexprofmutua/neatify/blob/main/rules.py"
click node_sqlite "https://github.com/alexprofmutua/neatify/blob/main/sqlite_store.py"
click node_journal "https://github.com/alexprofmutua/neatify/blob/main/journal.py"
click node_preferences "https://github.com/alexprofmutua/neatify/blob/main/app_settings.py"
click node_paths "https://github.com/alexprofmutua/neatify/blob/main/app_paths.py"
click node_launcher "https://github.com/alexprofmutua/neatify/blob/main/gui.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_window,node_ui_helpers,node_app_style,node_runtime_state,node_user toneBlue
class node_arrangement,node_rules toneAmber
class node_sqlite,node_journal toneMint
class node_preferences,node_paths,node_launcher toneRose
class node_filesystem toneIndigo
```

## Components

### Desktop interface

- [Main window](https://github.com/alexprofmutua/neatify/blob/main/window.py): `window.py`
- [UI components](https://github.com/alexprofmutua/neatify/blob/main/components.py): `components.py`
- [Theme styling](https://github.com/alexprofmutua/neatify/blob/main/style.py): `style.py`
- [Runtime state](https://github.com/alexprofmutua/neatify/blob/main/state.py): `state.py`

### File organization

- [Arrange and undo](https://github.com/alexprofmutua/neatify/blob/main/neatify.py): `neatify.py`
- [Rules and search](https://github.com/alexprofmutua/neatify/blob/main/rules.py): `rules.py`

### History and recovery

- [History database](https://github.com/alexprofmutua/neatify/blob/main/sqlite_store.py): `sqlite_store.py`
- [Operation journal](https://github.com/alexprofmutua/neatify/blob/main/journal.py): `journal.py`

### App support

- [Preferences](https://github.com/alexprofmutua/neatify/blob/main/app_settings.py): `app_settings.py`
- [App data paths](https://github.com/alexprofmutua/neatify/blob/main/app_paths.py): `app_paths.py`
- [App launcher](https://github.com/alexprofmutua/neatify/blob/main/gui.py): `gui.py`

### Other components

- **User**
- **Local files**

## Connections

- User → Main window: uses (evidence: `README.md`)
- App launcher → Main window: opens (evidence: `gui.py`)
- Main window → UI components: builds with (evidence: `window.py`)
- Main window → Theme styling: applies (evidence: `window.py`)
- Main window → Runtime state: uses (evidence: `window.py`)
- Main window → Preferences: loads and saves (evidence: `window.py`)
- Preferences → App data paths: gets data path (evidence: `app_settings.py`)
- Main window → Arrange and undo: requests preview and moves (evidence: `window.py`)
- Main window → Rules and search: requests search (evidence: `window.py`)
- Arrange and undo → Rules and search: classifies files (evidence: `neatify.py`)
- Arrange and undo → Local files: moves and restores (evidence: `README.md`)
- Arrange and undo → History database: records operations (evidence: `neatify.py`)
- Arrange and undo → Operation journal: records move states (evidence: `neatify.py`)
- Arrange and undo → App data paths: gets data paths (evidence: `neatify.py`)
- Operation journal → App data paths: gets journal path (evidence: `journal.py`)
- History database → App data paths: gets database path (evidence: `sqlite_store.py`)
- Rules and search → App data paths: gets rules path (evidence: `rules.py`)
- User → Local files: chooses folder (evidence: `README.md`)
- Main window → History database: reviews and exports history
