# jbmol/photographyfolderstructure architecture

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

- Interactive diagram: https://gitdiagram.com/jbmol/photographyfolderstructure
- Repository: https://github.com/jbmol/photographyfolderstructure

## Overview

This small PyQt application lets a photographer choose a base directory and date, then creates year, month, day, and ARW/JPG/MP4 folders and reports the result. The graph separates UI entry, folder-generation stages, and configuration. Source excerpts show the UI invoking folder logic and the logic creating directories; no external service or persistent application database is involved.

Main entry points: [`ui.py`](https://github.com/jbmol/photographyfolderstructure/blob/main/ui.py) (Folder UI), [`folder_logic.py`](https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.py) (Date path builder), [`constants.py`](https://github.com/jbmol/photographyfolderstructure/blob/main/constants.py) (Default path), [`main.py`](https://github.com/jbmol/photographyfolderstructure/blob/main/main.py) (App launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_launcher["App launcher<br/>[main.py]"]
end

subgraph group_interface["Desktop interface"]
  node_folder_ui["Folder UI<br/>[ui.py]"]
  node_path_picker["Directory picker<br/>[ui.py]"]
  node_date_picker["Date selector<br/>[ui.py]"]
  node_status["Status display<br/>[ui.py]"]
end

subgraph group_generation["Folder generation"]
  node_path_builder["Date path builder<br/>[folder_logic.py]"]
  node_year_dir["Year directory<br/>[folder_logic.py]"]
  node_month_dir["Month directory<br/>[folder_logic.py]"]
  node_day_dir["Day directory<br/>[folder_logic.py]"]
  node_media_dirs["Media directories<br/>[folder_logic.py]"]
end

subgraph group_configuration["Configuration"]
  node_defaults["Default path<br/>[constants.py]"]
end

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

node_user -->|"uses"| node_folder_ui
node_launcher -->|"opens"| node_folder_ui
node_folder_ui -->|"opens"| node_path_picker
node_folder_ui -->|"selects date"| node_date_picker
node_folder_ui -->|"loads default"| node_defaults
node_folder_ui -->|"requests creation"| node_path_builder
node_path_builder -->|"uses month names"| node_defaults
node_path_builder -->|"builds path"| node_year_dir
node_path_builder -->|"builds path"| node_month_dir
node_path_builder -->|"builds path"| node_day_dir
node_path_builder -->|"adds subfolders"| node_media_dirs
node_year_dir -->|"creates directories"| node_filesystem
node_month_dir -->|"creates directories"| node_filesystem
node_day_dir -->|"creates directories"| node_filesystem
node_media_dirs -->|"creates directories"| node_filesystem
node_folder_ui -->|"reports outcome"| node_status

click node_launcher "https://github.com/jbmol/photographyfolderstructure/blob/main/main.py"
click node_folder_ui "https://github.com/jbmol/photographyfolderstructure/blob/main/ui.py"
click node_path_picker "https://github.com/jbmol/photographyfolderstructure/blob/main/ui.py"
click node_date_picker "https://github.com/jbmol/photographyfolderstructure/blob/main/ui.py"
click node_status "https://github.com/jbmol/photographyfolderstructure/blob/main/ui.py"
click node_defaults "https://github.com/jbmol/photographyfolderstructure/blob/main/constants.py"
click node_path_builder "https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.py"
click node_year_dir "https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.py"
click node_month_dir "https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.py"
click node_day_dir "https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.py"
click node_media_dirs "https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.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 toneBlue
class node_folder_ui,node_path_picker,node_date_picker,node_status,node_filesystem toneAmber
class node_path_builder,node_year_dir,node_month_dir,node_day_dir,node_media_dirs toneMint
class node_defaults toneRose
class node_user toneIndigo
```

## Components

### Application entry

- [App launcher](https://github.com/jbmol/photographyfolderstructure/blob/main/main.py): `main.py`

### Desktop interface

- [Folder UI](https://github.com/jbmol/photographyfolderstructure/blob/main/ui.py): `ui.py`
- [Directory picker](https://github.com/jbmol/photographyfolderstructure/blob/main/ui.py): `ui.py`
- [Date selector](https://github.com/jbmol/photographyfolderstructure/blob/main/ui.py): `ui.py`
- [Status display](https://github.com/jbmol/photographyfolderstructure/blob/main/ui.py): `ui.py`

### Folder generation

- [Date path builder](https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.py): `folder_logic.py`
- [Year directory](https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.py): `folder_logic.py`
- [Month directory](https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.py): `folder_logic.py`
- [Day directory](https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.py): `folder_logic.py`
- [Media directories](https://github.com/jbmol/photographyfolderstructure/blob/main/folder_logic.py): `folder_logic.py`

### Configuration

- [Default path](https://github.com/jbmol/photographyfolderstructure/blob/main/constants.py): `constants.py`

### Other components

- **Photographer**
- **Local filesystem**

## Connections

- Photographer → Folder UI: uses (evidence: `README.md`)
- App launcher → Folder UI: opens (evidence: `main.py`)
- Folder UI → Directory picker: opens (evidence: `ui.py`)
- Folder UI → Date selector: selects date (evidence: `ui.py`)
- Folder UI → Default path: loads default (evidence: `ui.py`)
- Folder UI → Date path builder: requests creation (evidence: `ui.py`)
- Date path builder → Default path: uses month names (evidence: `folder_logic.py`)
- Date path builder → Year directory: builds path (evidence: `folder_logic.py`)
- Date path builder → Month directory: builds path (evidence: `folder_logic.py`)
- Date path builder → Day directory: builds path (evidence: `folder_logic.py`)
- Date path builder → Media directories: adds subfolders (evidence: `folder_logic.py`)
- Year directory → Local filesystem: creates directories (evidence: `folder_logic.py`)
- Month directory → Local filesystem: creates directories (evidence: `folder_logic.py`)
- Day directory → Local filesystem: creates directories (evidence: `folder_logic.py`)
- Media directories → Local filesystem: creates directories (evidence: `folder_logic.py`)
- Folder UI → Status display: reports outcome (evidence: `ui.py`)
