# sumitsingh2rmga/gha-cicd-demo architecture

> Architecture diagram of the GitHub repository sumitsingh2rmga/gha-cicd-demo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sumitsingh2rmga/gha-cicd-demo
- Repository: https://github.com/sumitsingh2rmga/gha-cicd-demo

## Overview

gha-cicd-demo is both a release-dashboard application and a learning project for a GitHub Actions/GitOps deployment pipeline. The main delivery flow is CI validation and image publication, followed by development deployment, gated QA promotion, then gated production promotion from the QA-validated commit; ArgoCD applies the resulting manifests. At runtime, the Node server loads deployment configuration, serves the dashboard and operational endpoints, and exports metrics. The workflow and deployment links below follow README documentation; the runtime links are limited to the sampled source excerpts and their indexed references.

Main entry points: [`src/app.js`](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/app.js) (Request Router), [`.github/workflows/ci.yml`](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/.github/workflows/ci.yml) (CI Validation), [`src/index.js`](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/index.js) (HTTP Server Entry), [`.github/workflows/promote-qa.yml`](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/.github/workflows/promote-qa.yml) (QA Promotion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_delivery["CI and Release"]
  node_ci["CI Validation<br/>[ci.yml]"]
  node_image["Container Image<br/>[ci.yml]"]
  node_qa_promotion["QA Promotion<br/>[promote-qa.yml]"]
  node_prod_promotion["Production Promotion"]
  node_ghcr["GHCR"]
end

subgraph group_gitops["GitOps Deployment"]
  node_manifests["Deployment Manifests"]
  node_argocd["ArgoCD"]
  node_kubernetes["Kubernetes"]
end

subgraph group_server["Dashboard Server"]
  node_config["Runtime Configuration<br/>[config.js]"]
  node_server_entry["HTTP Server Entry<br/>[index.js]"]
  node_request_router["Request Router<br/>[app.js]"]
  node_dashboard["Dashboard UI<br/>[app.js]"]
end

subgraph group_observability["Health and Metrics"]
  node_health_chaos["Health and Chaos<br/>[app.js]"]
  node_metrics["Prometheus Metrics<br/>[metrics.js]"]
end

node_maintainer(("Contributor"))
node_prometheus(("Prometheus Scraper"))
node_operator(("Cluster Operator"))

node_maintainer -->|"opens PR"| node_ci
node_ci -->|"builds and scans"| node_image
node_image -->|"pushes image"| node_ghcr
node_ci -->|"bumps development"| node_manifests
node_ghcr -->|"checks image"| node_qa_promotion
node_qa_promotion -->|"bumps QA"| node_manifests
node_ghcr -->|"checks image"| node_prod_promotion
node_prod_promotion -->|"bumps production"| node_manifests
node_manifests -->|"watched by"| node_argocd
node_argocd -->|"applies manifests"| node_kubernetes
node_operator -->|"syncs production"| node_argocd
node_server_entry -->|"loads config"| node_config
node_server_entry -->|"creates app"| node_request_router
node_dashboard -->|"fetches endpoints"| node_request_router
node_request_router -->|"routes probes and chaos"| node_health_chaos
node_request_router -->|"records and renders"| node_metrics
node_prometheus -.->|"scrapes metrics"| node_request_router

click node_ci "https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/.github/workflows/ci.yml"
click node_image "https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/.github/workflows/ci.yml"
click node_qa_promotion "https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/.github/workflows/promote-qa.yml"
click node_prod_promotion "https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/.github/workflows/promote-production.yml"
click node_config "https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/config.js"
click node_server_entry "https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/index.js"
click node_request_router "https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/app.js"
click node_dashboard "https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/public/app.js"
click node_health_chaos "https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/app.js"
click node_metrics "https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/metrics.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ci,node_image,node_qa_promotion,node_prod_promotion,node_ghcr toneBlue
class node_manifests,node_argocd,node_kubernetes toneAmber
class node_config,node_server_entry,node_request_router,node_dashboard toneMint
class node_health_chaos,node_metrics toneRose
class node_maintainer,node_prometheus,node_operator toneIndigo
```

## Components

### CI and Release

- [CI Validation](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/.github/workflows/ci.yml): `.github/workflows/ci.yml`
- [Container Image](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/.github/workflows/ci.yml): `.github/workflows/ci.yml`
- [QA Promotion](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/.github/workflows/promote-qa.yml): `.github/workflows/promote-qa.yml`
- [Production Promotion](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/.github/workflows/promote-production.yml): `.github/workflows/promote-production.yml`
- **GHCR**

### GitOps Deployment

- **Deployment Manifests**
- **ArgoCD**
- **Kubernetes**

### Dashboard Server

- [Runtime Configuration](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/config.js): `src/config.js`
- [HTTP Server Entry](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/index.js): `src/index.js`
- [Request Router](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/app.js): `src/app.js`
- [Dashboard UI](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/public/app.js): `public/app.js`

### Health and Metrics

- [Health and Chaos](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/app.js): `src/app.js`
- [Prometheus Metrics](https://github.com/sumitsingh2rmga/gha-cicd-demo/blob/main/src/metrics.js): `src/metrics.js`

### Other components

- **Contributor**
- **Prometheus Scraper**
- **Cluster Operator**

## Connections

- Contributor → CI Validation: opens PR (evidence: `README.md`)
- CI Validation → Container Image: builds and scans (evidence: `README.md`)
- Container Image → GHCR: pushes image (evidence: `README.md`)
- CI Validation → Deployment Manifests: bumps development (evidence: `README.md`)
- GHCR → QA Promotion: checks image (evidence: `README.md`)
- QA Promotion → Deployment Manifests: bumps QA (evidence: `README.md`)
- GHCR → Production Promotion: checks image (evidence: `README.md`)
- Production Promotion → Deployment Manifests: bumps production (evidence: `README.md`)
- Deployment Manifests → ArgoCD: watched by (evidence: `README.md`)
- ArgoCD → Kubernetes: applies manifests (evidence: `README.md`)
- Cluster Operator → ArgoCD: syncs production (evidence: `README.md`)
- HTTP Server Entry → Runtime Configuration: loads config (evidence: `src/index.js`)
- HTTP Server Entry → Request Router: creates app (evidence: `src/index.js`)
- Dashboard UI → Request Router: fetches endpoints (evidence: `public/app.js`)
- Request Router → Health and Chaos: routes probes and chaos (evidence: `src/app.js`)
- Request Router → Prometheus Metrics: records and renders (evidence: `src/app.js`)
- Prometheus Scraper → Request Router: scrapes metrics
