# petrisoralexandru/lockgen-cli architecture

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

- Interactive diagram: https://gitdiagram.com/petrisoralexandru/lockgen-cli
- Repository: https://github.com/petrisoralexandru/lockgen-cli

## Overview

##### Main Components

a) User Interface Layer:
- Console-based UI component
- User input handling
- Output display
- Clipboard interaction

b) Business Logic Layer:
- Password generation engine
- Configuration management
- Validation logic

c) Models Layer:
- Password generation options
- Configuration models

##### Component Relationships

**User Input → Input Processing → Password Generation → Output Handling → Clipboard System**

##### Specific Implementation Details

a) Core Components (represent as rectangles):
- Program.cs (Entry Point)
- UserLogic.cs (User Interaction Handler)
- Generator.cs (Password Generation Engine)
- PasswordGenerationOptions.cs (Configuration Model)
- StandardMessages.cs (System Messages)

b) External Dependencies (represent as hexagons):
- TextCopy Package (Clipboard Operations)
- System.Security.Cryptography (Random Generation)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph User_Interface
        UI[Console Interface]:::ui
        Clip[Clipboard System]:::ui
    end

    subgraph Core_Logic
        PG[Program.cs]:::core
        UL[UserLogic.cs]:::core
        GE[Generator.cs]:::core
        SM[StandardMessages.cs]:::core
    end

    subgraph Models
        PGO[PasswordGenerationOptions.cs]:::model
    end

    subgraph External_Dependencies
        TC[TextCopy Package]:::external
        SC[System.Security.Cryptography]:::external
        CSPROJ[Lockgen.csproj]:::external
    end

    UI -->|User Input| PG
    PG -->|Process Input| UL
    UL -->|Configure| PGO
    PGO -->|Options| GE
    GE -->|Use| SC
    GE -->|Generated Password| UL
    UL -->|Copy to Clipboard| TC
    TC -->|Manage| Clip
    UL -->|Display Result| UI
    SM -.->|Messages| UL
    
    %% Click Events
    click PG "https://github.com/petrisoralexandru/lockgen-cli/blob/main/Lockgen/Program.cs"
    click UL "https://github.com/petrisoralexandru/lockgen-cli/blob/main/Lockgen/UserLogic.cs"
    click GE "https://github.com/petrisoralexandru/lockgen-cli/blob/main/Lockgen/Generator.cs"
    click PGO "https://github.com/petrisoralexandru/lockgen-cli/blob/main/Lockgen/Models/PasswordGenerationOptions.cs"
    click SM "https://github.com/petrisoralexandru/lockgen-cli/blob/main/Lockgen/StandardMessages.cs"
    click CSPROJ "https://github.com/petrisoralexandru/lockgen-cli/blob/main/Lockgen/Lockgen.csproj"

    %% Styles
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef model fill:#f1c40f,stroke:#f39c12,color:black
    classDef external fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Legend
    subgraph Legend
        L1[UI Components]:::ui
        L2[Core Logic]:::core
        L3[Models]:::model
        L4[External Dependencies]:::external
    end
```
