# molunerfinn/picgo architecture

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

- Interactive diagram: https://gitdiagram.com/molunerfinn/picgo
- Repository: https://github.com/molunerfinn/picgo

## Overview

PicGo is an Electron image-upload desktop app. A creator submits images by drag-and-drop, clipboard, hotkey, or context menu; PicGo uploads through a configured host or plugin, then copies a formatted link. The app also manages upload history, albums, plugins, settings, and PicGo Cloud features, with an HTTP API for integrations. The graph combines README-documented capabilities with relationships visible in sampled source and the source index; unsampled implementation details are represented by their existing directories, and uncertain links are omitted.

Main entry points: [`src/renderer/routeTree.gen.ts`](https://github.com/molunerfinn/picgo/blob/dev/src/renderer/routeTree.gen.ts) (App routes), [`src/main/apis/app/uploader/apis.ts`](https://github.com/molunerfinn/picgo/blob/dev/src/main/apis/app/uploader/apis.ts) (Upload services), [`src/renderer/components/main/dashboard`](https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/dashboard) (Upload dashboard), [`src/main/lifeCycle/index.ts`](https://github.com/molunerfinn/picgo/blob/dev/src/main/lifeCycle/index.ts) (App lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_renderer["Desktop interface"]
  node_renderer_boot["Renderer bootstrap<br/>[main.tsx]"]
  node_app_shell["App shell<br/>[App.tsx]"]
  node_routes["App routes<br/>[routeTree.gen.ts]"]
end

subgraph group_upload["Upload workflow"]
  node_dashboard["Upload dashboard"]
  node_uploader_api["Upload services<br/>[apis.ts]"]
  node_picgo_core["PicGo Core<br/>[index.ts]"]
  node_link_copy["Link formatting<br/>[pasteTemplate.ts]"]
end

subgraph group_management["Content and extensions"]
  node_album["Image album"]
  node_providers["Host configurations"]
  node_plugins["Plugin manager"]
  node_settings["Preferences"]
end

subgraph group_cloud["PicGo Cloud"]
  node_cloud_ui["Cloud workspace<br/>[picgo-cloud.tsx]"]
  node_cloud_rpc["Cloud services<br/>[cloud.ts]"]
end

subgraph group_runtime["Electron runtime"]
  node_http_api["HTTP API<br/>[index.ts]"]
  node_window_manager["Window manager<br/>[windowManager.ts]"]
  node_lifecycle["App lifecycle<br/>[index.ts]"]
  node_ipc_rpc["IPC and RPC"]
  node_shortcuts["Global shortcuts<br/>[shortKeyHandler.ts]"]
end

node_creator(("Creator"))
node_editor(("Writing editor"))
node_image_hosts{{"Image hosts"}}
node_cloud_service{{"PicGo Cloud"}}

node_creator -->|"starts app"| node_renderer_boot
node_renderer_boot -->|"renders"| node_app_shell
node_app_shell -->|"provides routes"| node_routes
node_creator -->|"submits images"| node_dashboard
node_dashboard -.->|"requests upload"| node_uploader_api
node_uploader_api -.->|"uses core"| node_picgo_core
node_picgo_core -->|"uploads images"| node_image_hosts
node_uploader_api -.->|"formats result"| node_link_copy
node_link_copy -->|"copies link"| node_editor
node_editor -->|"requests upload"| node_http_api
node_lifecycle -->|"initializes windows"| node_window_manager
node_lifecycle -->|"registers IPC"| node_ipc_rpc
node_shortcuts -->|"opens upload"| node_uploader_api
node_creator -->|"invokes hotkey"| node_shortcuts
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_album
node_routes -->|"routes to"| node_cloud_ui
node_routes -->|"routes to"| node_plugins
node_routes -->|"routes to"| node_providers
node_routes -->|"routes to"| node_settings
node_cloud_ui -.->|"requests cloud"| node_cloud_rpc
node_cloud_rpc -.->|"accesses account"| node_cloud_service
node_creator -->|"manages plugins"| node_plugins
node_creator -.->|"manages images"| node_album

click node_renderer_boot "https://github.com/molunerfinn/picgo/blob/dev/src/renderer/main.tsx"
click node_app_shell "https://github.com/molunerfinn/picgo/blob/dev/src/renderer/App.tsx"
click node_routes "https://github.com/molunerfinn/picgo/blob/dev/src/renderer/routeTree.gen.ts"
click node_dashboard "https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/dashboard"
click node_uploader_api "https://github.com/molunerfinn/picgo/blob/dev/src/main/apis/app/uploader/apis.ts"
click node_picgo_core "https://github.com/molunerfinn/picgo/blob/dev/src/main/apis/core/picgo/index.ts"
click node_link_copy "https://github.com/molunerfinn/picgo/blob/dev/src/main/utils/pasteTemplate.ts"
click node_http_api "https://github.com/molunerfinn/picgo/blob/dev/src/main/server/index.ts"
click node_window_manager "https://github.com/molunerfinn/picgo/blob/dev/src/main/apis/app/window/windowManager.ts"
click node_lifecycle "https://github.com/molunerfinn/picgo/blob/dev/src/main/lifeCycle/index.ts"
click node_ipc_rpc "https://github.com/molunerfinn/picgo/tree/dev/src/main/events/rpc"
click node_shortcuts "https://github.com/molunerfinn/picgo/blob/dev/src/main/apis/app/shortKey/shortKeyHandler.ts"
click node_album "https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/album"
click node_providers "https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/providers"
click node_plugins "https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/plugins"
click node_settings "https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/settings"
click node_cloud_ui "https://github.com/molunerfinn/picgo/blob/dev/src/renderer/components/main/cloud/picgo-cloud.tsx"
click node_cloud_rpc "https://github.com/molunerfinn/picgo/blob/dev/src/main/events/rpc/routes/cloud.ts"

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_renderer_boot,node_app_shell,node_routes toneBlue
class node_dashboard,node_uploader_api,node_picgo_core,node_link_copy toneAmber
class node_album,node_providers,node_plugins,node_settings toneMint
class node_cloud_ui,node_cloud_rpc toneRose
class node_http_api,node_window_manager,node_lifecycle,node_ipc_rpc,node_shortcuts,node_creator,node_editor,node_image_hosts,node_cloud_service toneIndigo
```

## Components

### Desktop interface

- [Renderer bootstrap](https://github.com/molunerfinn/picgo/blob/dev/src/renderer/main.tsx): `src/renderer/main.tsx`
- [App shell](https://github.com/molunerfinn/picgo/blob/dev/src/renderer/App.tsx): `src/renderer/App.tsx`
- [App routes](https://github.com/molunerfinn/picgo/blob/dev/src/renderer/routeTree.gen.ts): `src/renderer/routeTree.gen.ts`

### Upload workflow

- [Upload dashboard](https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/dashboard): `src/renderer/components/main/dashboard`
- [Upload services](https://github.com/molunerfinn/picgo/blob/dev/src/main/apis/app/uploader/apis.ts): `src/main/apis/app/uploader/apis.ts`
- [PicGo Core](https://github.com/molunerfinn/picgo/blob/dev/src/main/apis/core/picgo/index.ts): `src/main/apis/core/picgo/index.ts`
- [Link formatting](https://github.com/molunerfinn/picgo/blob/dev/src/main/utils/pasteTemplate.ts): `src/main/utils/pasteTemplate.ts`

### Content and extensions

- [Image album](https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/album): `src/renderer/components/main/album`
- [Host configurations](https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/providers): `src/renderer/components/main/providers`
- [Plugin manager](https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/plugins): `src/renderer/components/main/plugins`
- [Preferences](https://github.com/molunerfinn/picgo/tree/dev/src/renderer/components/main/settings): `src/renderer/components/main/settings`

### PicGo Cloud

- [Cloud workspace](https://github.com/molunerfinn/picgo/blob/dev/src/renderer/components/main/cloud/picgo-cloud.tsx): `src/renderer/components/main/cloud/picgo-cloud.tsx`
- [Cloud services](https://github.com/molunerfinn/picgo/blob/dev/src/main/events/rpc/routes/cloud.ts): `src/main/events/rpc/routes/cloud.ts`

### Electron runtime

- [HTTP API](https://github.com/molunerfinn/picgo/blob/dev/src/main/server/index.ts): `src/main/server/index.ts`
- [Window manager](https://github.com/molunerfinn/picgo/blob/dev/src/main/apis/app/window/windowManager.ts): `src/main/apis/app/window/windowManager.ts`
- [App lifecycle](https://github.com/molunerfinn/picgo/blob/dev/src/main/lifeCycle/index.ts): `src/main/lifeCycle/index.ts`
- [IPC and RPC](https://github.com/molunerfinn/picgo/tree/dev/src/main/events/rpc): `src/main/events/rpc`
- [Global shortcuts](https://github.com/molunerfinn/picgo/blob/dev/src/main/apis/app/shortKey/shortKeyHandler.ts): `src/main/apis/app/shortKey/shortKeyHandler.ts`

### Other components

- **Creator**
- **Writing editor**
- **Image hosts**
- **PicGo Cloud**

## Connections

- Creator → Renderer bootstrap: starts app (evidence: `src/renderer/main.tsx`)
- Renderer bootstrap → App shell: renders (evidence: `src/renderer/main.tsx`)
- App shell → App routes: provides routes (evidence: `src/renderer/App.tsx`)
- Creator → Upload dashboard: submits images (evidence: `README.md`)
- Upload dashboard → Upload services: requests upload
- Upload services → PicGo Core: uses core
- PicGo Core → Image hosts: uploads images (evidence: `README.md`)
- Upload services → Link formatting: formats result
- Link formatting → Writing editor: copies link (evidence: `README.md`)
- Writing editor → HTTP API: requests upload (evidence: `README.md`)
- App lifecycle → Window manager: initializes windows (evidence: `src/main/lifeCycle/index.ts`)
- App lifecycle → IPC and RPC: registers IPC (evidence: `src/main/lifeCycle/index.ts`)
- Global shortcuts → Upload services: opens upload
- Creator → Global shortcuts: invokes hotkey (evidence: `README.md`)
- App routes → Upload dashboard: routes to (evidence: `src/renderer/routeTree.gen.ts`)
- App routes → Image album: routes to (evidence: `src/renderer/routeTree.gen.ts`)
- App routes → Cloud workspace: routes to (evidence: `src/renderer/routeTree.gen.ts`)
- App routes → Plugin manager: routes to (evidence: `src/renderer/routeTree.gen.ts`)
- App routes → Host configurations: routes to (evidence: `src/renderer/routeTree.gen.ts`)
- App routes → Preferences: routes to (evidence: `src/renderer/routeTree.gen.ts`)
- Cloud workspace → Cloud services: requests cloud
- Cloud services → PicGo Cloud: accesses account
- Creator → Plugin manager: manages plugins (evidence: `README.md`)
- Creator → Image album: manages images
