# gunjanrajsingh/nike-landing-page-argocd architecture

> Architecture diagram of the GitHub repository gunjanrajsingh/nike-landing-page-argocd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gunjanrajsingh/nike-landing-page-argocd
- Repository: https://github.com/gunjanrajsingh/nike-landing-page-argocd

## Overview

##### Project Type and Purpose
- This is a single-page React application (built with Vite and Tailwind) packaged in a Docker container and deployed to Kubernetes via Argo CD and Helm.
- The “Sample project for ArgoCD” README confirms that the focus is on demonstrating a GitOps-driven CI/CD flow.

##### File-Structure Analysis
- Top-level CI/CD/config files:
- azure-pipelines.yml – Azure DevOps pipeline definition
- ArgoCD.yml and argo/argo-application.yaml – Argo CD Application manifests
- Dockerfile – containerizes the front-end app
- helm-chart/… – Helm Chart for templating Deployment and Service
- templates/… – (likely a secondary or example manifest set)
- Frontend code under src/: standard Vite+React layout with assets, components, sections
- Configuration: package.json, vite.config.js, tailwind.config.js, .eslintrc.cjs

##### Key System Components
a. Code Repository
- Contains application source, Dockerfile, Helm Chart, Argo CD manifests, pipeline definitions.
b. CI Pipeline (Azure DevOps)
- Pulls code, builds container image, pushes to Container Registry.
c. Container Registry (e.g., Azure ACR or Docker Hub)
- Hosts the tagged frontend image.
d. GitOps controller (Argo CD)
- Watches the Git repo/manifests, synchronizes Application to the cluster.
e. Kubernetes Cluster
- Receives Helm-rendered Deployment and Service resources.
- Deployment pods serve static build via an HTTP server (e.g., Nginx).
f. End Users
- Browse to the LoadBalancer/Ingress to consume the static front-end.

##### Relationships and Interactions
- Azure Pipelines triggers on commit → builds Docker image → pushes to Registry → updates image tag in Helm values (manually or via pipeline step).
- GitOps: Argo CD monitors Git (helm-chart/values.yaml or argo/argo-application.yaml) → detects manifest change → deploys updated Deployment to K8s.
- Kubernetes Service exposes pods, optionally behind Ingress.
- End Users’ HTTP requests flow through Service → Pod → React static assets.

##### Architectural Patterns & Principles
- GitOps: manifests-as-code, automated sync via Argo CD
- Immutable containers: Docker image tags in source
- Declarative infrastructure: Helm Chart templates + values
- Clear separation: CI pipeline vs. GitOps delivery

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Developer Environment"
        Dev["Developer\n(commits code)"]:::developer
        CodeRepo["Code Repository"]:::developer
    end
    Dev -->|"git push"| CodeRepo

    subgraph "CI/CD Plane"
        CI["Azure DevOps Pipeline"]:::ci
        DockerfileNode["Dockerfile"]:::ci
        Registry["Container Registry"]:::registry
    end
    CodeRepo -->|"trigger on commit"| CI
    CI -->|"build image"| DockerfileNode
    CI -->|"push image"| Registry

    subgraph "GitOps Plane"
        GitRepo["Git Repository\n(manifests & Helm)"]:::gitops
        ArgoCD["Argo CD Controller"]:::gitops
        HelmChart["Helm Chart"]:::gitops
    end
    Registry -->|"update Helm values"| GitRepo
    GitRepo -->|"templates & values"| HelmChart
    GitRepo -->|"sync manifests"| ArgoCD

    subgraph "Runtime Plane"
        subgraph "Kubernetes Cluster"
            Deployment["Deployment\n(Helm rendered)"]:::k8s
            Service["Service\n(LoadBalancer/Ingress)"]:::k8s
        end
    end
    ArgoCD -->|"deploy"| Deployment
    Deployment --> Service

    subgraph "End User"
        Browser["User Browser"]:::enduser
    end
    Browser -->|"http request"| Service

    %% Click Events
    click CodeRepo "https://github.com/gunjanrajsingh/nike-landing-page-argocd/tree/main//"
    click CI "https://github.com/gunjanrajsingh/nike-landing-page-argocd/blob/main/azure-pipelines.yml"
    click DockerfileNode "https://github.com/gunjanrajsingh/nike-landing-page-argocd/tree/main/Dockerfile"
    click ArgoCD "https://github.com/gunjanrajsingh/nike-landing-page-argocd/blob/main/argo/argo-application.yaml"
    click ArgoCD "https://github.com/gunjanrajsingh/nike-landing-page-argocd/blob/main/ArgoCD.yml"
    click HelmChart "https://github.com/gunjanrajsingh/nike-landing-page-argocd/blob/main/helm-chart/Chart.yaml"

    %% Styles
    classDef developer fill:#FFD700,stroke:#333,stroke-width:1px
    classDef ci fill:#87CEFA,stroke:#333,stroke-width:1px
    classDef registry fill:#7FFFD4,stroke:#333,stroke-width:1px
    classDef gitops fill:#ADFF2F,stroke:#333,stroke-width:1px
    classDef k8s fill:#FFA07A,stroke:#333,stroke-width:1px
    classDef enduser fill:#D3D3D3,stroke:#333,stroke-width:1px
```
