# ishakhamzaoui/steeltube architecture

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

- Interactive diagram: https://gitdiagram.com/ishakhamzaoui/steeltube
- Repository: https://github.com/ishakhamzaoui/steeltube
- Video tour (about a minute): https://gitdiagram.com/ishakhamzaoui/steeltube/video

## Overview

SteelTube is a desktop steel-tube inventory application. The principal workflow records stock movements in an append-only operation ledger and exposes current stock as a rebuildable projection; related capabilities cover catalogue management, weight/length conversion, partners, synchronization, integrity checks, and backup. The graph reflects documented domain behavior and relationships visible in the supplied source index. The README is empty, and most UI and application handlers were not excerpted, so their internal call paths are omitted or marked unverified.

Main entry points: [`src/SteelTube.Application/Abstractions`](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Abstractions) (Repository contracts), [`src/SteelTube.Infrastructure/Repositories`](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Infrastructure/Repositories) (SQLite repositories), [`src/SteelTube.Desktop/App.xaml.cs`](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Desktop/App.xaml.cs) (Desktop startup), [`src/SteelTube.Application/Inventory`](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Inventory) (Inventory workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_desktop_app["Desktop startup<br/>[App.xaml.cs]"]
  node_main_vm["Main navigation<br/>[MainViewModel.cs]"]
  node_inventory_ui["Stock screens"]
end

subgraph group_application["Application workflows"]
  node_application_flows["Inventory workflows<br/>[Inventory]"]
  node_stock_queries["Stock and history"]
  node_catalogue_flows["Weight catalogue<br/>[Catalogue]"]
  node_conversion_flows["Length-weight conversion<br/>[Conversion]"]
  node_partner_flows["Business partners<br/>[Partners]"]
  node_sync_flows["Data synchronization<br/>[Synchronization]"]
  node_integrity_flows["Integrity diagnostics<br/>[Diagnostics]"]
  node_backup_flows["Backup and restore<br/>[Backup]"]
  node_repository_contracts["Repository contracts<br/>[Abstractions]"]
end

subgraph group_domain["Inventory domain"]
  node_operation_ledger["Operation ledger"]
  node_balance_projection["Stock projection"]
  node_material_values["Material measures<br/>[Diameter.cs]"]
  node_conversion_service["Conversion arithmetic"]
end

subgraph group_infrastructure["SQLite infrastructure"]
  node_sqlite_repositories["SQLite repositories<br/>[Repositories]"]
  node_sqlite_provider["SQLite connections"]
  node_sqlite_store[("SQLite database")]
  node_backup_service["SQLite backup service"]
  node_composition["Composition root<br/>[CompositionRoot.cs]"]
end

node_user(("User"))

node_user -.->|"opens"| node_desktop_app
node_desktop_app -->|"configures"| node_composition
node_desktop_app -->|"creates"| node_main_vm
node_user -.->|"uses"| node_inventory_ui
node_inventory_ui -.->|"invokes"| node_application_flows
node_main_vm -.->|"navigates"| node_inventory_ui
node_application_flows -.->|"uses"| node_repository_contracts
node_stock_queries -->|"reads"| node_repository_contracts
node_stock_queries -->|"converts"| node_conversion_service
node_catalogue_flows -.->|"uses"| node_repository_contracts
node_conversion_flows -->|"looks up"| node_repository_contracts
node_conversion_flows -->|"calculates"| node_conversion_service
node_partner_flows -->|"reads"| node_repository_contracts
node_sync_flows -->|"uses"| node_repository_contracts
node_integrity_flows -->|"checks"| node_repository_contracts
node_backup_flows -.->|"uses"| node_repository_contracts
node_application_flows -.->|"records"| node_operation_ledger
node_operation_ledger -->|"derives"| node_balance_projection
node_sqlite_repositories -->|"implements"| node_repository_contracts
node_sqlite_repositories -->|"requests connections"| node_sqlite_provider
node_sqlite_repositories -.->|"reads and writes"| node_sqlite_store
node_backup_service -.->|"backs up"| node_sqlite_store
node_composition -.->|"wires"| node_sqlite_repositories
node_material_values -->|"supports"| node_conversion_service

click node_desktop_app "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Desktop/App.xaml.cs"
click node_main_vm "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Desktop/ViewModels/MainViewModel.cs"
click node_inventory_ui "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Desktop/ViewModels/StockMovementViewModel.cs"
click node_application_flows "https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Inventory"
click node_stock_queries "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Application/Inventory/GetCurrentStock/GetCurrentStockQueryHandler.cs"
click node_catalogue_flows "https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Catalogue"
click node_conversion_flows "https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Conversion"
click node_partner_flows "https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Partners"
click node_sync_flows "https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Synchronization"
click node_integrity_flows "https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Diagnostics"
click node_backup_flows "https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Backup"
click node_repository_contracts "https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Abstractions"
click node_operation_ledger "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Domain/Entities/InventoryOperation.cs"
click node_balance_projection "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Domain/Entities/InventoryBalance.cs"
click node_material_values "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Domain/ValueObjects/Diameter.cs"
click node_conversion_service "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Domain/Services/WeightConversionService.cs"
click node_sqlite_repositories "https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Infrastructure/Repositories"
click node_sqlite_provider "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Infrastructure/Persistence/ISqliteConnectionProvider.cs"
click node_backup_service "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Infrastructure/Backup/SqliteBackupService.cs"
click node_composition "https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Infrastructure/CompositionRoot.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_app,node_main_vm,node_inventory_ui,node_user toneBlue
class node_application_flows,node_stock_queries,node_catalogue_flows,node_conversion_flows,node_partner_flows,node_sync_flows,node_integrity_flows,node_backup_flows,node_repository_contracts toneAmber
class node_operation_ledger,node_balance_projection,node_material_values,node_conversion_service toneMint
class node_sqlite_repositories,node_sqlite_provider,node_sqlite_store,node_backup_service,node_composition toneRose
```

## Components

### Desktop interface

- [Desktop startup](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Desktop/App.xaml.cs): `src/SteelTube.Desktop/App.xaml.cs`
- [Main navigation](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Desktop/ViewModels/MainViewModel.cs): `src/SteelTube.Desktop/ViewModels/MainViewModel.cs`
- [Stock screens](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Desktop/ViewModels/StockMovementViewModel.cs): `src/SteelTube.Desktop/ViewModels/StockMovementViewModel.cs`

### Application workflows

- [Inventory workflows](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Inventory): `src/SteelTube.Application/Inventory`
- [Stock and history](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Application/Inventory/GetCurrentStock/GetCurrentStockQueryHandler.cs): `src/SteelTube.Application/Inventory/GetCurrentStock/GetCurrentStockQueryHandler.cs`
- [Weight catalogue](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Catalogue): `src/SteelTube.Application/Catalogue`
- [Length-weight conversion](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Conversion): `src/SteelTube.Application/Conversion`
- [Business partners](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Partners): `src/SteelTube.Application/Partners`
- [Data synchronization](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Synchronization): `src/SteelTube.Application/Synchronization`
- [Integrity diagnostics](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Diagnostics): `src/SteelTube.Application/Diagnostics`
- [Backup and restore](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Backup): `src/SteelTube.Application/Backup`
- [Repository contracts](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Application/Abstractions): `src/SteelTube.Application/Abstractions`

### Inventory domain

- [Operation ledger](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Domain/Entities/InventoryOperation.cs): `src/SteelTube.Domain/Entities/InventoryOperation.cs`
- [Stock projection](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Domain/Entities/InventoryBalance.cs): `src/SteelTube.Domain/Entities/InventoryBalance.cs`
- [Material measures](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Domain/ValueObjects/Diameter.cs): `src/SteelTube.Domain/ValueObjects/Diameter.cs`
- [Conversion arithmetic](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Domain/Services/WeightConversionService.cs): `src/SteelTube.Domain/Services/WeightConversionService.cs`

### SQLite infrastructure

- [SQLite repositories](https://github.com/ishakhamzaoui/steeltube/tree/main/src/SteelTube.Infrastructure/Repositories): `src/SteelTube.Infrastructure/Repositories`
- [SQLite connections](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Infrastructure/Persistence/ISqliteConnectionProvider.cs): `src/SteelTube.Infrastructure/Persistence/ISqliteConnectionProvider.cs`
- **SQLite database**
- [SQLite backup service](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Infrastructure/Backup/SqliteBackupService.cs): `src/SteelTube.Infrastructure/Backup/SqliteBackupService.cs`
- [Composition root](https://github.com/ishakhamzaoui/steeltube/blob/main/src/SteelTube.Infrastructure/CompositionRoot.cs): `src/SteelTube.Infrastructure/CompositionRoot.cs`

### Other components

- **User**

## Connections

- User → Desktop startup: opens
- Desktop startup → Composition root: configures (evidence: `src/SteelTube.Desktop/App.xaml.cs`)
- Desktop startup → Main navigation: creates (evidence: `src/SteelTube.Desktop/App.xaml.cs`)
- User → Stock screens: uses
- Stock screens → Inventory workflows: invokes (evidence: `src/SteelTube.Desktop/ViewModels/StockMovementViewModel.cs`)
- Main navigation → Stock screens: navigates
- Inventory workflows → Repository contracts: uses (evidence: `src/SteelTube.Application/Inventory/GetStockHistory/GetStockHistoryQueryHandler.cs`)
- Stock and history → Repository contracts: reads (evidence: `src/SteelTube.Application/Inventory/GetCurrentStock/GetCurrentStockQueryHandler.cs`)
- Stock and history → Conversion arithmetic: converts (evidence: `src/SteelTube.Application/Inventory/GetCurrentStock/GetCurrentStockQueryHandler.cs`)
- Weight catalogue → Repository contracts: uses (evidence: `src/SteelTube.Application/Catalogue/GetCatalogue/GetCatalogueQueryHandler.cs`)
- Length-weight conversion → Repository contracts: looks up (evidence: `src/SteelTube.Application/Conversion/CalculateLength/CalculateLengthQueryHandler.cs`)
- Length-weight conversion → Conversion arithmetic: calculates (evidence: `src/SteelTube.Application/Conversion/CalculateLength/CalculateLengthQueryHandler.cs`)
- Business partners → Repository contracts: reads (evidence: `src/SteelTube.Application/Partners/GetPartners/GetPartnersQueryHandler.cs`)
- Data synchronization → Repository contracts: uses (evidence: `src/SteelTube.Application/Synchronization/PreviewImport/PreviewImportQueryHandler.cs`)
- Integrity diagnostics → Repository contracts: checks (evidence: `src/SteelTube.Application/Diagnostics/CheckIntegrity/CheckIntegrityQueryHandler.cs`)
- Backup and restore → Repository contracts: uses
- Inventory workflows → Operation ledger: records (evidence: `src/SteelTube.Application/Inventory/RemoveStock/RemoveStockCommandHandler.cs`)
- Operation ledger → Stock projection: derives
- SQLite repositories → Repository contracts: implements (evidence: `src/SteelTube.Infrastructure/Repositories/SqliteInventoryOperationRepository.cs`)
- SQLite repositories → SQLite connections: requests connections (evidence: `src/SteelTube.Infrastructure/Repositories/SqliteInventoryOperationRepository.cs`)
- SQLite repositories → SQLite database: reads and writes
- SQLite backup service → SQLite database: backs up
- Composition root → SQLite repositories: wires
- Material measures → Conversion arithmetic: supports (evidence: `src/SteelTube.Domain/Services/WeightConversionService.cs`)
