# lucasg/dependencies architecture

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

- Interactive diagram: https://gitdiagram.com/lucasg/dependencies
- Repository: https://github.com/lucasg/dependencies

## Overview

Dependencies is a Windows DLL dependency analyzer, with both a GUI and a CLI. Users open a PE file; the application inspects its imports, searches for referenced modules, and presents dependency details including imports, exports, and resolution status. The graph also preserves documented API-set, side-by-side manifest, symbol-demangling, and CLR assembly-analysis capabilities. The excerpts show several GUI, cache, and search relationships; where implementation wiring for documented features was not shown, their connections are omitted rather than inferred.

Main entry points: [`DependenciesGui/DependencyWindow.xaml.cs`](https://github.com/lucasg/dependencies/blob/master/DependenciesGui/DependencyWindow.xaml.cs) (Dependency window), [`DependenciesLib/BinaryCache.cs`](https://github.com/lucasg/dependencies/blob/master/DependenciesLib/BinaryCache.cs) (Binary cache), [`Dependencies/Program.cs`](https://github.com/lucasg/dependencies/blob/master/Dependencies/Program.cs) (CLI analyzer), [`DependenciesGui/App.xaml.cs`](https://github.com/lucasg/dependencies/blob/master/DependenciesGui/App.xaml.cs) (GUI startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_gui["GUI startup<br/>[App.xaml.cs]"]
  node_cli["CLI analyzer<br/>[Program.cs]"]
end

subgraph group_analysis["Dependency analysis"]
  node_cache["Binary cache<br/>[BinaryCache.cs]"]
  node_search["Module search<br/>[FindPeModule.cs]"]
  node_sxs["SxS manifests<br/>[SxsManifest.cs]"]
end

subgraph group_pe["PE inspection"]
  node_pebridge["Managed PE bridge<br/>[PE.cpp]"]
  node_phlib["PE analysis library<br/>[Phlib.cpp]"]
  node_api["API-set support<br/>[ApiSet.h]"]
  node_symbols["Symbol provider"]
  node_demangle["Symbol demangler<br/>[demangle.cpp]"]
  node_clrrefs["CLR references<br/>[Program.cs]"]
end

subgraph group_presentation["Results and settings"]
  node_window["Dependency window"]
  node_module["Module model<br/>[ModuleInfo.cs]"]
  node_imports["Import display<br/>[PeImport.cs]"]
  node_exports["Export display<br/>[PeExport.cs]"]
  node_settings["User settings<br/>[Settings.cs]"]
  node_binding["Setting bindings"]
end

node_user(("Developer"))

node_user -->|"opens file"| node_gui
node_gui -->|"opens window"| node_window
node_window -->|"loads manifest entries"| node_sxs
node_window -->|"loads binaries"| node_cache
node_window -->|"builds module tree"| node_module
node_module -->|"loads PE binary"| node_gui
node_gui -->|"initializes cache"| node_cache
node_cache -->|"gets SxS entries"| node_sxs
node_search -->|"checks manifest entries"| node_sxs
node_cache -->|"checks imports"| node_imports
node_cache -->|"checks exports"| node_exports
node_binding -->|"reads settings"| node_settings
node_imports -->|"inherits bindings"| node_binding
node_exports -->|"inherits bindings"| node_binding
node_module -->|"uses bindings"| node_binding
node_user -->|"runs analysis"| node_cli
node_cli -->|"parses manifests"| node_sxs
node_cli -.->|"inspects PE files"| node_pebridge
node_pebridge -.->|"uses PE processing"| node_phlib
node_window -.->|"resolves API sets"| node_api
node_imports -.->|"displays symbol names"| node_symbols
node_symbols -.->|"demangles symbols"| node_demangle
node_cli -->|"enumerates CLR references"| node_clrrefs

click node_gui "https://github.com/lucasg/dependencies/blob/master/DependenciesGui/App.xaml.cs"
click node_cli "https://github.com/lucasg/dependencies/blob/master/Dependencies/Program.cs"
click node_window "https://github.com/lucasg/dependencies/blob/master/DependenciesGui/DependencyWindow.xaml.cs"
click node_module "https://github.com/lucasg/dependencies/blob/master/DependenciesGui/Models/ModuleInfo.cs"
click node_imports "https://github.com/lucasg/dependencies/blob/master/DependenciesGui/Models/PeImport.cs"
click node_exports "https://github.com/lucasg/dependencies/blob/master/DependenciesGui/Models/PeExport.cs"
click node_settings "https://github.com/lucasg/dependencies/blob/master/DependenciesGui/Settings.cs"
click node_binding "https://github.com/lucasg/dependencies/blob/master/DependenciesGui/Helpers/SettingBindingHandler.cs"
click node_cache "https://github.com/lucasg/dependencies/blob/master/DependenciesLib/BinaryCache.cs"
click node_search "https://github.com/lucasg/dependencies/blob/master/DependenciesLib/FindPeModule.cs"
click node_sxs "https://github.com/lucasg/dependencies/blob/master/DependenciesLib/SxsManifest.cs"
click node_pebridge "https://github.com/lucasg/dependencies/blob/master/ClrPhlib/src/managed/PE.cpp"
click node_phlib "https://github.com/lucasg/dependencies/blob/master/ClrPhlib/src/managed/Phlib.cpp"
click node_api "https://github.com/lucasg/dependencies/blob/master/ClrPhlib/include/ApiSet.h"
click node_symbols "https://github.com/lucasg/dependencies/blob/master/ClrPhlib/src/managed/PhSymbolProvider.cpp"
click node_demangle "https://github.com/lucasg/dependencies/blob/master/ClrPhlib/src/unmanaged/demangle.cpp"
click node_clrrefs "https://github.com/lucasg/dependencies/blob/master/Dependencies/Program.cs"

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_gui,node_cli toneBlue
class node_cache,node_search,node_sxs toneAmber
class node_pebridge,node_phlib,node_api,node_symbols,node_demangle,node_clrrefs toneMint
class node_window,node_module,node_imports,node_exports,node_settings,node_binding toneRose
class node_user toneIndigo
```

## Components

### Entry points

- [GUI startup](https://github.com/lucasg/dependencies/blob/master/DependenciesGui/App.xaml.cs): `DependenciesGui/App.xaml.cs`
- [CLI analyzer](https://github.com/lucasg/dependencies/blob/master/Dependencies/Program.cs): `Dependencies/Program.cs`

### Dependency analysis

- [Binary cache](https://github.com/lucasg/dependencies/blob/master/DependenciesLib/BinaryCache.cs): `DependenciesLib/BinaryCache.cs`
- [Module search](https://github.com/lucasg/dependencies/blob/master/DependenciesLib/FindPeModule.cs): `DependenciesLib/FindPeModule.cs`
- [SxS manifests](https://github.com/lucasg/dependencies/blob/master/DependenciesLib/SxsManifest.cs): `DependenciesLib/SxsManifest.cs`

### PE inspection

- [Managed PE bridge](https://github.com/lucasg/dependencies/blob/master/ClrPhlib/src/managed/PE.cpp): `ClrPhlib/src/managed/PE.cpp`
- [PE analysis library](https://github.com/lucasg/dependencies/blob/master/ClrPhlib/src/managed/Phlib.cpp): `ClrPhlib/src/managed/Phlib.cpp`
- [API-set support](https://github.com/lucasg/dependencies/blob/master/ClrPhlib/include/ApiSet.h): `ClrPhlib/include/ApiSet.h`
- [Symbol provider](https://github.com/lucasg/dependencies/blob/master/ClrPhlib/src/managed/PhSymbolProvider.cpp): `ClrPhlib/src/managed/PhSymbolProvider.cpp`
- [Symbol demangler](https://github.com/lucasg/dependencies/blob/master/ClrPhlib/src/unmanaged/demangle.cpp): `ClrPhlib/src/unmanaged/demangle.cpp`
- [CLR references](https://github.com/lucasg/dependencies/blob/master/Dependencies/Program.cs): `Dependencies/Program.cs`

### Results and settings

- [Dependency window](https://github.com/lucasg/dependencies/blob/master/DependenciesGui/DependencyWindow.xaml.cs): `DependenciesGui/DependencyWindow.xaml.cs`
- [Module model](https://github.com/lucasg/dependencies/blob/master/DependenciesGui/Models/ModuleInfo.cs): `DependenciesGui/Models/ModuleInfo.cs`
- [Import display](https://github.com/lucasg/dependencies/blob/master/DependenciesGui/Models/PeImport.cs): `DependenciesGui/Models/PeImport.cs`
- [Export display](https://github.com/lucasg/dependencies/blob/master/DependenciesGui/Models/PeExport.cs): `DependenciesGui/Models/PeExport.cs`
- [User settings](https://github.com/lucasg/dependencies/blob/master/DependenciesGui/Settings.cs): `DependenciesGui/Settings.cs`
- [Setting bindings](https://github.com/lucasg/dependencies/blob/master/DependenciesGui/Helpers/SettingBindingHandler.cs): `DependenciesGui/Helpers/SettingBindingHandler.cs`

### Other components

- **Developer**

## Connections

- Developer → GUI startup: opens file (evidence: `README.md`)
- GUI startup → Dependency window: opens window (evidence: `DependenciesGui/App.xaml.cs`)
- Dependency window → SxS manifests: loads manifest entries (evidence: `DependenciesGui/DependencyWindow.xaml.cs`)
- Dependency window → Binary cache: loads binaries (evidence: `DependenciesGui/DependencyWindow.xaml.cs`)
- Dependency window → Module model: builds module tree (evidence: `DependenciesGui/DependencyWindow.xaml.cs`)
- Module model → GUI startup: loads PE binary (evidence: `DependenciesGui/Models/ModuleInfo.cs`)
- GUI startup → Binary cache: initializes cache (evidence: `DependenciesGui/App.xaml.cs`)
- Binary cache → SxS manifests: gets SxS entries (evidence: `DependenciesLib/BinaryCache.cs`)
- Module search → SxS manifests: checks manifest entries (evidence: `DependenciesLib/FindPeModule.cs`)
- Binary cache → Import display: checks imports (evidence: `DependenciesLib/BinaryCache.cs`)
- Binary cache → Export display: checks exports (evidence: `DependenciesLib/BinaryCache.cs`)
- Setting bindings → User settings: reads settings (evidence: `DependenciesGui/Helpers/SettingBindingHandler.cs`)
- Import display → Setting bindings: inherits bindings (evidence: `DependenciesGui/Models/PeImport.cs`)
- Export display → Setting bindings: inherits bindings (evidence: `DependenciesGui/Models/PeExport.cs`)
- Module model → Setting bindings: uses bindings (evidence: `DependenciesGui/Models/ModuleInfo.cs`)
- Developer → CLI analyzer: runs analysis (evidence: `README.md`)
- CLI analyzer → SxS manifests: parses manifests (evidence: `Dependencies/Program.cs`)
- CLI analyzer → Managed PE bridge: inspects PE files (evidence: `README.md`)
- Managed PE bridge → PE analysis library: uses PE processing (evidence: `README.md`)
- Dependency window → API-set support: resolves API sets
- Import display → Symbol provider: displays symbol names
- Symbol provider → Symbol demangler: demangles symbols
- CLI analyzer → CLR references: enumerates CLR references (evidence: `README.md`)
