# sander110419/cloud-infra-visualization architecture

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

- Interactive diagram: https://gitdiagram.com/sander110419/cloud-infra-visualization
- Repository: https://github.com/sander110419/cloud-infra-visualization

## Overview

##### Main Components

a. Input Layer:
- GUI Interface (frontend.py)
- CLI Interface (main.py)
- Authentication Component (handling Azure credentials)

b. Core Processing Layer:
- Resource Collection Engine (functions.py)
- Azure Function Components (azure_func folder)
- Resource Functions (resource_functions.py)
- Data Transformation (json2xml.py)

c. Output Generation Layer:
- Excel Generator (output_xlsx.py)
- JSON Output
- Word Document Generator (json2docx.py)

##### Component Relationships

- User input → Authentication Component
- Authentication Component → Resource Collection Engine
- Resource Collection Engine → Azure Cloud (external)
- Resource Collection Engine → Output Generation Layer
- Output Generation Layer → File System (for saving outputs)

##### Specific Design Elements

Use the following visual elements:
- Blue: Azure-related components
- Green: Input interfaces
- Yellow: Processing components
- Orange: Output generators
- Gray: External systems

- Rectangles: Core components
- Hexagons: External services
- Rounded rectangles: User interfaces

##### Important Flows to Highlight

a. Authentication Flow:
**User Input → Credential Validation → Azure Authentication → Resource Access**

b. Data Processing Flow:
**Azure Resources → Resource Collection → Data Transformation → Output Generation**

##### Key Technical Details

- Docker container support (show containerization boundary)
- Azure SDK integration points
- File output formats (XLSX, DrawIO, JSON, DOCX)
- Credential storage system (keyring integration)

## Diagram (Mermaid)

```mermaid
%%{init: {
  'theme': 'base',
  'themeVariables': {
    'primaryColor': '#2b2b2b',
    'primaryTextColor': '#fff',
    'primaryBorderColor': '#7C0000',
    'lineColor': '#F8B229',
    'secondaryColor': '#006100',
    'tertiaryColor': '#fff'
  }
}}%%

flowchart TB
    classDef input fill:#4CAF50,stroke:#333,stroke-width:2px
    classDef azure fill:#0078D4,stroke:#333,stroke-width:2px
    classDef process fill:#FFC107,stroke:#333,stroke-width:2px
    classDef output fill:#FF5722,stroke:#333,stroke-width:2px
    classDef external fill:#9E9E9E,stroke:#333,stroke-width:2px
    classDef container fill:#607D8B,stroke:#333,stroke-width:2px

    subgraph Input["Input Layer"]
        GUI[GUI Interface]:::input
        CLI[CLI Interface]:::input
        Auth[Authentication Component]:::input
    end

    subgraph Core["Core Processing Layer"]
        RCE[Resource Collection Engine]:::process
        subgraph Azure["Azure Function Components"]
            RF[Resource Functions]:::azure
            DT[Data Transformation]:::azure
            AI[Azure Imports]:::azure
        end
    end

    subgraph Output["Output Generation Layer"]
        EG[Excel Generator]:::output
        DG[Draw.io Generator]:::output
        JO[JSON Output]:::output
        WG[Word Document Generator]:::output
    end

    subgraph External["External Systems"]
        AC[Azure Cloud]:::external
        FS[File System]:::external
    end

    subgraph Container["Container & CI/CD"]
        Docker[Docker Container]:::container
        CICD[CI/CD Workflows]:::container
    end

    GUI --> Auth
    CLI --> Auth
    Auth --> RCE
    RCE --> AC
    RCE --> Azure
    RF --> DT
    AI --> RF
    DT --> Output
    Output --> FS
    
    %% Click events for component mapping
    click GUI "https://github.com/sander110419/Cloud-infra-visualization/blob/main/frontend.py"
    click CLI "https://github.com/sander110419/Cloud-infra-visualization/blob/main/main.py"
    click RCE "https://github.com/sander110419/Cloud-infra-visualization/blob/main/functions.py"
    click RF "https://github.com/sander110419/Cloud-infra-visualization/blob/main/azure_func/resource_functions.py"
    click DT "https://github.com/sander110419/Cloud-infra-visualization/blob/main/azure_func/json2xml.py"
    click AI "https://github.com/sander110419/Cloud-infra-visualization/blob/main/azure_func/azure_imports.py"
    click EG "https://github.com/sander110419/Cloud-infra-visualization/blob/main/output_xlsx.py"
    click DG "https://github.com/sander110419/Cloud-infra-visualization/blob/main/azure_func/json2xml.py"
    click WG "https://github.com/sander110419/Cloud-infra-visualization/blob/main/json2docx.py"
    click Docker "https://github.com/sander110419/Cloud-infra-visualization/tree/main/Dockerfile"
    click CICD "https://github.com/sander110419/Cloud-infra-visualization/tree/main/.github/workflows/"

    %% Legend
    subgraph Legend
        L1[Input Components]:::input
        L2[Azure Components]:::azure
        L3[Processing Components]:::process
        L4[Output Components]:::output
        L5[External Systems]:::external
        L6[Container Components]:::container
    end
```
