# kde/digikam architecture

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

- Interactive diagram: https://gitdiagram.com/kde/digikam
- Repository: https://github.com/kde/digikam

## Overview

digiKam is a desktop photo-management application. Its principal workflow brings images in from cameras or storage, organizes and searches them in a photo library, and supports viewing, editing, and sharing. Major documented branches include face recognition, geolocation, batch processing, and web-service tools. The README documents capabilities but not most internal wiring; source evidence is limited to the supplied excerpts and SOURCE INDEX, so uncertain implementation links are omitted.

Main entry points: [`core/app/items/views/digikamitemview.cpp`](https://github.com/kde/digikam/blob/master/core/app/items/views/digikamitemview.cpp) (Photo browsing), [`core/app/main/main.cpp`](https://github.com/kde/digikam/blob/master/core/app/main/main.cpp) (Application entry), [`core/app/main/digikamapp.cpp`](https://github.com/kde/digikam/blob/master/core/app/main/digikamapp.cpp) (Main window), [`core/utilities/import/backend/cameracontroller.cpp`](https://github.com/kde/digikam/blob/master/core/utilities/import/backend/cameracontroller.cpp) (Camera import)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_entry["Application entry<br/>[main.cpp]"]
  node_window["Main window<br/>[digikamapp.cpp]"]
end

subgraph group_library["Library management"]
  node_import["Camera import"]
  node_itemdrag["Item drag data<br/>[ddragobjects.h]"]
  node_browse["Photo browsing"]
  node_filters["Photo filtering"]
  node_metadata["Metadata engine<br/>[metaengine.h]"]
  node_database[("Photo database")]
end

subgraph group_media["Image workflows"]
  node_preview["Image preview"]
  node_editor["Image editor tools"]
  node_batch["Batch processing"]
  node_faces["Face pipeline<br/>[facepipeline.cpp]"]
  node_geolocation["Geolocation tools"]
end

subgraph group_extensions["Extended tools"]
  node_panorama["Panorama tool<br/>[panomanager.cpp]"]
  node_exposure["Exposure blending"]
  node_webservices["Web services"]
  node_showfoto["Standalone viewer<br/>[main.cpp]"]
end

node_user(("Photographer"))

node_user -->|"launches"| node_entry
node_entry -->|"creates"| node_window
node_user -.->|"imports media"| node_import
node_user -.->|"manages photos"| node_browse
node_browse -.->|"filters results"| node_filters
node_browse -.->|"views items"| node_preview
node_user -.->|"edits images"| node_editor
node_user -.->|"processes batches"| node_batch
node_user -.->|"recognizes faces"| node_faces
node_user -.->|"maps photos"| node_geolocation
node_user -.->|"stitches panoramas"| node_panorama
node_user -.->|"blends exposures"| node_exposure
node_user -.->|"shares content"| node_webservices
node_user -.->|"opens images"| node_showfoto

click node_entry "https://github.com/kde/digikam/blob/master/core/app/main/main.cpp"
click node_window "https://github.com/kde/digikam/blob/master/core/app/main/digikamapp.cpp"
click node_import "https://github.com/kde/digikam/blob/master/core/utilities/import/backend/cameracontroller.cpp"
click node_itemdrag "https://github.com/kde/digikam/blob/master/core/app/dragdrop/ddragobjects.h"
click node_browse "https://github.com/kde/digikam/blob/master/core/app/items/views/digikamitemview.cpp"
click node_filters "https://github.com/kde/digikam/blob/master/core/app/filters/filtersidebarwidget.cpp"
click node_metadata "https://github.com/kde/digikam/blob/master/core/libs/metadataengine/engine/metaengine.h"
click node_database "https://github.com/kde/digikam/blob/master/core/libs/database/engine/dbenginesqlquery.cpp"
click node_preview "https://github.com/kde/digikam/blob/master/core/libs/dplugins/widgets/dpreviewmanager.cpp"
click node_editor "https://github.com/kde/digikam/blob/master/core/dplugins/editor/colors/adjustcurves/adjustcurvestool.cpp"
click node_batch "https://github.com/kde/digikam/tree/master/core/dplugins/bqm"
click node_faces "https://github.com/kde/digikam/blob/master/core/utilities/facemanagement/facepipeline.cpp"
click node_geolocation "https://github.com/kde/digikam/tree/master/core/utilities/geolocation/geoiface"
click node_panorama "https://github.com/kde/digikam/blob/master/core/dplugins/generic/tools/panorama/manager/panomanager.cpp"
click node_exposure "https://github.com/kde/digikam/blob/master/core/dplugins/generic/tools/expoblending/manager/expoblendingmanager.cpp"
click node_showfoto "https://github.com/kde/digikam/blob/master/core/showfoto/main/main.cpp"

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_entry,node_window toneBlue
class node_import,node_itemdrag,node_browse,node_filters,node_metadata,node_database toneAmber
class node_preview,node_editor,node_batch,node_faces,node_geolocation toneMint
class node_panorama,node_exposure,node_webservices,node_showfoto toneRose
class node_user toneIndigo
```

## Components

### Application

- [Application entry](https://github.com/kde/digikam/blob/master/core/app/main/main.cpp): `core/app/main/main.cpp`
- [Main window](https://github.com/kde/digikam/blob/master/core/app/main/digikamapp.cpp): `core/app/main/digikamapp.cpp`

### Library management

- [Camera import](https://github.com/kde/digikam/blob/master/core/utilities/import/backend/cameracontroller.cpp): `core/utilities/import/backend/cameracontroller.cpp`
- [Item drag data](https://github.com/kde/digikam/blob/master/core/app/dragdrop/ddragobjects.h): `core/app/dragdrop/ddragobjects.h`
- [Photo browsing](https://github.com/kde/digikam/blob/master/core/app/items/views/digikamitemview.cpp): `core/app/items/views/digikamitemview.cpp`
- [Photo filtering](https://github.com/kde/digikam/blob/master/core/app/filters/filtersidebarwidget.cpp): `core/app/filters/filtersidebarwidget.cpp`
- [Metadata engine](https://github.com/kde/digikam/blob/master/core/libs/metadataengine/engine/metaengine.h): `core/libs/metadataengine/engine/metaengine.h`
- [Photo database](https://github.com/kde/digikam/blob/master/core/libs/database/engine/dbenginesqlquery.cpp): `core/libs/database/engine/dbenginesqlquery.cpp`

### Image workflows

- [Image preview](https://github.com/kde/digikam/blob/master/core/libs/dplugins/widgets/dpreviewmanager.cpp): `core/libs/dplugins/widgets/dpreviewmanager.cpp`
- [Image editor tools](https://github.com/kde/digikam/blob/master/core/dplugins/editor/colors/adjustcurves/adjustcurvestool.cpp): `core/dplugins/editor/colors/adjustcurves/adjustcurvestool.cpp`
- [Batch processing](https://github.com/kde/digikam/tree/master/core/dplugins/bqm): `core/dplugins/bqm`
- [Face pipeline](https://github.com/kde/digikam/blob/master/core/utilities/facemanagement/facepipeline.cpp): `core/utilities/facemanagement/facepipeline.cpp`
- [Geolocation tools](https://github.com/kde/digikam/tree/master/core/utilities/geolocation/geoiface): `core/utilities/geolocation/geoiface`

### Extended tools

- [Panorama tool](https://github.com/kde/digikam/blob/master/core/dplugins/generic/tools/panorama/manager/panomanager.cpp): `core/dplugins/generic/tools/panorama/manager/panomanager.cpp`
- [Exposure blending](https://github.com/kde/digikam/blob/master/core/dplugins/generic/tools/expoblending/manager/expoblendingmanager.cpp): `core/dplugins/generic/tools/expoblending/manager/expoblendingmanager.cpp`
- **Web services**
- [Standalone viewer](https://github.com/kde/digikam/blob/master/core/showfoto/main/main.cpp): `core/showfoto/main/main.cpp`

### Other components

- **Photographer**

## Connections

- Photographer → Application entry: launches (evidence: `core/app/main/main.cpp`)
- Application entry → Main window: creates (evidence: `core/app/main/main.cpp`)
- Photographer → Camera import: imports media
- Photographer → Photo browsing: manages photos
- Photo browsing → Photo filtering: filters results
- Photo browsing → Image preview: views items
- Photographer → Image editor tools: edits images
- Photographer → Batch processing: processes batches
- Photographer → Face pipeline: recognizes faces
- Photographer → Geolocation tools: maps photos
- Photographer → Panorama tool: stitches panoramas
- Photographer → Exposure blending: blends exposures (evidence: `core/dplugins/generic/tools/expoblending/manager/expoblendingmanager.cpp`)
- Photographer → Web services: shares content
- Photographer → Standalone viewer: opens images (evidence: `core/showfoto/main/main.cpp`)
