# jnayak1482/kind_github_argocd architecture

> Architecture diagram of the GitHub repository jnayak1482/kind_github_argocd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jnayak1482/kind_github_argocd
- Repository: https://github.com/jnayak1482/kind_github_argocd

## Overview

##### Project type and purpose
- This is a single-page React application (built with Create React App) delivering a frontend UI.
- It’s containerized via Docker and deployed into a Kubernetes cluster via GitOps (Argo CD), using Metallb for LoadBalancer functionality.

##### File structure
- Top levels:
- Dockerfile + .dockerignore → how the React app is containerized.
- manifest/ → holds Kubernetes resources (Argocd App, Deployment, Service, Kustomization, Metallb config).
- public/ + src/ → React app source code.
- package.json / lock → Node dependencies & scripts.
- No backend code here; this is purely a frontend micro-service.

##### Key README insights
- Standard Create React App lifecycle: npm start, build, test, eject.
- No custom architecture described beyond React’s default.

##### Main components
a. Browser (end-user)
b. Container registry (optional)
c. Kubernetes cluster
- Argo CD server (GitOps controller)
- React-app Deployment (Pods running Nginx or node server serving static build)
- Service (ClusterIP)
- Metallb LoadBalancer (external IP for the Service)
d. Git repository (source of manifests & Dockerfile)

##### Relationships & data flows
- Developer pushes code & manifests to Git repo →
Argo CD sees commit →
Argo CD syncs manifests →
Kubernetes Deployment updated →
New pods built (pull image from registry) →
Metallb assigns external IP to Service →
User’s browser loads static assets via that external IP over HTTP/S.

##### Architectural patterns & principles
- GitOps for continuous deployment (Argo CD driving cluster state from Git).
- Containerization of frontend static assets.
- Separation of concerns: UI code (src/, public/) vs. infra code (manifest/).

##### Technologies & frameworks
- React (frontend library)
- Create React App (build toolchain: Webpack, Babel)
- Docker (containerization)
- Kubernetes (orchestration)
- Argo CD (GitOps controller)
- Metallb (bare-metal LoadBalancer)

## Diagram (Mermaid)

```mermaid
graph TB
    %% User Layer
    Browser["End-User Browser"]:::user

    %% Developer Layer
    Dev["Developer"]:::user

    %% Repository Layer
    GitRepo["GitHub Repository"]:::code

    Dev -->|"push code & manifests"| GitRepo

    subgraph "GitHub Repository"
        README["README.md"]:::code
        Gitignore[".gitignore"]:::code
        Src["src/"]:::code
        Public["public/"]:::code
        Pkg["package.json"]:::code
        Lock["package-lock.json"]:::code
        Dockerfile["Dockerfile"]:::code
        DotDockerignore[".dockerignore"]:::code
        CIAction["GitHub Actions (CI)"]:::code
        Kustom["kustomization.yaml"]:::code
        ArgocdApp["argocd-app.yaml"]:::code
        DeploymentYaml["deployment.yaml"]:::code
        ServiceYaml["service.yaml"]:::code
        MetallbCfg["metallb-config.yaml"]:::code
    end

    GitRepo -->|"triggers CI"| CIAction
    CIAction -->|"build & push image"| Registry["Container Registry"]:::registry
    GitRepo -->|"sync manifests"| ArgoCD["Argo CD (GitOps)"]:::code

    %% Kubernetes Cluster Layer
    subgraph "Kubernetes Cluster" 
        K8sAPI["Kubernetes API Server"]:::infra
        Deploy["Deployment (React App Pods)"]:::infra
        Service["Service (ClusterIP)"]:::infra
        LB["MetalLB LoadBalancer"]:::infra
    end

    ArgoCD -->|"apply manifests via API"| K8sAPI
    Registry -->|"pull image"| Deploy
    K8sAPI -->|"create/update"| Deploy
    K8sAPI -->|"create/update"| Service
    Service -->|"routes traffic to"| Deploy
    LB -->|"external IP for"| Service
    Browser -->|"HTTP/S"| LB

    %% Click Events
    click Src "https://github.com/jnayak1482/kind_github_argocd/tree/main/src/"
    click Public "https://github.com/jnayak1482/kind_github_argocd/tree/main/public/"
    click Pkg "https://github.com/jnayak1482/kind_github_argocd/blob/main/package.json"
    click Lock "https://github.com/jnayak1482/kind_github_argocd/blob/main/package-lock.json"
    click Dockerfile "https://github.com/jnayak1482/kind_github_argocd/tree/main/Dockerfile"
    click DotDockerignore "https://github.com/jnayak1482/kind_github_argocd/blob/main/.dockerignore"
    click CIAction "https://github.com/jnayak1482/kind_github_argocd/blob/main/.github/workflows/deploy.yaml"
    click ArgocdApp "https://github.com/jnayak1482/kind_github_argocd/blob/main/manifest/argocd-app.yaml"
    click DeploymentYaml "https://github.com/jnayak1482/kind_github_argocd/blob/main/manifest/deployment.yaml"
    click ServiceYaml "https://github.com/jnayak1482/kind_github_argocd/blob/main/manifest/service.yaml"
    click MetallbCfg "https://github.com/jnayak1482/kind_github_argocd/blob/main/manifest/metallb-config.yaml"
    click Kustom "https://github.com/jnayak1482/kind_github_argocd/blob/main/manifest/kustomization.yaml"
    click README "https://github.com/jnayak1482/kind_github_argocd/blob/main/README.md"
    click Gitignore "https://github.com/jnayak1482/kind_github_argocd/blob/main/.gitignore"

    %% Styles
    classDef code fill:#BBDEFB,stroke:#1E88E5,color:#1A237E
    classDef infra fill:#C8E6C9,stroke:#43A047,color:#1B5E20
    classDef user fill:#FFE0B2,stroke:#FB8C00,color:#E65100
    classDef registry fill:#D7CCC8,stroke:#6D4C41,color:#3E2723
```
