# drake53/nugetpush architecture

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

- Interactive diagram: https://gitdiagram.com/drake53/nugetpush
- Repository: https://github.com/drake53/nugetpush

## Overview

##### Project type and purpose
- This is a .NET desktop application (WinForms) with a companion Console tool and a shared core library.
- Purpose: scan a .sln, show class-library projects and their versions, package them (.nupkg/.snupkg) to a local source, and optionally push them to a remote NuGet feed (with authentication support).

##### File structure
- Top-level solution (`NuGetPush.sln`, `NuGetPush.WinForms.slnf`) and common props/rulesets.
- src/NuGetPush: the core library (Models, Enums, Helpers, Extensions, Processes) exposing domain logic and MSBuild/Process wrappers.
- src/NuGetPush.Console: a console-based entry point that reuses the core library.
- src/NuGetPush.WinForms: the WinForms UI (Forms, Controls, Helpers, Models, Extensions) that depends on the core library.
- Configuration files (nuget.config expectations, packagesources.json), build scripts, stylecop.json.

##### README for additional insights
- Workflow: open solution → choose local/remote source → read projects via MSBuild API → display versions → pack and/or push.
- Uses MSBuild APIs, `dotnet pack`, external executables (dotnet, git), and optional credential plugins for Azure Artifacts.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Presentation Layer"
        WinForms["WinForms UI"]:::ui
        Console["Console UI"]:::ui
    end

    subgraph "Core Library" 
        CoreDomain["Domain Models & Parsing"]:::core
        CoreExt["Extensions"]:::core
        CoreHelpers["Helpers"]:::core
        CoreProcesses["Process Managers"]:::infra
    end

    subgraph "Infrastructure" 
        DotNetWrapper["DotNet Process Wrapper"]:::infra
        GitWrapper["Git Process Wrapper"]:::infra
        FileSystem["Local Package Source"]:::infra
        HTTPClient["HTTP Client"]:::infra
    end

    subgraph "External Services"
        DotNetExe["dotnet CLI"]:::external
        GitExe["git CLI"]:::external
        LocalFolder["Local Package Folder"]:::external
        RemoteFeed["Remote NuGet Feed"]:::external
    end

    WinForms -->|"calls APIs"| CoreDomain
    WinForms -->|"calls APIs"| CoreExt
    WinForms -->|"calls APIs"| CoreHelpers
    WinForms -->|"calls APIs"| CoreProcesses

    Console -->|"calls APIs"| CoreDomain
    Console -->|"calls APIs"| CoreExt
    Console -->|"calls APIs"| CoreHelpers
    Console -->|"calls APIs"| CoreProcesses

    CoreDomain --> CoreExt
    CoreDomain --> CoreHelpers
    CoreDomain --> CoreProcesses

    CoreExt --> CoreHelpers
    CoreHelpers --> FileSystem
    CoreHelpers --> HTTPClient

    CoreProcesses --> DotNetWrapper
    CoreProcesses --> GitWrapper

    DotNetWrapper -->|"runs"| DotNetExe
    GitWrapper -->|"runs"| GitExe

    FileSystem -->|"stores packages"| LocalFolder
    HTTPClient -->|"pushes packages"| RemoteFeed

    classDef ui fill:#9f6,stroke:#333,stroke-width:1px
    classDef core fill:#6cf,stroke:#333,stroke-width:1px
    classDef infra fill:#f96,stroke:#333,stroke-width:1px
    classDef external fill:#ccc,stroke:#333,stroke-width:1px

    click WinForms "https://github.com/drake53/nugetpush/blob/master/src/NuGetPush.WinForms"
    click Console "https://github.com/drake53/nugetpush/blob/master/src/NuGetPush.Console"
    click CoreDomain "https://github.com/drake53/nugetpush/tree/master/src/NuGetPush"
    click DotNetWrapper "https://github.com/drake53/nugetpush/blob/master/src/NuGetPush/Processes/DotNet.cs"
    click GitWrapper "https://github.com/drake53/nugetpush/blob/master/src/NuGetPush/Processes/Git.cs"
    click FileSystem "https://github.com/drake53/nugetpush/blob/master/src/NuGetPush/Helpers/PackageSourceFactory.cs"
    click HTTPClient "https://github.com/drake53/nugetpush/blob/master/src/NuGetPush/Helpers/IRemoteConnectionManager.cs"
    click CoreHelpers "https://github.com/drake53/nugetpush/blob/master/src/NuGetPush/Helpers/PackageVersionHelper.cs"
    click DotNetExe "https://github.com/drake53/nugetpush/blob/master/src/NuGetPush/Processes/DotNet.cs"
    click GitExe "https://github.com/drake53/nugetpush/blob/master/src/NuGetPush/Processes/Git.cs"
```
