# tunghauvan/argocd-example-apps architecture

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

- Interactive diagram: https://gitdiagram.com/tunghauvan/argocd-example-apps
- Repository: https://github.com/tunghauvan/argocd-example-apps

## Overview

##### Main Components

a. Core Components:
- ArgoCD Server
- Git Repository (this example apps repository)
- Kubernetes Cluster
- Multiple Application Deployment Methods (Helm, Ksonnet, Jsonnet, Kustomize)

b. Sample Applications:
- Guestbook (implemented in multiple ways)
- Sock Shop (microservices architecture)
- Blue-Green Deployment example
- Apps of Apps pattern

**┌─ Kubernetes Cluster ─────────────────────┐**

- ┌─ ArgoCD ─────┐                       │

- ┘                       │
- ┘

**┌─ Configuration Methods ─────────────────┐**
- ┌─────────┐ ┌────────┐ ┌────────────┐  │
- Helm   │ │Jsonnet │ │ Kustomize  │  │
- ┘ └────────┘ └────────────┘  │
- ┘

**┌─ Example Applications ──────────────────────┐**
- ┌─────────┐ ┌──────────┐ ┌──────────────┐  │
- Guestbook│ │Sock Shop │ │Blue-Green App│  │
- ┘ └──────────┘ └──────────────┘  │
- ┘

##### Relationships to Highlight

- Git repository → ArgoCD (configuration source)
- ArgoCD → Kubernetes (deployment target)
- Configuration methods → Applications (implementation)
- Inter-service communications in Sock Shop

##### Implementation Details

Use these symbols:
- Rectangles for services
- Hexagons for configuration management tools
- Clouds for external services

##### Additional Elements

Include:
- Version information for major components
- Environment segregation (dev/prod) where applicable
- Configuration management tool specifications
- Sync status indicators

Remember to include:
- Clear component boundaries
- Directional data flow
- Environment contexts
- Configuration sources
- Deployment targets
- Monitoring points

This will provide a comprehensive view of how the example applications work together while demonstrating various ArgoCD features and deployment patterns.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Infrastructure
        K8S[Kubernetes Cluster]:::infra
        ARGO[ArgoCD Server]:::infra
        GIT[Git Repository]:::infra
    end

    subgraph "Configuration Management"
        HELM[Helm]:::config
        JSONNET[Jsonnet]:::config
        KSONNET[Ksonnet]:::config
        KUSTOMIZE[Kustomize]:::config
    end

    subgraph "Sample Applications"
        GUEST[Guestbook]:::app
        SOCK[Sock Shop]:::app
        BG[Blue-Green App]:::app
        SYNC[Sync Waves]:::app
        HOOKS[Pre/Post Sync]:::app
        APPS[Apps of Apps]:::app
    end

    subgraph "Sock Shop Components"
        FRONT[Frontend]:::service
        CARTS[Carts Service]:::service
        CAT[Catalogue Service]:::service
        ORD[Orders Service]:::service
        PAY[Payment Service]:::service
        SHIP[Shipping Service]:::service
        USER[User Service]:::service
        MQ[RabbitMQ]:::queue
    end

    subgraph "Environments"
        DEV[Development]:::env
        PROD[Production]:::env
    end

    GIT --> ARGO
    ARGO --> K8S

    HELM --> GUEST
    JSONNET --> GUEST
    KSONNET --> GUEST
    KUSTOMIZE --> GUEST

    SOCK --> FRONT
    SOCK --> CARTS
    SOCK --> CAT
    SOCK --> ORD
    SOCK --> PAY
    SOCK --> SHIP
    SOCK --> USER
    SOCK --> MQ

    KSONNET --> DEV
    KSONNET --> PROD

    classDef infra fill:#blue,stroke:#333,stroke-width:2px
    classDef config fill:#green,stroke:#333,stroke-width:2px
    classDef app fill:#orange,stroke:#333,stroke-width:2px
    classDef service fill:#lightblue,stroke:#333,stroke-width:2px
    classDef queue fill:#purple,stroke:#333,stroke-width:2px
    classDef env fill:#yellow,stroke:#333,stroke-width:2px

    click HELM "https://github.com/tunghauvan/argocd-example-apps/tree/master/helm-guestbook"
    click JSONNET "https://github.com/tunghauvan/argocd-example-apps/tree/master/jsonnet-guestbook"
    click KSONNET "https://github.com/tunghauvan/argocd-example-apps/tree/master/ksonnet-guestbook"
    click KUSTOMIZE "https://github.com/tunghauvan/argocd-example-apps/tree/master/kustomize-guestbook"
    click GUEST "https://github.com/tunghauvan/argocd-example-apps/tree/master/guestbook"
    click SOCK "https://github.com/tunghauvan/argocd-example-apps/tree/master/sock-shop"
    click FRONT "https://github.com/tunghauvan/argocd-example-apps/blob/master/sock-shop/base/front-end-dep.yaml"
    click CARTS "https://github.com/tunghauvan/argocd-example-apps/blob/master/sock-shop/base/carts-dep.yaml"
    click CAT "https://github.com/tunghauvan/argocd-example-apps/blob/master/sock-shop/base/catalogue-dep.yaml"
    click ORD "https://github.com/tunghauvan/argocd-example-apps/blob/master/sock-shop/base/orders-dep.yaml"
    click PAY "https://github.com/tunghauvan/argocd-example-apps/blob/master/sock-shop/base/payment-dep.yaml"
    click SHIP "https://github.com/tunghauvan/argocd-example-apps/blob/master/sock-shop/base/shipping-dep.yaml"
    click USER "https://github.com/tunghauvan/argocd-example-apps/blob/master/sock-shop/base/user-dep.yaml"
    click MQ "https://github.com/tunghauvan/argocd-example-apps/blob/master/sock-shop/base/rabbitmq-dep.yaml"
    click BG "https://github.com/tunghauvan/argocd-example-apps/tree/master/blue-green"
    click SYNC "https://github.com/tunghauvan/argocd-example-apps/blob/master/sync-waves/manifests.yaml"
    click HOOKS "https://github.com/tunghauvan/argocd-example-apps/tree/master/pre-post-sync"
    click APPS "https://github.com/tunghauvan/argocd-example-apps/tree/master/apps"
    click DEV "https://github.com/tunghauvan/argocd-example-apps/tree/master/ksonnet-guestbook/environments/dev"
    click PROD "https://github.com/tunghauvan/argocd-example-apps/tree/master/ksonnet-guestbook/environments/prod"
```
