# heidumb/pacmangr architecture

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

- Interactive diagram: https://gitdiagram.com/heidumb/pacmangr
- Repository: https://github.com/heidumb/pacmangr

## Overview

Pacmangr is a multi-interface front end that discovers installed package managers, searches and presents their packages, and delegates changes to the native manager that owns each package. The README documents the shared backend, local SQLite cache, host package databases, GUI progress and polkit, and Git-source support. Source excerpts were unavailable, so paths and relationships below rely on the README and the two executable paths in the tree; internal implementation details are not inferred.

Main entry points: [`pacmangr-gui`](https://github.com/heidumb/pacmangr/blob/main/pacmangr-gui) (GTK desktop app), [`pacmangr`](https://github.com/heidumb/pacmangr/blob/main/pacmangr) (Manager discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_tui["Terminal UI"]
  node_cli["Headless CLI"]
  node_gui["GTK desktop app"]
end

subgraph group_backend["Shared package backend"]
  node_discovery["Manager discovery"]
  node_package_search["Search and inventory"]
  node_package_details["Package details"]
  node_versions["Version browsing"]
  node_operations["Package operations"]
  node_git_sources["Git sources"]
end

subgraph group_state["Local and host state"]
  node_cache[("SQLite cache")]
  node_host_db[("Host package databases")]
end

subgraph group_integrations["External integrations"]
  node_native_managers["Native package managers"]
  node_polkit["Polkit authentication"]
end

node_user(("User or script"))

node_user -->|"uses"| node_tui
node_user -->|"runs commands"| node_cli
node_user -->|"uses"| node_gui
node_tui -->|"uses shared backend"| node_discovery
node_cli -->|"uses shared backend"| node_discovery
node_gui -->|"uses shared backend"| node_discovery
node_discovery -->|"detects executables"| node_native_managers
node_package_search -->|"searches across"| node_native_managers
node_package_search -->|"reads and writes"| node_cache
node_package_search -->|"reads installed data"| node_host_db
node_package_details -->|"browses metadata"| node_native_managers
node_versions -->|"browses versions"| node_native_managers
node_operations -->|"delegates actions"| node_native_managers
node_native_managers -->|"manage packages"| node_host_db
node_git_sources -->|"manages Git sources"| node_native_managers
node_gui -.->|"requests GUI authentication"| node_polkit
node_gui -->|"shows progress"| node_operations

click node_tui "https://github.com/heidumb/pacmangr/blob/main/pacmangr"
click node_cli "https://github.com/heidumb/pacmangr/blob/main/pacmangr"
click node_gui "https://github.com/heidumb/pacmangr/blob/main/pacmangr-gui"
click node_discovery "https://github.com/heidumb/pacmangr/blob/main/pacmangr"
click node_package_search "https://github.com/heidumb/pacmangr/blob/main/pacmangr"
click node_package_details "https://github.com/heidumb/pacmangr/blob/main/pacmangr"
click node_versions "https://github.com/heidumb/pacmangr/blob/main/pacmangr"
click node_operations "https://github.com/heidumb/pacmangr/blob/main/pacmangr"
click node_git_sources "https://github.com/heidumb/pacmangr/blob/main/pacmangr"
click node_cache "https://github.com/heidumb/pacmangr/blob/main/pacmangr"

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_tui,node_cli,node_gui,node_user toneBlue
class node_discovery,node_package_search,node_package_details,node_versions,node_operations,node_git_sources toneAmber
class node_cache,node_host_db toneMint
class node_native_managers,node_polkit toneRose
```

## Components

### User interfaces

- [Terminal UI](https://github.com/heidumb/pacmangr/blob/main/pacmangr): `pacmangr`
- [Headless CLI](https://github.com/heidumb/pacmangr/blob/main/pacmangr): `pacmangr`
- [GTK desktop app](https://github.com/heidumb/pacmangr/blob/main/pacmangr-gui): `pacmangr-gui`

### Shared package backend

- [Manager discovery](https://github.com/heidumb/pacmangr/blob/main/pacmangr): `pacmangr`
- [Search and inventory](https://github.com/heidumb/pacmangr/blob/main/pacmangr): `pacmangr`
- [Package details](https://github.com/heidumb/pacmangr/blob/main/pacmangr): `pacmangr`
- [Version browsing](https://github.com/heidumb/pacmangr/blob/main/pacmangr): `pacmangr`
- [Package operations](https://github.com/heidumb/pacmangr/blob/main/pacmangr): `pacmangr`
- [Git sources](https://github.com/heidumb/pacmangr/blob/main/pacmangr): `pacmangr`

### Local and host state

- [SQLite cache](https://github.com/heidumb/pacmangr/blob/main/pacmangr): `pacmangr`
- **Host package databases**

### External integrations

- **Native package managers**
- **Polkit authentication**

### Other components

- **User or script**

## Connections

- User or script → Terminal UI: uses (evidence: `README.md`)
- User or script → Headless CLI: runs commands (evidence: `README.md`)
- User or script → GTK desktop app: uses (evidence: `README.md`)
- Terminal UI → Manager discovery: uses shared backend (evidence: `README.md`)
- Headless CLI → Manager discovery: uses shared backend (evidence: `README.md`)
- GTK desktop app → Manager discovery: uses shared backend (evidence: `README.md`)
- Manager discovery → Native package managers: detects executables (evidence: `README.md`)
- Search and inventory → Native package managers: searches across (evidence: `README.md`)
- Search and inventory → SQLite cache: reads and writes (evidence: `README.md`)
- Search and inventory → Host package databases: reads installed data (evidence: `README.md`)
- Package details → Native package managers: browses metadata (evidence: `README.md`)
- Version browsing → Native package managers: browses versions (evidence: `README.md`)
- Package operations → Native package managers: delegates actions (evidence: `README.md`)
- Native package managers → Host package databases: manage packages (evidence: `README.md`)
- Git sources → Native package managers: manages Git sources (evidence: `README.md`)
- GTK desktop app → Polkit authentication: requests GUI authentication (evidence: `README.md`)
- GTK desktop app → Package operations: shows progress (evidence: `README.md`)
