# nestoralfaro/photo-editor architecture

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

- Interactive diagram: https://gitdiagram.com/nestoralfaro/photo-editor
- Repository: https://github.com/nestoralfaro/photo-editor

## Overview

Photo Editor is a Windows Forms desktop app for browsing pictures in a chosen directory and editing an opened image. The user starts at the main window, selects a folder and image, then works in the editor; edits include color/invert/brightness operations, cancellation/progress, and Save As. The README also notes resizable tree/list panes and folder icons. Edges reflect calls and event registration visible in the excerpts; the editor excerpt is partial, so other save behavior is not inferred.

Main entry points: [`MainForm.cs`](https://github.com/nestoralfaro/photo-editor/blob/master/MainForm.cs) (Main Window), [`EditPhotoForm.cs`](https://github.com/nestoralfaro/photo-editor/blob/master/EditPhotoForm.cs) (Photo Editor), [`Program.cs`](https://github.com/nestoralfaro/photo-editor/blob/master/Program.cs) (App Startup), [`progressForm.cs`](https://github.com/nestoralfaro/photo-editor/blob/master/progressForm.cs) (Edit Progress)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application UI"]
  node_startup["App Startup<br/>[Program.cs]"]
  node_main["Main Window<br/>[MainForm.cs]"]
end

subgraph group_browse["Photo Browsing"]
  node_foldertree["Folder Tree<br/>[MainForm.cs]"]
  node_photoindex["Photo List<br/>[MainForm.cs]"]
  node_localfiles[("Local Filesystem")]
end

subgraph group_edit["Image Editing"]
  node_editor["Photo Editor<br/>[EditPhotoForm.cs]"]
  node_pixeltools["Pixel Adjustments<br/>[EditPhotoForm.cs]"]
  node_saveas["Save As<br/>[EditPhotoForm.cs]"]
end

subgraph group_dialogs["Dialogs and Feedback"]
  node_progress["Edit Progress<br/>[progressForm.cs]"]
  node_about["About Dialog<br/>[AboutBox.cs]"]
end

node_user(("User"))
node_explorer["Windows Explorer"]

node_user -->|"launches"| node_startup
node_startup -->|"runs"| node_main
node_user -->|"browses"| node_main
node_main -->|"populates"| node_foldertree
node_foldertree -->|"reads folders"| node_localfiles
node_main -->|"populates"| node_photoindex
node_photoindex -->|"reads images"| node_localfiles
node_user -->|"selects image"| node_photoindex
node_main -->|"opens"| node_editor
node_editor -->|"loads image"| node_localfiles
node_user -->|"edits image"| node_pixeltools
node_editor -->|"runs operations"| node_pixeltools
node_editor -->|"shows and registers"| node_progress
node_progress -->|"signals cancel"| node_editor
node_user -->|"chooses destination"| node_saveas
node_saveas -->|"writes image"| node_localfiles
node_user -->|"opens about"| node_about
node_main -->|"shows dialog"| node_about
node_user -->|"locates image"| node_explorer
node_main -->|"starts process"| node_explorer

click node_startup "https://github.com/nestoralfaro/photo-editor/blob/master/Program.cs"
click node_main "https://github.com/nestoralfaro/photo-editor/blob/master/MainForm.cs"
click node_foldertree "https://github.com/nestoralfaro/photo-editor/blob/master/MainForm.cs"
click node_photoindex "https://github.com/nestoralfaro/photo-editor/blob/master/MainForm.cs"
click node_editor "https://github.com/nestoralfaro/photo-editor/blob/master/EditPhotoForm.cs"
click node_pixeltools "https://github.com/nestoralfaro/photo-editor/blob/master/EditPhotoForm.cs"
click node_saveas "https://github.com/nestoralfaro/photo-editor/blob/master/EditPhotoForm.cs"
click node_progress "https://github.com/nestoralfaro/photo-editor/blob/master/progressForm.cs"
click node_about "https://github.com/nestoralfaro/photo-editor/blob/master/AboutBox.cs"

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_startup,node_main,node_user toneBlue
class node_foldertree,node_photoindex,node_localfiles toneAmber
class node_editor,node_pixeltools,node_saveas toneMint
class node_progress,node_about toneRose
class node_explorer toneIndigo
```

## Components

### Application UI

- [App Startup](https://github.com/nestoralfaro/photo-editor/blob/master/Program.cs): `Program.cs`
- [Main Window](https://github.com/nestoralfaro/photo-editor/blob/master/MainForm.cs): `MainForm.cs`

### Photo Browsing

- [Folder Tree](https://github.com/nestoralfaro/photo-editor/blob/master/MainForm.cs): `MainForm.cs`
- [Photo List](https://github.com/nestoralfaro/photo-editor/blob/master/MainForm.cs): `MainForm.cs`
- **Local Filesystem**

### Image Editing

- [Photo Editor](https://github.com/nestoralfaro/photo-editor/blob/master/EditPhotoForm.cs): `EditPhotoForm.cs`
- [Pixel Adjustments](https://github.com/nestoralfaro/photo-editor/blob/master/EditPhotoForm.cs): `EditPhotoForm.cs`
- [Save As](https://github.com/nestoralfaro/photo-editor/blob/master/EditPhotoForm.cs): `EditPhotoForm.cs`

### Dialogs and Feedback

- [Edit Progress](https://github.com/nestoralfaro/photo-editor/blob/master/progressForm.cs): `progressForm.cs`
- [About Dialog](https://github.com/nestoralfaro/photo-editor/blob/master/AboutBox.cs): `AboutBox.cs`

### Other components

- **User**
- **Windows Explorer**

## Connections

- User → App Startup: launches
- App Startup → Main Window: runs (evidence: `Program.cs`)
- User → Main Window: browses (evidence: `README.md`)
- Main Window → Folder Tree: populates (evidence: `MainForm.cs`)
- Folder Tree → Local Filesystem: reads folders (evidence: `MainForm.cs`)
- Main Window → Photo List: populates (evidence: `MainForm.cs`)
- Photo List → Local Filesystem: reads images (evidence: `MainForm.cs`)
- User → Photo List: selects image (evidence: `MainForm.cs`)
- Main Window → Photo Editor: opens (evidence: `MainForm.cs`)
- Photo Editor → Local Filesystem: loads image (evidence: `EditPhotoForm.cs`)
- User → Pixel Adjustments: edits image (evidence: `EditPhotoForm.cs`)
- Photo Editor → Pixel Adjustments: runs operations (evidence: `EditPhotoForm.cs`)
- Photo Editor → Edit Progress: shows and registers (evidence: `EditPhotoForm.cs`)
- Edit Progress → Photo Editor: signals cancel (evidence: `progressForm.cs`)
- User → Save As: chooses destination (evidence: `EditPhotoForm.cs`)
- Save As → Local Filesystem: writes image (evidence: `EditPhotoForm.cs`)
- User → About Dialog: opens about
- Main Window → About Dialog: shows dialog (evidence: `MainForm.cs`)
- User → Windows Explorer: locates image
- Main Window → Windows Explorer: starts process (evidence: `MainForm.cs`)
