# keepassxreboot/keepassxc architecture

> Architecture diagram of the GitHub repository keepassxreboot/keepassxc, 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/keepassxreboot/keepassxc
- Repository: https://github.com/keepassxreboot/keepassxc

## Overview

KeePassXC is a cross-platform password manager centered on opening and managing encrypted KDBX databases. In the desktop workflow, the user launches the application, opens a database, works with its entries and groups, and saves changes; the database implementation coordinates KDBX reading and writing. Separate user-facing branches provide CLI operations, browser credential and passkey integration, auto-type, imports/exports, and security tools. Some subsystem links are documented capabilities rather than inspected call paths; those are marked with README evidence.

Main entry points: [`src/core/Database.cpp`](https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Database.cpp) (Database), [`src/main.cpp`](https://github.com/keepassxreboot/keepassxc/blob/develop/src/main.cpp) (Application entry), [`src/browser/BrowserService.cpp`](https://github.com/keepassxreboot/keepassxc/blob/develop/src/browser/BrowserService.cpp) (Browser service), [`src/autotype/AutoType.cpp`](https://github.com/keepassxreboot/keepassxc/blob/develop/src/autotype/AutoType.cpp) (Auto-Type)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop application"]
  node_main["Application entry<br/>[main.cpp]"]
  node_application["Application runtime<br/>[Application.cpp]"]
  node_mainwindow["Main window<br/>[MainWindow.h]"]
  node_dbui["Database UI<br/>[DatabaseWidget.cpp]"]
end

subgraph group_vault["Vault and formats"]
  node_database[("Database<br/>[Database.cpp]")]
  node_entries["Entries and groups<br/>[Group.h]"]
  node_kdbx["KDBX formats<br/>[KeePass2.h]"]
end

subgraph group_integrations["Credential integrations"]
  node_browser["Browser service<br/>[BrowserService.cpp]"]
  node_passkeys["Passkey support<br/>[BrowserPasskeys.h]"]
  node_autotype["Auto-Type<br/>[AutoType.cpp]"]
  node_autotypeplatform["OS input backend<br/>[AutoTypePlatform.h]"]
  node_ssh["SSH Agent<br/>[SSHAgent.cpp]"]
  node_keeshare["KeeShare<br/>[KeeShare.cpp]"]
  node_remote["Remote storage<br/>[RemoteHandler.cpp]"]
  node_secretservice["Secret Service<br/>[KeeShare.cpp]"]
end

subgraph group_tools["Utilities and exchange"]
  node_cli["Command line<br/>[keepassxc-cli.cpp]"]
  node_reports["Database reports<br/>[ReportsDialog.cpp]"]
  node_imports["Import and export<br/>[CsvParser.cpp]"]
end

subgraph group_security["Security services"]
  node_crypto["Encryption and KDF<br/>[Crypto.cpp]"]
  node_keys["Composite keys<br/>[CompositeKey.cpp]"]
  node_generator["Password generator"]
  node_totp["TOTP<br/>[Totp.cpp]"]
  node_hibp["HIBP checks<br/>[HibpDownloader.cpp]"]
end

node_user(("User"))
node_browserclient(("Browser extension"))

node_user -->|"launches"| node_main
node_main -->|"starts"| node_application
node_main -->|"creates"| node_mainwindow
node_mainwindow -->|"uses"| node_dbui
node_dbui -.->|"manages"| node_database
node_database -->|"reads and writes"| node_kdbx
node_database -.->|"stores"| node_entries
node_database -.->|"encrypts"| node_crypto
node_database -.->|"authenticates with"| node_keys
node_user -->|"runs commands"| node_cli
node_cli -.->|"operates on"| node_database
node_browserclient -->|"requests credentials"| node_browser
node_browser -.->|"retrieves credentials"| node_database
node_browser -->|"handles passkeys"| node_passkeys
node_user -->|"starts typing"| node_autotype
node_autotype -.->|"dispatches input"| node_autotypeplatform
node_autotype -.->|"uses credentials"| node_entries
node_database -.->|"provides report data"| node_reports
node_user -->|"generates passwords"| node_generator
node_entries -.->|"stores TOTP data"| node_totp
node_user -->|"imports or exports"| node_imports
node_imports -.->|"transfers records"| node_database
node_database -.->|"offers SSH keys"| node_ssh
node_database -.->|"shares groups"| node_keeshare
node_database -.->|"uses remote locations"| node_remote
node_database -.->|"exposes credentials"| node_secretservice
node_reports -.->|"checks breaches"| node_hibp

click node_main "https://github.com/keepassxreboot/keepassxc/blob/develop/src/main.cpp"
click node_application "https://github.com/keepassxreboot/keepassxc/blob/develop/src/gui/Application.cpp"
click node_mainwindow "https://github.com/keepassxreboot/keepassxc/blob/develop/src/gui/MainWindow.h"
click node_dbui "https://github.com/keepassxreboot/keepassxc/blob/develop/src/gui/DatabaseWidget.cpp"
click node_database "https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Database.cpp"
click node_entries "https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Group.h"
click node_kdbx "https://github.com/keepassxreboot/keepassxc/blob/develop/src/format/KeePass2.h"
click node_crypto "https://github.com/keepassxreboot/keepassxc/blob/develop/src/crypto/Crypto.cpp"
click node_keys "https://github.com/keepassxreboot/keepassxc/blob/develop/src/keys/CompositeKey.cpp"
click node_cli "https://github.com/keepassxreboot/keepassxc/blob/develop/src/cli/keepassxc-cli.cpp"
click node_browser "https://github.com/keepassxreboot/keepassxc/blob/develop/src/browser/BrowserService.cpp"
click node_passkeys "https://github.com/keepassxreboot/keepassxc/blob/develop/src/browser/BrowserPasskeys.h"
click node_autotype "https://github.com/keepassxreboot/keepassxc/blob/develop/src/autotype/AutoType.cpp"
click node_autotypeplatform "https://github.com/keepassxreboot/keepassxc/blob/develop/src/autotype/AutoTypePlatform.h"
click node_reports "https://github.com/keepassxreboot/keepassxc/blob/develop/src/gui/reports/ReportsDialog.cpp"
click node_generator "https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/PassphraseGenerator.cpp"
click node_totp "https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Totp.cpp"
click node_imports "https://github.com/keepassxreboot/keepassxc/blob/develop/src/format/CsvParser.cpp"
click node_ssh "https://github.com/keepassxreboot/keepassxc/blob/develop/src/sshagent/SSHAgent.cpp"
click node_keeshare "https://github.com/keepassxreboot/keepassxc/blob/develop/src/keeshare/KeeShare.cpp"
click node_remote "https://github.com/keepassxreboot/keepassxc/blob/develop/src/gui/remote/RemoteHandler.cpp"
click node_secretservice "https://github.com/keepassxreboot/keepassxc/blob/develop/src/keeshare/KeeShare.cpp"
click node_hibp "https://github.com/keepassxreboot/keepassxc/blob/develop/src/networking/HibpDownloader.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_main,node_application,node_mainwindow,node_dbui,node_user,node_browserclient toneBlue
class node_database,node_entries,node_kdbx toneAmber
class node_browser,node_passkeys,node_autotype,node_autotypeplatform,node_ssh,node_keeshare,node_remote,node_secretservice toneMint
class node_cli,node_reports,node_imports toneRose
class node_crypto,node_keys,node_generator,node_totp,node_hibp toneIndigo
```

## Components

### Desktop application

- [Application entry](https://github.com/keepassxreboot/keepassxc/blob/develop/src/main.cpp): `src/main.cpp`
- [Application runtime](https://github.com/keepassxreboot/keepassxc/blob/develop/src/gui/Application.cpp): `src/gui/Application.cpp`
- [Main window](https://github.com/keepassxreboot/keepassxc/blob/develop/src/gui/MainWindow.h): `src/gui/MainWindow.h`
- [Database UI](https://github.com/keepassxreboot/keepassxc/blob/develop/src/gui/DatabaseWidget.cpp): `src/gui/DatabaseWidget.cpp`

### Vault and formats

- [Database](https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Database.cpp): `src/core/Database.cpp`
- [Entries and groups](https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Group.h): `src/core/Group.h`
- [KDBX formats](https://github.com/keepassxreboot/keepassxc/blob/develop/src/format/KeePass2.h): `src/format/KeePass2.h`

### Credential integrations

- [Browser service](https://github.com/keepassxreboot/keepassxc/blob/develop/src/browser/BrowserService.cpp): `src/browser/BrowserService.cpp`
- [Passkey support](https://github.com/keepassxreboot/keepassxc/blob/develop/src/browser/BrowserPasskeys.h): `src/browser/BrowserPasskeys.h`
- [Auto-Type](https://github.com/keepassxreboot/keepassxc/blob/develop/src/autotype/AutoType.cpp): `src/autotype/AutoType.cpp`
- [OS input backend](https://github.com/keepassxreboot/keepassxc/blob/develop/src/autotype/AutoTypePlatform.h): `src/autotype/AutoTypePlatform.h`
- [SSH Agent](https://github.com/keepassxreboot/keepassxc/blob/develop/src/sshagent/SSHAgent.cpp): `src/sshagent/SSHAgent.cpp`
- [KeeShare](https://github.com/keepassxreboot/keepassxc/blob/develop/src/keeshare/KeeShare.cpp): `src/keeshare/KeeShare.cpp`
- [Remote storage](https://github.com/keepassxreboot/keepassxc/blob/develop/src/gui/remote/RemoteHandler.cpp): `src/gui/remote/RemoteHandler.cpp`
- [Secret Service](https://github.com/keepassxreboot/keepassxc/blob/develop/src/keeshare/KeeShare.cpp): `src/keeshare/KeeShare.cpp`

### Utilities and exchange

- [Command line](https://github.com/keepassxreboot/keepassxc/blob/develop/src/cli/keepassxc-cli.cpp): `src/cli/keepassxc-cli.cpp`
- [Database reports](https://github.com/keepassxreboot/keepassxc/blob/develop/src/gui/reports/ReportsDialog.cpp): `src/gui/reports/ReportsDialog.cpp`
- [Import and export](https://github.com/keepassxreboot/keepassxc/blob/develop/src/format/CsvParser.cpp): `src/format/CsvParser.cpp`

### Security services

- [Encryption and KDF](https://github.com/keepassxreboot/keepassxc/blob/develop/src/crypto/Crypto.cpp): `src/crypto/Crypto.cpp`
- [Composite keys](https://github.com/keepassxreboot/keepassxc/blob/develop/src/keys/CompositeKey.cpp): `src/keys/CompositeKey.cpp`
- [Password generator](https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/PassphraseGenerator.cpp): `src/core/PassphraseGenerator.cpp`
- [TOTP](https://github.com/keepassxreboot/keepassxc/blob/develop/src/core/Totp.cpp): `src/core/Totp.cpp`
- [HIBP checks](https://github.com/keepassxreboot/keepassxc/blob/develop/src/networking/HibpDownloader.cpp): `src/networking/HibpDownloader.cpp`

### Other components

- **User**
- **Browser extension**

## Connections

- User → Application entry: launches (evidence: `README.md`)
- Application entry → Application runtime: starts (evidence: `src/main.cpp`)
- Application entry → Main window: creates (evidence: `src/main.cpp`)
- Main window → Database UI: uses (evidence: `src/gui/MainWindow.h`)
- Database UI → Database: manages
- Database → KDBX formats: reads and writes (evidence: `src/core/Database.cpp`)
- Database → Entries and groups: stores (evidence: `src/core/Database.cpp`)
- Database → Encryption and KDF: encrypts
- Database → Composite keys: authenticates with
- User → Command line: runs commands (evidence: `README.md`)
- Command line → Database: operates on
- Browser extension → Browser service: requests credentials (evidence: `README.md`)
- Browser service → Database: retrieves credentials
- Browser service → Passkey support: handles passkeys (evidence: `src/browser/BrowserService.cpp`)
- User → Auto-Type: starts typing (evidence: `README.md`)
- Auto-Type → OS input backend: dispatches input (evidence: `src/autotype/AutoType.cpp`)
- Auto-Type → Entries and groups: uses credentials
- Database → Database reports: provides report data (evidence: `README.md`)
- User → Password generator: generates passwords (evidence: `README.md`)
- Entries and groups → TOTP: stores TOTP data (evidence: `README.md`)
- User → Import and export: imports or exports (evidence: `README.md`)
- Import and export → Database: transfers records
- Database → SSH Agent: offers SSH keys (evidence: `README.md`)
- Database → KeeShare: shares groups (evidence: `README.md`)
- Database → Remote storage: uses remote locations (evidence: `README.md`)
- Database → Secret Service: exposes credentials (evidence: `README.md`)
- Database reports → HIBP checks: checks breaches (evidence: `README.md`)
