# shubham00k/ecommerce-devops-implementation- architecture

> Architecture diagram of the GitHub repository shubham00k/ecommerce-devops-implementation-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shubham00k/ecommerce-devops-implementation-
- Repository: https://github.com/shubham00k/ecommerce-devops-implementation-

## Overview

##### Project type and purpose
- This is a full-stack, microservices-based e-commerce demo application with a complete DevOps pipeline.
- It uses Terraform to provision AWS infrastructure (VPC, EKS, IAM), Docker for containerization, Kubernetes (Deployments, Services, Ingress, PV/PVC) for orchestration, GitHub Actions & Argo CD for CI/CD/GitOps, and OpenTelemetry/Prometheus/Grafana for observability.

##### File structure
- Top-level folders:
- .github/workflows → CI pipeline definitions
- Terraform → IaC modules for VPC & EKS, state backend
- K8s → Kubernetes manifests (deployments, services, ingress) per microservice
- docker-compose.yml → local integration
- src → 16+ language-specific microservices (accounting, ad, cart, checkout, currency, email, fraud-detection, image-provider, kafka, load-generator, payment, product-catalog, quote, recommendation, shipping, frontend, frontend-proxy, flagd, flagd-ui, react-native…), plus observability (otel-collector, prometheus, grafana)
- Each service folder contains a Dockerfile, code, and often generated protobufs or tests.

##### README for additional insights
- Confirms AWS EKS deployment, Infrastructure as Code, Containerization, Orchestration, CI/CD, GitOps.

## Diagram (Mermaid)

