# jaydoubleu/azure-aws-enterprise-app architecture

> Architecture diagram of the GitHub repository jaydoubleu/azure-aws-enterprise-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jaydoubleu/azure-aws-enterprise-app
- Repository: https://github.com/jaydoubleu/azure-aws-enterprise-app

## Overview

##### Project Type & Purpose
- This project is a command-line integration tool that creates an AWS Enterprise application in Azure.
- It leverages the Azure CLI (az) and various JSON payload templates to configure aspects like application creation, provisioning templates, AWS credentials, and SAML settings.
- The tool is not a full-stack or web application but a utility with a CLI interface that orchestrates external services.

##### File Structure
- Top-Level Files:
- README.md: Provides an overview and usage instructions.
- create.py: The main script that handles user input and initiates provisioning actions.
- Directories:
- .github and its workflows: Indicates that code quality and analysis (via CodeQL) are part of the CI/CD process.
- payloads: Contains JSON payload templates (create_app.json, create_provisioningtemplate.json, set_awscredentials.json, set_saml.json) that are likely used by create.py to interact with Azure.

##### Main Components
a. CLI Component
- Represented by create.py where the command-line arguments are defined and parsed.

b. Payload Processing Module
- Depicted as a logical group that includes all JSON templates in the payloads directory.
- These templates define the structure of the requests sent to Azure.

c. Azure Cloud Integration Layer
- It as the component that interacts with Azure by invoking the azure-cli (az command).

d. External Services and Endpoints

e. CI/CD Pipeline (Optional)
- This shows how the code quality and security checking are integrated into the development process.

##### Relationships and Interactions
- User input flows into the CLI processing component.
- The CLI then fetches and applies the appropriate JSON payloads.
- These payloads are used to construct requests sent via the azure-cli layer.
- The Azure CLI interacts with the Azure services to create the AWS Enterprise app.

##### Architectural Patterns & Design Principles
- Separation of concerns: Distinguish between the CLI handling, payload management, and external cloud service interactions.
- Modular design: Highlight that the payloads are externalized into JSON files, which allows for easier updates or extensions.
- Integration via external tooling: The reliance on the azure-cli suggests a lightweight orchestration design without embedding SDKs directly.

##### Technologies, Frameworks, and Tools
- Python script (create.py) that forms the CLI front end.
- Azure CLI (az command) for cloud provisioning.
- JSON payload templates for standardizing requests.
- GitHub workflows for continuous integration (CodeQL analysis).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "CLI Layer"
        A("User"):::actor
        B("Input Parameters"):::local
        C("CLI (create.py)"):::local
    end

    subgraph "Payload Processing"
        D("Payload Templates"):::local
    end

    subgraph "Cloud Integration"
        E("Azure CLI"):::external
        F("Azure Enterprise App Services"):::external
    end

    subgraph "CI/CD Pipeline"
        G("CI/CD Pipeline (GitHub Workflows)"):::cicd
    end

    A -->|"ProvidesInput"| B
    B -->|"InitiatesCLI"| C
    C -->|"GeneratesPayload"| D
    C -->|"ExecutesAzCLICommand"| E
    E -->|"Configures"| F
    C -->|"TriggersAnalysis"| G

    click C "https://github.com/jaydoubleu/azure-aws-enterprise-app/blob/master/create.py"
    click D "https://github.com/jaydoubleu/azure-aws-enterprise-app/tree/master/payloads/"
    click E "https://github.com/jaydoubleu/azure-aws-enterprise-app/blob/master/create.py"
    click G "https://github.com/jaydoubleu/azure-aws-enterprise-app/blob/master/.github/workflows/codeql-analysis.yml"

    classDef local fill:#C2E7FF,stroke:#000,stroke-width:1px;
    classDef external fill:#FFE699,stroke:#000,stroke-width:1px;
    classDef cicd fill:#FFCCCB,stroke:#000,stroke-width:1px;
    classDef actor fill:#D9EAD3,stroke:#000,stroke-width:1px;
```
