# dayumcodes/snapline architecture

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

- Interactive diagram: https://gitdiagram.com/dayumcodes/snapline
- Repository: https://github.com/dayumcodes/snapline

## Overview

Snapline is a Windows screenshot shelf: it collects captures or imported images, displays recent files as an interactive top-edge line, and lets users copy, open, share, or annotate them. `Source/Program.cs` contains the main application and its shelf, rendering, capture, file, and settings responsibilities; the two Snipping Tool modules implement the markup handoff. README documents several workflows whose implementation details are not visible in the excerpts, so those links are cited to the README. Native Windows integration is documented but not yet tested on Windows 11.

Main entry points: [`Source/Program.cs`](https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs) (Screenshot cards), [`Source/SnippingToolEditor.cs`](https://github.com/dayumcodes/snapline/blob/main/Source/SnippingToolEditor.cs) (Editor routing), [`Source/SnippingToolToken.cs`](https://github.com/dayumcodes/snapline/blob/main/Source/SnippingToolToken.cs) (Shared-file token)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shelf["Shelf interface"]
  node_shelf_ui["Shelf window<br/>[Program.cs]"]
  node_cards["Screenshot cards<br/>[Program.cs]"]
  node_renderer["Shelf renderer<br/>[Program.cs]"]
  node_tray["Tray and shortcuts<br/>[Program.cs]"]
end

subgraph group_capture["Capture and sources"]
  node_capture["Capture actions<br/>[Program.cs]"]
  node_sources["Watched and imported images<br/>[Program.cs]"]
end

subgraph group_files["Image and shelf state"]
  node_image_ops["Image actions<br/>[Program.cs]"]
  node_settings[("Shelf settings<br/>[Program.cs]")]
end

subgraph group_markup["Markup handoff"]
  node_editor["Editor routing"]
  node_token["Shared-file token"]
end

node_user(("User"))
node_windows["Windows services"]
node_snipping_tool["Snipping Tool"]
node_other_apps["Other applications"]

node_user -->|"uses"| node_shelf_ui
node_tray -->|"controls"| node_shelf_ui
node_capture -->|"saves captures"| node_sources
node_sources -->|"adds images"| node_cards
node_user -->|"imports images"| node_sources
node_cards -->|"renders cards"| node_renderer
node_cards -->|"invokes actions"| node_image_ops
node_image_ops -->|"copies or opens"| node_windows
node_image_ops -->|"drops files"| node_other_apps
node_shelf_ui -->|"restores and saves"| node_settings
node_user -->|"requests capture"| node_capture
node_cards -->|"requests markup"| node_editor
node_editor -->|"tries token route"| node_token
node_token -->|"launches annotation"| node_snipping_tool
node_editor -->|"activates file fallback"| node_snipping_tool
node_user -->|"drags files"| node_other_apps

click node_shelf_ui "https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs"
click node_cards "https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs"
click node_renderer "https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs"
click node_tray "https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs"
click node_capture "https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs"
click node_sources "https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs"
click node_image_ops "https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs"
click node_settings "https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs"
click node_editor "https://github.com/dayumcodes/snapline/blob/main/Source/SnippingToolEditor.cs"
click node_token "https://github.com/dayumcodes/snapline/blob/main/Source/SnippingToolToken.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_shelf_ui,node_cards,node_renderer,node_tray,node_user toneBlue
class node_capture,node_sources toneAmber
class node_image_ops,node_settings toneMint
class node_editor,node_token toneRose
class node_windows,node_snipping_tool,node_other_apps toneIndigo
```

## Components

### Shelf interface

- [Shelf window](https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs): `Source/Program.cs`
- [Screenshot cards](https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs): `Source/Program.cs`
- [Shelf renderer](https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs): `Source/Program.cs`
- [Tray and shortcuts](https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs): `Source/Program.cs`

### Capture and sources

- [Capture actions](https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs): `Source/Program.cs`
- [Watched and imported images](https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs): `Source/Program.cs`

### Image and shelf state

- [Image actions](https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs): `Source/Program.cs`
- [Shelf settings](https://github.com/dayumcodes/snapline/blob/main/Source/Program.cs): `Source/Program.cs`

### Markup handoff

- [Editor routing](https://github.com/dayumcodes/snapline/blob/main/Source/SnippingToolEditor.cs): `Source/SnippingToolEditor.cs`
- [Shared-file token](https://github.com/dayumcodes/snapline/blob/main/Source/SnippingToolToken.cs): `Source/SnippingToolToken.cs`

### Other components

- **User**
- **Windows services**
- **Snipping Tool**
- **Other applications**

## Connections

- User → Shelf window: uses (evidence: `README.md`)
- Tray and shortcuts → Shelf window: controls (evidence: `README.md`)
- Capture actions → Watched and imported images: saves captures (evidence: `README.md`)
- Watched and imported images → Screenshot cards: adds images (evidence: `README.md`)
- User → Watched and imported images: imports images (evidence: `README.md`)
- Screenshot cards → Shelf renderer: renders cards (evidence: `Source/Program.cs`)
- Screenshot cards → Image actions: invokes actions (evidence: `Source/Program.cs`)
- Image actions → Windows services: copies or opens (evidence: `README.md`)
- Image actions → Other applications: drops files (evidence: `README.md`)
- Shelf window → Shelf settings: restores and saves (evidence: `README.md`)
- User → Capture actions: requests capture (evidence: `README.md`)
- Screenshot cards → Editor routing: requests markup (evidence: `Source/Program.cs`)
- Editor routing → Shared-file token: tries token route (evidence: `Source/SnippingToolEditor.cs`)
- Shared-file token → Snipping Tool: launches annotation (evidence: `Source/SnippingToolToken.cs`)
- Editor routing → Snipping Tool: activates file fallback (evidence: `Source/SnippingToolEditor.cs`)
- User → Other applications: drags files (evidence: `README.md`)
