# avazbek22/devprojex architecture

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

- Interactive diagram: https://gitdiagram.com/avazbek22/devprojex
- Repository: https://github.com/avazbek22/devprojex

## Overview

DevProjex is a local-first codebase context and project-copy tool offered through a desktop GUI, terminal CLI/TUI, and MCP server. The primary workflow is to inspect a project, choose files and filters, preview the transformed content, then copy or export it. The graph preserves documented Git, redaction, compression, ranking, and export capabilities. Most internal links are documented at product-workflow level; unsampled implementation details are not asserted.

Main entry points: [`Apps/Avalonia/MainWindow.axaml.cs`](https://github.com/avazbek22/devprojex/blob/master/Apps/Avalonia/MainWindow.axaml.cs) (Desktop app), [`Apps/Terminal/CommandLine/TerminalApplication.cs`](https://github.com/avazbek22/devprojex/blob/master/Apps/Terminal/CommandLine/TerminalApplication.cs) (CLI and TUI), [`Application/Selection/SelectionRefreshEngine.cs`](https://github.com/avazbek22/devprojex/blob/master/Application/Selection/SelectionRefreshEngine.cs) (Selection refresh), [`Application/UseCases/BuildTreeUseCase.cs`](https://github.com/avazbek22/devprojex/blob/master/Application/UseCases/BuildTreeUseCase.cs) (Tree inventory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_desktop["Desktop app"]
  node_terminal["CLI and TUI"]
  node_mcp["MCP server<br/>[McpServerHost.cs]"]
end

subgraph group_selection["Project Selection"]
  node_tree["Tree inventory"]
  node_selection["Selection refresh"]
  node_git["Git scopes"]
  node_ignore["Ignore rules"]
end

subgraph group_processing["Content Processing"]
  node_context["Context generation"]
  node_transform["Content transforms"]
  node_compression["Code compression"]
end

subgraph group_preview["Preview and Export"]
  node_previewdoc["Preview document"]
  node_previewbuild["Preview builder"]
  node_previewui["Virtualized preview"]
  node_export["Tree export"]
  node_metrics["Output metrics"]
  node_copy["Project copy export"]
end

subgraph group_extensions["Analysis and Integrations"]
  node_dependency["Dependency facts"]
  node_ranking["Focus ranking"]
  node_presentation["Project presentation"]
  node_gitops["Git operations"]
end

node_user(("Project user"))

node_user -->|"opens project"| node_desktop
node_user -->|"runs workflow"| node_terminal
node_user -->|"requests inspection"| node_mcp
node_desktop -.->|"loads project"| node_tree
node_terminal -.->|"builds tree"| node_tree
node_tree -.->|"offers choices"| node_selection
node_selection -->|"applies Git scope"| node_git
node_selection -->|"applies ignore rules"| node_ignore
node_selection -->|"selects content"| node_context
node_context -.->|"transforms content"| node_transform
node_transform -->|"compresses code"| node_compression
node_desktop -.->|"builds preview"| node_previewbuild
node_terminal -.->|"builds preview"| node_previewbuild
node_previewbuild -.->|"creates document"| node_previewdoc
node_previewdoc -.->|"renders preview"| node_previewui
node_desktop -->|"exports formats"| node_export
node_terminal -.->|"exports formats"| node_export
node_desktop -->|"exports project copy"| node_copy
node_terminal -->|"exports project copy"| node_copy
node_export -.->|"measures output"| node_metrics
node_mcp -->|"serves project context"| node_context
node_gitops -->|"supports Git workflow"| node_desktop
node_dependency -.->|"informs focus"| node_ranking

click node_desktop "https://github.com/avazbek22/devprojex/blob/master/Apps/Avalonia/MainWindow.axaml.cs"
click node_terminal "https://github.com/avazbek22/devprojex/blob/master/Apps/Terminal/CommandLine/TerminalApplication.cs"
click node_mcp "https://github.com/avazbek22/devprojex/blob/master/Apps/Mcp/McpServerHost.cs"
click node_tree "https://github.com/avazbek22/devprojex/blob/master/Application/UseCases/BuildTreeUseCase.cs"
click node_selection "https://github.com/avazbek22/devprojex/blob/master/Application/Selection/SelectionRefreshEngine.cs"
click node_git "https://github.com/avazbek22/devprojex/blob/master/Application/Context/GitScopeSelection.cs"
click node_ignore "https://github.com/avazbek22/devprojex/blob/master/Application/Services/IgnoreRulesService.cs"
click node_context "https://github.com/avazbek22/devprojex/blob/master/Application/Context/ProjectContextDocumentService.cs"
click node_transform "https://github.com/avazbek22/devprojex/blob/master/Application/Compression/ContentTransformationContext.cs"
click node_compression "https://github.com/avazbek22/devprojex/blob/master/Application/Compression/CodeCompressionSession.cs"
click node_previewdoc "https://github.com/avazbek22/devprojex/blob/master/Application/Preview/IPreviewTextDocument.cs"
click node_previewbuild "https://github.com/avazbek22/devprojex/blob/master/Application/Services/PreviewDocumentBuilder.cs"
click node_previewui "https://github.com/avazbek22/devprojex/blob/master/Apps/Avalonia/Controls/VirtualizedPreviewTextControl.cs"
click node_export "https://github.com/avazbek22/devprojex/blob/master/Application/Services/TreeExportService.cs"
click node_metrics "https://github.com/avazbek22/devprojex/blob/master/Application/Services/ExportOutputMetricsCalculator.cs"
click node_copy "https://github.com/avazbek22/devprojex/blob/master/Application/Services/ProjectCopyExportService.cs"
click node_dependency "https://github.com/avazbek22/devprojex/blob/master/Application/Dependencies/DependencyFactsEngine.cs"
click node_ranking "https://github.com/avazbek22/devprojex/blob/master/Application/Ranking/FocusRankingEngine.cs"
click node_presentation "https://github.com/avazbek22/devprojex/blob/master/Application/Presentation/ProjectPresentationCatalog.cs"
click node_gitops "https://github.com/avazbek22/devprojex/blob/master/Infrastructure/Git/GitWorktreeManager.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_desktop,node_terminal,node_mcp,node_user toneBlue
class node_tree,node_selection,node_git,node_ignore toneAmber
class node_context,node_transform,node_compression toneMint
class node_previewdoc,node_previewbuild,node_previewui,node_export,node_metrics,node_copy toneRose
class node_dependency,node_ranking,node_presentation,node_gitops toneIndigo
```

## Components

### User Interfaces

- [Desktop app](https://github.com/avazbek22/devprojex/blob/master/Apps/Avalonia/MainWindow.axaml.cs): `Apps/Avalonia/MainWindow.axaml.cs`
- [CLI and TUI](https://github.com/avazbek22/devprojex/blob/master/Apps/Terminal/CommandLine/TerminalApplication.cs): `Apps/Terminal/CommandLine/TerminalApplication.cs`
- [MCP server](https://github.com/avazbek22/devprojex/blob/master/Apps/Mcp/McpServerHost.cs): `Apps/Mcp/McpServerHost.cs`

### Project Selection

- [Tree inventory](https://github.com/avazbek22/devprojex/blob/master/Application/UseCases/BuildTreeUseCase.cs): `Application/UseCases/BuildTreeUseCase.cs`
- [Selection refresh](https://github.com/avazbek22/devprojex/blob/master/Application/Selection/SelectionRefreshEngine.cs): `Application/Selection/SelectionRefreshEngine.cs`
- [Git scopes](https://github.com/avazbek22/devprojex/blob/master/Application/Context/GitScopeSelection.cs): `Application/Context/GitScopeSelection.cs`
- [Ignore rules](https://github.com/avazbek22/devprojex/blob/master/Application/Services/IgnoreRulesService.cs): `Application/Services/IgnoreRulesService.cs`

### Content Processing

- [Context generation](https://github.com/avazbek22/devprojex/blob/master/Application/Context/ProjectContextDocumentService.cs): `Application/Context/ProjectContextDocumentService.cs`
- [Content transforms](https://github.com/avazbek22/devprojex/blob/master/Application/Compression/ContentTransformationContext.cs): `Application/Compression/ContentTransformationContext.cs`
- [Code compression](https://github.com/avazbek22/devprojex/blob/master/Application/Compression/CodeCompressionSession.cs): `Application/Compression/CodeCompressionSession.cs`

### Preview and Export

- [Preview document](https://github.com/avazbek22/devprojex/blob/master/Application/Preview/IPreviewTextDocument.cs): `Application/Preview/IPreviewTextDocument.cs`
- [Preview builder](https://github.com/avazbek22/devprojex/blob/master/Application/Services/PreviewDocumentBuilder.cs): `Application/Services/PreviewDocumentBuilder.cs`
- [Virtualized preview](https://github.com/avazbek22/devprojex/blob/master/Apps/Avalonia/Controls/VirtualizedPreviewTextControl.cs): `Apps/Avalonia/Controls/VirtualizedPreviewTextControl.cs`
- [Tree export](https://github.com/avazbek22/devprojex/blob/master/Application/Services/TreeExportService.cs): `Application/Services/TreeExportService.cs`
- [Output metrics](https://github.com/avazbek22/devprojex/blob/master/Application/Services/ExportOutputMetricsCalculator.cs): `Application/Services/ExportOutputMetricsCalculator.cs`
- [Project copy export](https://github.com/avazbek22/devprojex/blob/master/Application/Services/ProjectCopyExportService.cs): `Application/Services/ProjectCopyExportService.cs`

### Analysis and Integrations

- [Dependency facts](https://github.com/avazbek22/devprojex/blob/master/Application/Dependencies/DependencyFactsEngine.cs): `Application/Dependencies/DependencyFactsEngine.cs`
- [Focus ranking](https://github.com/avazbek22/devprojex/blob/master/Application/Ranking/FocusRankingEngine.cs): `Application/Ranking/FocusRankingEngine.cs`
- [Project presentation](https://github.com/avazbek22/devprojex/blob/master/Application/Presentation/ProjectPresentationCatalog.cs): `Application/Presentation/ProjectPresentationCatalog.cs`
- [Git operations](https://github.com/avazbek22/devprojex/blob/master/Infrastructure/Git/GitWorktreeManager.cs): `Infrastructure/Git/GitWorktreeManager.cs`

### Other components

- **Project user**

## Connections

- Project user → Desktop app: opens project (evidence: `README.md`)
- Project user → CLI and TUI: runs workflow (evidence: `README.md`)
- Project user → MCP server: requests inspection (evidence: `README.md`)
- Desktop app → Tree inventory: loads project
- CLI and TUI → Tree inventory: builds tree
- Tree inventory → Selection refresh: offers choices
- Selection refresh → Git scopes: applies Git scope (evidence: `README.md`)
- Selection refresh → Ignore rules: applies ignore rules (evidence: `README.md`)
- Selection refresh → Context generation: selects content (evidence: `README.md`)
- Context generation → Content transforms: transforms content (evidence: `Application/Context/ProjectContextDocumentService.cs`)
- Content transforms → Code compression: compresses code (evidence: `README.md`)
- Desktop app → Preview builder: builds preview
- CLI and TUI → Preview builder: builds preview
- Preview builder → Preview document: creates document
- Preview document → Virtualized preview: renders preview (evidence: `Apps/Avalonia/Controls/VirtualizedPreviewTextControl.cs`)
- Desktop app → Tree export: exports formats (evidence: `README.md`)
- CLI and TUI → Tree export: exports formats
- Desktop app → Project copy export: exports project copy (evidence: `README.md`)
- CLI and TUI → Project copy export: exports project copy (evidence: `README.md`)
- Tree export → Output metrics: measures output (evidence: `Application/Services/TreeExportService.cs`)
- MCP server → Context generation: serves project context (evidence: `README.md`)
- Git operations → Desktop app: supports Git workflow (evidence: `README.md`)
- Dependency facts → Focus ranking: informs focus
