# balachmir-cp-2077/gitops-microservices-platform architecture

> Architecture diagram of the GitHub repository balachmir-cp-2077/gitops-microservices-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/balachmir-cp-2077/gitops-microservices-platform
- Repository: https://github.com/balachmir-cp-2077/gitops-microservices-platform

## Overview

This repository combines a GitOps-managed Kubernetes platform with an order API and inventory catalog. The main customer workflow enters through ingress, reaches the order service, validates item stock and price through inventory, and returns an order; the order service also serves a dashboard and order listings. Separately, ArgoCD reconciles the declared Kubernetes manifests from Git. Runtime calls are supported by the sampled application code; deployment and reconciliation links follow the README, while individual manifest details were not sampled.

Main entry points: [`k8s`](https://github.com/balachmir-cp-2077/gitops-microservices-platform/tree/main/k8s) (Desired Manifests), [`k8s/inventory/deployment.yaml`](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/inventory/deployment.yaml) (Inventory Deployment), [`services/order-service/app.py`](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/services/order-service/app.py) (Order API and Dashboard), [`k8s/order/deployment.yaml`](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/order/deployment.yaml) (Order Deployment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gitops["GitOps Control"]
  node_application["ArgoCD Application<br/>[application.yaml]"]
  node_manifests["Desired Manifests"]
  node_repo["ArgoCD Repo Server"]
  node_controller["ArgoCD Controller"]
end

subgraph group_platform["Kubernetes Platform"]
  node_ingress["Ingress Routing<br/>[ingress.yaml]"]
  node_order_config["Order Configuration<br/>[configmap.yaml]"]
  node_order_deploy["Order Deployment<br/>[deployment.yaml]"]
  node_order_service["Order Service Route<br/>[service.yaml]"]
  node_inventory_config["Inventory Configuration<br/>[configmap.yaml]"]
  node_inventory_deploy["Inventory Deployment<br/>[deployment.yaml]"]
  node_inventory_service["Inventory Service Route<br/>[service.yaml]"]
end

subgraph group_orders["Order Service"]
  node_order_app["Order API and Dashboard<br/>[app.py]"]
  node_orders_state["In-Memory Orders<br/>[app.py]"]
end

subgraph group_inventory["Inventory Service"]
  node_inventory_app["Inventory API<br/>[app.py]"]
  node_catalog["In-Memory Catalog<br/>[app.py]"]
end

node_customer(("Customer"))
node_git(("Git Repository"))

node_git -->|"polls manifests"| node_repo
node_application -->|"configures source"| node_repo
node_repo -->|"supplies manifests"| node_controller
node_controller -->|"reconciles desired state"| node_manifests
node_manifests -->|"declares routing"| node_ingress
node_manifests -->|"declares configuration"| node_order_config
node_manifests -->|"declares workload"| node_order_deploy
node_manifests -->|"declares service"| node_order_service
node_manifests -->|"declares configuration"| node_inventory_config
node_manifests -->|"declares workload"| node_inventory_deploy
node_manifests -->|"declares service"| node_inventory_service
node_order_config -->|"configures"| node_order_deploy
node_inventory_config -->|"configures"| node_inventory_deploy
node_customer -->|"HTTP request"| node_ingress
node_ingress -->|"routes request"| node_order_service
node_order_service -->|"forwards traffic"| node_order_deploy
node_order_deploy -->|"runs"| node_order_app
node_order_app -->|"queries item and health"| node_inventory_service
node_order_app -->|"calls inventory API"| node_inventory_deploy
node_inventory_service -->|"forwards traffic"| node_inventory_deploy
node_inventory_deploy -->|"runs"| node_inventory_app
node_inventory_app -->|"reads item data"| node_catalog
node_order_app -->|"reads and writes"| node_orders_state

click node_application "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/argocd/application.yaml"
click node_manifests "https://github.com/balachmir-cp-2077/gitops-microservices-platform/tree/main/k8s"
click node_ingress "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/ingress.yaml"
click node_order_config "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/order/configmap.yaml"
click node_order_deploy "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/order/deployment.yaml"
click node_order_service "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/order/service.yaml"
click node_inventory_config "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/inventory/configmap.yaml"
click node_inventory_deploy "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/inventory/deployment.yaml"
click node_inventory_service "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/inventory/service.yaml"
click node_order_app "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/services/order-service/app.py"
click node_orders_state "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/services/order-service/app.py"
click node_inventory_app "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/services/inventory-service/app.py"
click node_catalog "https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/services/inventory-service/app.py"

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_application,node_manifests,node_repo,node_controller toneBlue
class node_ingress,node_order_config,node_order_deploy,node_order_service,node_inventory_config,node_inventory_deploy,node_inventory_service toneAmber
class node_order_app,node_orders_state toneMint
class node_inventory_app,node_catalog toneRose
class node_customer,node_git toneIndigo
```

## Components

### GitOps Control

- [ArgoCD Application](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/argocd/application.yaml): `argocd/application.yaml`
- [Desired Manifests](https://github.com/balachmir-cp-2077/gitops-microservices-platform/tree/main/k8s): `k8s`
- **ArgoCD Repo Server**
- **ArgoCD Controller**

### Kubernetes Platform

- [Ingress Routing](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/ingress.yaml): `k8s/ingress.yaml`
- [Order Configuration](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/order/configmap.yaml): `k8s/order/configmap.yaml`
- [Order Deployment](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/order/deployment.yaml): `k8s/order/deployment.yaml`
- [Order Service Route](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/order/service.yaml): `k8s/order/service.yaml`
- [Inventory Configuration](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/inventory/configmap.yaml): `k8s/inventory/configmap.yaml`
- [Inventory Deployment](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/inventory/deployment.yaml): `k8s/inventory/deployment.yaml`
- [Inventory Service Route](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/k8s/inventory/service.yaml): `k8s/inventory/service.yaml`

### Order Service

- [Order API and Dashboard](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/services/order-service/app.py): `services/order-service/app.py`
- [In-Memory Orders](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/services/order-service/app.py): `services/order-service/app.py`

### Inventory Service

- [Inventory API](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/services/inventory-service/app.py): `services/inventory-service/app.py`
- [In-Memory Catalog](https://github.com/balachmir-cp-2077/gitops-microservices-platform/blob/main/services/inventory-service/app.py): `services/inventory-service/app.py`

### Other components

- **Customer**
- **Git Repository**

## Connections

- Git Repository → ArgoCD Repo Server: polls manifests
- ArgoCD Application → ArgoCD Repo Server: configures source
- ArgoCD Repo Server → ArgoCD Controller: supplies manifests
- ArgoCD Controller → Desired Manifests: reconciles desired state
- Desired Manifests → Ingress Routing: declares routing
- Desired Manifests → Order Configuration: declares configuration
- Desired Manifests → Order Deployment: declares workload
- Desired Manifests → Order Service Route: declares service
- Desired Manifests → Inventory Configuration: declares configuration
- Desired Manifests → Inventory Deployment: declares workload
- Desired Manifests → Inventory Service Route: declares service
- Order Configuration → Order Deployment: configures
- Inventory Configuration → Inventory Deployment: configures
- Customer → Ingress Routing: HTTP request
- Ingress Routing → Order Service Route: routes request
- Order Service Route → Order Deployment: forwards traffic
- Order Deployment → Order API and Dashboard: runs
- Order API and Dashboard → Inventory Service Route: queries item and health
- Order API and Dashboard → Inventory Deployment: calls inventory API
- Inventory Service Route → Inventory Deployment: forwards traffic
- Inventory Deployment → Inventory API: runs
- Inventory API → In-Memory Catalog: reads item data
- Order API and Dashboard → In-Memory Orders: reads and writes