```mermaid
graph TD
  %% Clients Layer
  subgraph "Clients" 
    direction TB
    Browser["Browser (Next.js)"]:::clients
    Mobile["Mobile App (React Native)"]:::clients
  end
  click Browser "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/frontend/"
  click Mobile "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/react-native-app/"

  %% Edge & API Layer
  subgraph "Edge & API Layer"
    direction TB
    Proxy["Envoy Proxy + Ingress"]:::edge
    FFFlagd["Feature Flag Service (flagd)"]:::edge
    FFUI["Feature Flag UI (flagd-ui)"]:::edge
  end
  click Proxy "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/frontend-proxy/"
  click FFFlagd "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/flagd/"
  click FFUI "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/flagd-ui/"
  click FFUI "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/flagd/"

  Browser --> Proxy
  Mobile --> Proxy

  %% Microservices Layer
  subgraph "Microservices"
    direction TB
    subgraph "User & Catalog Services"
      direction TB
      Product["Product Catalog (Go)"]:::service
      Ad["Ad Service (Java)"]:::service
      Recommendation["Recommendation (Python/gRPC)"]:::service
      Currency["Currency Service (C++ gRPC)"]:::service
      Cart["Cart Service (C#/.NET)"]:::service
      Quote["Quote Service (PHP)"]:::service
      Payment["Payment Service (Node.js)"]:::service
      Image["Image Provider (NGINX)"]:::service
    end
    subgraph "Order Processing"
      direction TB
      Checkout["Checkout (Go + Kafka)"]:::service
      Shipping["Shipping (Rust)"]:::service
      Fraud["Fraud Detection (Kotlin/Java)"]:::service
      Accounting["Accounting (C#)"]:::service
      Email["Email Service (Ruby)"]:::service
    end
  end

  click Product "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/product-catalog/"
  click Product "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/productcatalog/"
  click Ad "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/ad/"
  click Ad "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/ad/"
  click Recommendation "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/recommendation/"
  click Recommendation "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/recommendation/"
  click Currency "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/currency/"
  click Currency "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/currency/"
  click Cart "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/cart/"
  click Cart "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/cart/"
  click Quote "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/quote/"
  click Quote "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/quote/"
  click Payment "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/payment/"
  click Payment "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/payment/"
  click Image "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/image-provider/"
  click Image "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/imageprovider/"
  click Checkout "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/checkout/"
  click Checkout "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/checkout/"
  click Shipping "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/shipping/"
  click Shipping "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/shipping/"
  click Fraud "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/fraud-detection/"
  click Fraud "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/frauddetection/"
  click Accounting "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/accounting/"
  click Accounting "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/accounting/"
  click Email "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/email/"
  click Email "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/email/"

  %% Messaging & Stateful
  subgraph "Messaging & Storage"
    direction TB
    Kafka["Kafka Cluster"]:::data
    Valkey["Valkey Store (PVC)"]:::data
  end
  click Kafka "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/kafka/"
  click Kafka "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/kafka/"
  click Valkey "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/K8s/valkey/"

  %% Observability Layer
  subgraph "Observability"
    direction TB
    OTEL["OpenTelemetry Collector"]:::observ
    Prom["Prometheus"]:::observ
    Graf["Grafana"]:::observ
  end
  click OTEL "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/otel-collector/"
  click Prom "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/prometheus/"
  click Graf "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/src/grafana/"

  %% Infrastructure Layer
  subgraph "Infrastructure (AWS)"
    direction TB
    VPC["VPC & Subnets"]:::infra
    EKS["EKS Cluster"]:::infra
    IAM["IAM Roles"]:::infra
  end
  click VPC "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/Terraform/"
  click EKS "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/Terraform/"
  click IAM "https://github.com/shubham00k/ecommerce-devops-implementation-/tree/main/Terraform/"

  %% CI/CD Pipeline
  subgraph "CI/CD & GitOps"
    direction TB
    Pipeline["GitHub Actions"]:::ci
    Registry["Docker Registry"]:::ci
    ArgoCD["Argo CD"]:::ci
  end
  click Pipeline "https://github.com/shubham00k/ecommerce-devops-implementation-/blob/main/.github/workflows/ci.yaml"

  %% Connections
  Proxy -->|"REST/gRPC"| Product
  Proxy -->|"REST/gRPC"| Ad
  Proxy -->|"gRPC"| Recommendation
  Proxy -->|"gRPC"| Currency
  Proxy -->|"REST"| Cart
  Proxy -->|"REST"| Quote
  Proxy -->|"REST"| Payment
  Proxy -->|"HTTP"| Image

  Checkout -->|"produce event"| Kafka
  Kafka -->|"consume event"| Shipping
  Kafka -->|"consume event"| Accounting
  Kafka -->|"consume event"| Email
  Kafka -->|"consume event"| Fraud
  Cart -->|"stateful storage"| Valkey

  %% Telemetry flows
  Product --> OTEL
  Ad --> OTEL
  Recommendation --> OTEL
  Currency --> OTEL
  Cart --> OTEL
  Quote --> OTEL
  Payment --> OTEL
  Image --> OTEL
  Checkout --> OTEL
  Shipping --> OTEL
  Fraud --> OTEL
  Accounting --> OTEL
  Email --> OTEL
  Proxy --> OTEL
  FFFlagd --> OTEL
  FFUI --> OTEL
  Kafka --> OTEL
  Valkey --> OTEL

  OTEL --> Prom
  Prom <-- Graf

  %% CI/CD flow
  Pipeline --> Registry --> ArgoCD --> EKS

  %% Infrastructure relationships
  EKS --> VPC
  EKS --> IAM

  %% Styles
  classDef clients fill:#D0EFFF,stroke:#333,stroke-width:1px
  classDef edge fill:#D0FFD0,stroke:#333,stroke-width:1px
  classDef service fill:#E8F5E9,stroke:#333,stroke-width:1px
  classDef data fill:#FFE0B2,stroke:#333,stroke-width:1px
  classDef observ fill:#E1BEE7,stroke:#333,stroke-width:1px
  classDef infra fill:#CFD8DC,stroke:#333,stroke-width:1px
  classDef ci fill:#FFCDD2,stroke:#333,stroke-width:1px
  classDef services fill:#E8F5E9
  classDef orderprocessing fill:#E8F5E9
  classDef usercatalog fill:#E8F5E9
```
