# lekibbitz/artshot-x architecture

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

- Interactive diagram: https://gitdiagram.com/lekibbitz/artshot-x
- Repository: https://github.com/lekibbitz/artshot-x

## Overview

ArtShot X is a local macOS screenshot and screen-recording app. Its main flow is user selection or display choice, capture, then a floating preview for saving, copying, or editing. Separate workflows stitch manually scrolled captures and record screen, camera, and audio for later editing and MP4 export. The graph preserves these product stages and key internal services. Edges are limited to relationships shown in excerpts, the source index, or the README; unsampled implementation details are not assumed.

Main entry points: [`Sources/ArtShotX/AppDelegate.swift`](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/AppDelegate.swift) (App coordinator), [`Sources/ArtShotX/RecordingController.swift`](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/RecordingController.swift) (Recording controls), [`Sources/ArtShotX/ScrollingCaptureController.swift`](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/ScrollingCaptureController.swift) (Scroll capture), [`Sources/ArtShotX/CaptureService.swift`](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CaptureService.swift) (Screen capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry_capture["Capture setup"]
  node_app["App coordinator<br/>[AppDelegate.swift]"]
  node_shortcuts["Global shortcuts"]
  node_capture_panel["Capture toolbar"]
  node_selection["Region selection"]
  node_geometry["Capture geometry"]
  node_capture_service["Screen capture"]
end

subgraph group_image_workflow["Image workflow"]
  node_scroll_controller["Scroll capture"]
  node_scroll_stitcher["Scroll stitching"]
  node_scroll_preview["Scroll preview"]
  node_quick_access["Capture thumbnail"]
  node_image_preview["Image editor"]
  node_annotation_canvas["Annotation canvas"]
end

subgraph group_recording["Recording"]
  node_recording_controller["Recording controls"]
  node_recording_bar["Recording remote"]
  node_camera_source["Live camera"]
  node_camera_layout["Camera layout<br/>[CameraLayout.swift]"]
  node_camera_overlay["Camera overlay"]
  node_screen_recorder["Screen recorder"]
  node_timeline["Recording timeline"]
end

subgraph group_video_edit["Video editing"]
  node_video_preview["Video editor"]
  node_recording_media["Recording composition"]
  node_camera_compositor["Camera compositor"]
end

subgraph group_persistence["Media library"]
  node_library[("Capture library")]
end

node_user(("User"))
node_screen_capture_kit["ScreenCaptureKit"]

node_user -->|"invokes"| node_shortcuts
node_user -->|"chooses capture"| node_capture_panel
node_app -->|"registers"| node_shortcuts
node_app -->|"coordinates"| node_capture_panel
node_app -->|"prepares region"| node_selection
node_app -->|"requests capture"| node_capture_service
node_selection -->|"uses geometry"| node_geometry
node_capture_service -->|"converts region"| node_geometry
node_capture_service -->|"captures image"| node_screen_capture_kit
node_app -->|"starts scrolling"| node_scroll_controller
node_scroll_controller -->|"captures samples"| node_capture_service
node_scroll_controller -->|"aligns frames"| node_scroll_stitcher
node_scroll_controller -->|"updates preview"| node_scroll_preview
node_app -->|"presents captures"| node_quick_access
node_quick_access -->|"opens image"| node_image_preview
node_image_preview -->|"uses canvas"| node_annotation_canvas
node_app -->|"loads recent media"| node_library
node_user -->|"starts recording"| node_recording_controller
node_app -->|"coordinates"| node_recording_controller
node_recording_controller -->|"controls recording"| node_recording_bar
node_recording_controller -->|"starts camera"| node_camera_source
node_recording_controller -->|"shows camera"| node_camera_overlay
node_camera_overlay -->|"positions camera"| node_camera_layout
node_recording_controller -->|"records take"| node_screen_recorder
node_screen_recorder -->|"tracks segments"| node_timeline
node_app -->|"opens recording editor"| node_video_preview
node_video_preview -->|"prepares export"| node_recording_media
node_recording_media -->|"composites camera"| node_camera_compositor
node_recording_media -->|"applies layout"| node_camera_layout
node_video_preview -.->|"exports edited media"| node_library

click node_app "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/AppDelegate.swift"
click node_shortcuts "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/GlobalShortcuts.swift"
click node_capture_panel "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CapturePanelController.swift"
click node_selection "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/SelectionOverlay.swift"
click node_geometry "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotCore/CaptureGeometry.swift"
click node_capture_service "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CaptureService.swift"
click node_scroll_controller "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/ScrollingCaptureController.swift"
click node_scroll_stitcher "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotCore/ScrollStitcher.swift"
click node_scroll_preview "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/ScrollingPreviewView.swift"
click node_quick_access "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/QuickAccessController.swift"
click node_image_preview "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/PreviewWindowController.swift"
click node_annotation_canvas "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/AnnotationCanvas.swift"
click node_library "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CaptureLibrary.swift"
click node_recording_controller "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/RecordingController.swift"
click node_recording_bar "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/RecordingControlBar.swift"
click node_camera_source "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/LiveCameraSource.swift"
click node_camera_layout "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CameraLayout.swift"
click node_camera_overlay "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CameraOverlayController.swift"
click node_screen_recorder "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/ScreenRecorder.swift"
click node_timeline "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/RecordingTimeline.swift"
click node_video_preview "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/VideoPreviewWindowController.swift"
click node_recording_media "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/RecordingMedia.swift"
click node_camera_compositor "https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CameraVideoCompositor.swift"

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_app,node_shortcuts,node_capture_panel,node_selection,node_geometry,node_capture_service,node_user,node_screen_capture_kit toneBlue
class node_scroll_controller,node_scroll_stitcher,node_scroll_preview,node_quick_access,node_image_preview,node_annotation_canvas toneAmber
class node_recording_controller,node_recording_bar,node_camera_source,node_camera_layout,node_camera_overlay,node_screen_recorder,node_timeline toneMint
class node_video_preview,node_recording_media,node_camera_compositor toneRose
class node_library toneIndigo
```

## Components

### Capture setup

- [App coordinator](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/AppDelegate.swift): `Sources/ArtShotX/AppDelegate.swift`
- [Global shortcuts](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/GlobalShortcuts.swift): `Sources/ArtShotX/GlobalShortcuts.swift`
- [Capture toolbar](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CapturePanelController.swift): `Sources/ArtShotX/CapturePanelController.swift`
- [Region selection](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/SelectionOverlay.swift): `Sources/ArtShotX/SelectionOverlay.swift`
- [Capture geometry](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotCore/CaptureGeometry.swift): `Sources/ArtShotCore/CaptureGeometry.swift`
- [Screen capture](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CaptureService.swift): `Sources/ArtShotX/CaptureService.swift`

### Image workflow

- [Scroll capture](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/ScrollingCaptureController.swift): `Sources/ArtShotX/ScrollingCaptureController.swift`
- [Scroll stitching](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotCore/ScrollStitcher.swift): `Sources/ArtShotCore/ScrollStitcher.swift`
- [Scroll preview](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/ScrollingPreviewView.swift): `Sources/ArtShotX/ScrollingPreviewView.swift`
- [Capture thumbnail](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/QuickAccessController.swift): `Sources/ArtShotX/QuickAccessController.swift`
- [Image editor](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/PreviewWindowController.swift): `Sources/ArtShotX/PreviewWindowController.swift`
- [Annotation canvas](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/AnnotationCanvas.swift): `Sources/ArtShotX/AnnotationCanvas.swift`

### Recording

- [Recording controls](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/RecordingController.swift): `Sources/ArtShotX/RecordingController.swift`
- [Recording remote](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/RecordingControlBar.swift): `Sources/ArtShotX/RecordingControlBar.swift`
- [Live camera](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/LiveCameraSource.swift): `Sources/ArtShotX/LiveCameraSource.swift`
- [Camera layout](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CameraLayout.swift): `Sources/ArtShotX/CameraLayout.swift`
- [Camera overlay](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CameraOverlayController.swift): `Sources/ArtShotX/CameraOverlayController.swift`
- [Screen recorder](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/ScreenRecorder.swift): `Sources/ArtShotX/ScreenRecorder.swift`
- [Recording timeline](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/RecordingTimeline.swift): `Sources/ArtShotX/RecordingTimeline.swift`

### Video editing

- [Video editor](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/VideoPreviewWindowController.swift): `Sources/ArtShotX/VideoPreviewWindowController.swift`
- [Recording composition](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/RecordingMedia.swift): `Sources/ArtShotX/RecordingMedia.swift`
- [Camera compositor](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CameraVideoCompositor.swift): `Sources/ArtShotX/CameraVideoCompositor.swift`

### Media library

- [Capture library](https://github.com/lekibbitz/artshot-x/blob/main/Sources/ArtShotX/CaptureLibrary.swift): `Sources/ArtShotX/CaptureLibrary.swift`

### Other components

- **User**
- **ScreenCaptureKit**

## Connections

- User → Global shortcuts: invokes (evidence: `README.md`)
- User → Capture toolbar: chooses capture (evidence: `README.md`)
- App coordinator → Global shortcuts: registers (evidence: `Sources/ArtShotX/AppDelegate.swift`)
- App coordinator → Capture toolbar: coordinates (evidence: `Sources/ArtShotX/AppDelegate.swift`)
- App coordinator → Region selection: prepares region (evidence: `Sources/ArtShotX/AppDelegate.swift`)
- App coordinator → Screen capture: requests capture (evidence: `Sources/ArtShotX/AppDelegate.swift`)
- Region selection → Capture geometry: uses geometry (evidence: `Sources/ArtShotX/SelectionOverlay.swift`)
- Screen capture → Capture geometry: converts region (evidence: `Sources/ArtShotX/CaptureService.swift`)
- Screen capture → ScreenCaptureKit: captures image (evidence: `Sources/ArtShotX/CaptureService.swift`)
- App coordinator → Scroll capture: starts scrolling (evidence: `Sources/ArtShotX/AppDelegate.swift`)
- Scroll capture → Screen capture: captures samples (evidence: `Sources/ArtShotX/ScrollingCaptureController.swift`)
- Scroll capture → Scroll stitching: aligns frames (evidence: `Sources/ArtShotX/ScrollingCaptureController.swift`)
- Scroll capture → Scroll preview: updates preview (evidence: `Sources/ArtShotX/ScrollingCaptureController.swift`)
- App coordinator → Capture thumbnail: presents captures (evidence: `Sources/ArtShotX/AppDelegate.swift`)
- Capture thumbnail → Image editor: opens image (evidence: `README.md`)
- Image editor → Annotation canvas: uses canvas (evidence: `Sources/ArtShotX/PreviewWindowController.swift`)
- App coordinator → Capture library: loads recent media (evidence: `Sources/ArtShotX/AppDelegate.swift`)
- User → Recording controls: starts recording (evidence: `README.md`)
- App coordinator → Recording controls: coordinates (evidence: `Sources/ArtShotX/AppDelegate.swift`)
- Recording controls → Recording remote: controls recording (evidence: `Sources/ArtShotX/RecordingController.swift`)
- Recording controls → Live camera: starts camera (evidence: `Sources/ArtShotX/RecordingController.swift`)
- Recording controls → Camera overlay: shows camera (evidence: `Sources/ArtShotX/RecordingController.swift`)
- Camera overlay → Camera layout: positions camera (evidence: `Sources/ArtShotX/CameraOverlayController.swift`)
- Recording controls → Screen recorder: records take (evidence: `Sources/ArtShotX/RecordingController.swift`)
- Screen recorder → Recording timeline: tracks segments (evidence: `Sources/ArtShotX/ScreenRecorder.swift`)
- App coordinator → Video editor: opens recording editor (evidence: `Sources/ArtShotX/AppDelegate.swift`)
- Video editor → Recording composition: prepares export (evidence: `README.md`)
- Recording composition → Camera compositor: composites camera (evidence: `Sources/ArtShotX/RecordingMedia.swift`)
- Recording composition → Camera layout: applies layout (evidence: `Sources/ArtShotX/RecordingMedia.swift`)
- Video editor → Capture library: exports edited media
