# flukefan/zipdeploy architecture

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

- Interactive diagram: https://gitdiagram.com/flukefan/zipdeploy
- Repository: https://github.com/flukefan/zipdeploy

## Overview

##### Main Components Identification

a) Core ZipDeploy Library
- Located in the /ZipDeploy directory
- Contains the main functionality for deployment

b) Test Applications
- Multiple test applications (.NET 2.1 and 3.1)
- Used for verification and testing

c) Build System
- Located in the /Build directory
- Handles build automation and deployment

**┌─────────────────────────────────────────────┐**
- ZipDeploy Core                 │
- ┬──────────────┬───────────────┤
- Application │   Unzipper   │ DetectPackage │
- Flow     │   Process    │    System     │
- ┴──────────────┴───────────────┘

**┌─────────────────────────────────────────────┐**
- IIS Integration                │
- ┬──────────────────────────────┤
- ProcessConfig│         TriggerRestart       │
- ┴──────────────────────────────┘

##### Integration Points

Following integration points:
**┌─────────────────────┐**
- ASP.NET Core     │
- Integration      │
- ┘
- ↕
**┌─────────────────────┐**
- ZipDeploy       │
- Middleware      │
- ┘
- ↕
**┌─────────────────────┐**
- IIS Integration   │
- ┘

##### Testing Infrastructure

A separate section showing:
- Test Applications (2.1 and 3.1)
- Test Execution Flow
- Coverage Verification

**→ Data Flow**
**⇢ Control Flow**
**⇨ Configuration Flow**
**□ Core Component**
**○ Integration Point**
**◇ Security Check**

##### The IIS integration points

Remember to include version compatibility indicators for different .NET Core versions (2.1 and 3.1) as shown in the test applications.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core["Core ZipDeploy Library"]
        AppFlow["Application Flow"]:::core
        Unzip["Unzipper Process"]:::core
        Detect["Detect Package System"]:::core
        Lock["Lock Management"]:::security
        FsOps["File System Operations"]:::fileops
    end

    subgraph Integration["IIS Integration Layer"]
        ProcConfig["Process Config"]:::integration
        TriggerRest["Trigger Restart"]:::integration
        IISInt["IIS Integration"]:::integration
    end

    subgraph Testing["Testing Infrastructure"]
        TestApp21["Test App 2.1"]:::testing
        TestApp31["Test App 3.1"]:::testing
        TestApp21Exe["Test App 2.1 Exe"]:::testing
        IISTests["IIS Tests"]:::testing
    end

    subgraph Build["Build System"]
        BuildProc["Build Process"]:::build
    end

    %% Relationships
    AppFlow --> Lock
    AppFlow --> Detect
    Detect --> Unzip
    Unzip --> FsOps
    FsOps --> ProcConfig
    ProcConfig --> TriggerRest
    Lock --> IISInt
    IISInt --> TriggerRest

    %% Testing Relationships
    IISTests --> TestApp21
    IISTests --> TestApp31
    IISTests --> TestApp21Exe
    IISTests --> IISInt

    %% Click Events
    click AppFlow "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy/Application.cs"
    click Unzip "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy/Unzipper.cs"
    click Detect "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy/DetectPackage.cs"
    click Lock "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy/LockProcess.cs"
    click FsOps "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy/FsUtil.cs"
    click ProcConfig "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy/ProcessWebConfig.cs"
    click TriggerRest "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy/TriggerRestart.cs"
    click IISInt "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy.Tests/TestApp/IisTests.cs"
    click TestApp21 "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy.TestApp2_1"
    click TestApp31 "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy.TestApp3_1"
    click TestApp21Exe "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy.TestApp2_1Exe"
    click Build "https://github.com/FlukeFan/ZipDeploy/tree/master/Build"
    click Testing "https://github.com/FlukeFan/ZipDeploy/blob/master/ZipDeploy.Tests"

    %% Styles
    classDef core fill:#2374ab,stroke:#2374ab,color:#fff
    classDef integration fill:#47a025,stroke:#47a025,color:#fff
    classDef security fill:#d64045,stroke:#d64045,color:#fff
    classDef fileops fill:#ff8c42,stroke:#ff8c42,color:#fff
    classDef testing fill:#7768ae,stroke:#7768ae,color:#fff
    classDef build fill:#4a4e4d,stroke:#4a4e4d,color:#fff

    %% Legend
    subgraph Legend
        L1["Core Component"]:::core
        L2["Integration Component"]:::integration
        L3["Security Component"]:::security
        L4["File Operations"]:::fileops
        L5["Testing Component"]:::testing
        L6["Build Component"]:::build
    end
```
