# aws-samples/appmod-blueprints architecture

> Architecture diagram of the GitHub repository aws-samples/appmod-blueprints, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aws-samples/appmod-blueprints
- Repository: https://github.com/aws-samples/appmod-blueprints

## Overview

##### Main Components
- Application Blueprints – Represent each major application “family” as a separate component. For instance, the dotnet application, next-js frontend (with its Angular/React flavor), java apps, and other language-specific microservices. Each application blueprint may follow a multi-layered design:
– Presentation / Frontend (e.g., Next.js client app)
– Backend and API layers (e.g., dotnet’s WebUI, controllers, handlers, and domain/persistence layers)
- CI/CD and GitOps Pipeline – Illustrate the GitOps flow from repository commit (using the Git-based flow visible in the deployment and packages directories) through the CI/CD pipeline to cluster deployments. Emphasize the use of progressive delivery and tools like Argo Rollouts and KubeVela.
- External and AWS Services – Although not explicitly depicted as separate AWS service configuration files, include AWS elements (such as RDS, S3 buckets, DynamoDB, etc.) referenced across the different blueprints and Terraform modules. This shows integration with native cloud services.

##### Relationships and Interactions
- Connections between the platform layer and the application blueprints – for example, how GitOps tools (ArgoCD) manage the state of clusters containing applications.
- Application backend to data stores and external services.
- That frontends (e.g., the Next.js client) communicate with backend APIs (dotnet controllers, node, python, etc.) and that these services might expose interfaces (APIs) to external consumers.

##### Architectural Patterns and Principles
- Microservices (since many blueprints follow that approach) and modularity – each application blueprint is designed with separation of concerns (Controllers, Domain, Persistence, etc. in dotnet for example).
- Demonstrate the GitOps approach for deployments where infrastructure and application definitions are managed as code.
- Progressive delivery patterns (e.g., Argo Rollouts found in the deployment addons) that enable gradual rollouts and feature flagging.
- Use of CI/CD and automated provisioning via Terraform and Helm charts (e.g., in the platform and packages directories).

##### Relevant Technologies, Frameworks, and Tools
- AWS Cloud services for platform hosting.
- Kubernetes clusters (management, dev, and prod) orchestrated via GitOps (ArgoCD, KubeVela).
- Terraform for infrastructure-as-code (state management and provisioning in platform/infra/terraform).
- Helm charts and kustomize templates (located in packages/ and deployment/addons) for deploying applications.
- A variety of application frameworks, including dotnet (with WebUI, domain, persistence layers), Next.js (React-based frontends), and other language-specific toolchains.
- Progressive delivery tools such as Argo Rollouts (configuration files under deployment/addons/argo-rollouts).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "AWS Cloud Environment"
        %% Platform Infrastructure & GitOps Tools
        subgraph "Platform Infrastructure & GitOps Tools"
            T["Terraform Infra"]:::infra
            ACD["ArgoCD"]:::infra
            AR["Argo Rollouts"]:::infra
            KV["KubeVela"]:::infra
        end

        %% Kubernetes Clusters
        subgraph "Kubernetes Clusters"
            M["Management Cluster"]:::cluster
            D["Workload Cluster - Dev"]:::cluster
            P["Workload Cluster - Prod"]:::cluster
        end

        %% CI/CD & GitOps Pipeline
        subgraph "CI/CD & GitOps Pipeline"
            CICD["CI/CD Pipeline"]:::pipeline
        end

        %% Application Blueprints
        subgraph "Application Blueprints"
            Dotnet["Dotnet Application Blueprint"]:::blueprint
            Next["Next.js Frontend"]:::blueprint
            Java["Java Application Blueprint"]:::blueprint
            Mono["Mono Application Blueprint"]:::blueprint
            Node["Node Application Blueprint"]:::blueprint
            Python["Python Application Blueprint"]:::blueprint
            Rust["Rust Application Blueprint"]:::blueprint
        end

        %% External & AWS Services
        External["AWS & External Services (RDS,S3,etc.)"]:::external

        %% Source Code Repository
        Source["Source Code Repository"]:::source
    end

    %% Connections
    Source -->|"triggers"| CICD
    CICD -->|"deploysTo"| M
    CICD -->|"deploysTo"| D
    CICD -->|"deploysTo"| P
    T -->|"provisions"| M
    T -->|"provisions"| D
    T -->|"provisions"| P
    ACD -->|"manages"| M
    AR -->|"orchestrates"| D
    KV -->|"orchestrates"| P
    CICD -->|"deploysBlueprints"| Dotnet
    CICD -->|"deploysBlueprints"| Next
    CICD -->|"deploysBlueprints"| Java
    CICD -->|"deploysBlueprints"| Mono
    CICD -->|"deploysBlueprints"| Node
    CICD -->|"deploysBlueprints"| Python
    CICD -->|"deploysBlueprints"| Rust
    Dotnet -->|"connectsTo"| External
    Next -->|"connectsTo"| External
    Java -->|"connectsTo"| External
    Mono -->|"connectsTo"| External
    Node -->|"connectsTo"| External
    Python -->|"connectsTo"| External
    Rust -->|"connectsTo"| External
    T -->|"provisions"| External

    %% Click Events
    click T "https://github.com/aws-samples/appmod-blueprints/tree/main/platform/infra/terraform"
    click ACD "https://github.com/aws-samples/appmod-blueprints/tree/main/packages/argocd"
    click AR "https://github.com/aws-samples/appmod-blueprints/tree/main/deployment/addons/argo-rollouts"
    click KV "https://github.com/aws-samples/appmod-blueprints/tree/main/deployment/addons/kubevela"
    click Dotnet "https://github.com/aws-samples/appmod-blueprints/tree/main/applications/dotnet"
    click Next "https://github.com/aws-samples/appmod-blueprints/tree/main/applications/next-js"
    click Java "https://github.com/aws-samples/appmod-blueprints/tree/main/applications/java"
    click Mono "https://github.com/aws-samples/appmod-blueprints/tree/main/applications/mono-a2c"
    click Node "https://github.com/aws-samples/appmod-blueprints/tree/main/applications/node"
    click Python "https://github.com/aws-samples/appmod-blueprints/tree/main/applications/python"
    click Rust "https://github.com/aws-samples/appmod-blueprints/tree/main/applications/rust"
    click CICD "https://github.com/aws-samples/appmod-blueprints/tree/main/deployment"
    click External "https://github.com/aws-samples/appmod-blueprints/tree/main/platform/infra/terraform/database"

    %% Styles
    classDef infra fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef cluster fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef pipeline fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef blueprint fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef external fill:#e2e3e5,stroke:#6c757d,stroke-width:2px;
    classDef source fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
```
