# samyam-pradhan/microservices-demo architecture

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

- Interactive diagram: https://gitdiagram.com/samyam-pradhan/microservices-demo
- Repository: https://github.com/samyam-pradhan/microservices-demo

## Overview

Sock Shop is a deprecated, user-facing microservices demo for an online sock shop, built to demonstrate cloud-native technologies. The main user journey enters through the front end; the repository tree identifies catalogue, cart, user, orders, payment and shipping services, plus messaging and persistence components. Deployment manifests establish that these components are intended to run together, but the sampled source does not show their request or message wiring, so those links are omitted. Monitoring, dashboards, logging and tracing are also represented as documented deployment capabilities; observability connections are limited to evidence in the sampled dashboard source.

Main entry points: [`healthcheck/healthcheck.rb`](https://github.com/samyam-pradhan/microservices-demo/blob/master/healthcheck/healthcheck.rb) (Health checker), [`deploy/kubernetes/manifests-monitoring/21-grafana-dep.yaml`](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests-monitoring/21-grafana-dep.yaml) (Grafana), [`deploy/kubernetes/manifests/09-front-end-dep.yaml`](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/09-front-end-dep.yaml) (Front end), [`deploy/kubernetes/manifests-monitoring/06-prometheus-dep.yaml`](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests-monitoring/06-prometheus-dep.yaml) (Prometheus)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commerce["Shop services"]
  node_frontend["Front end"]
  node_catalogue["Catalogue"]
  node_carts["Carts<br/>[01-carts-dep.yaml]"]
  node_user["User<br/>[25-user-dep.yaml]"]
  node_orders["Orders<br/>[11-orders-dep.yaml]"]
  node_payment["Payment"]
  node_shipping["Shipping"]
end

subgraph group_platform["Messaging and state"]
  node_catalogue_db[("Catalogue DB")]
  node_cart_db[("Cart DB")]
  node_orders_db[("Orders DB")]
  node_user_db[("User DB")]
  node_session_db[("Session DB")]
  node_rabbitmq["RabbitMQ"]
  node_queue_master["Queue master"]
end

subgraph group_observability["Observability"]
  node_prometheus["Prometheus"]
  node_grafana["Grafana"]
  node_dashboards["Shop dashboards"]
  node_logging["Logging stack"]
  node_tracing["Tracing<br/>[jaeger.yaml]"]
end

node_customer(("Shopper"))
node_healthcheck["Health checker<br/>[healthcheck.rb]"]

node_customer -->|"uses"| node_frontend
node_prometheus -->|"dashboard datasource"| node_grafana
node_grafana -->|"renders"| node_dashboards
node_healthcheck -.->|"checks health"| node_frontend
node_healthcheck -.->|"checks health"| node_catalogue
node_healthcheck -.->|"checks health"| node_carts
node_healthcheck -.->|"checks health"| node_user
node_healthcheck -.->|"checks health"| node_orders
node_healthcheck -.->|"checks health"| node_payment
node_healthcheck -.->|"checks health"| node_shipping

click node_frontend "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/09-front-end-dep.yaml"
click node_catalogue "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/05-catalogue-dep.yaml"
click node_carts "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/01-carts-dep.yaml"
click node_user "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/25-user-dep.yaml"
click node_orders "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/11-orders-dep.yaml"
click node_payment "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/15-payment-dep.yaml"
click node_shipping "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/23-shipping-dep.yaml"
click node_catalogue_db "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/07-catalogue-db-dep.yaml"
click node_cart_db "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/03-carts-db-dep.yaml"
click node_orders_db "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/13-orders-db-dep.yaml"
click node_user_db "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/27-user-db-dep.yaml"
click node_session_db "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/21-session-db-dep.yaml"
click node_rabbitmq "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/19-rabbitmq-dep.yaml"
click node_queue_master "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/17-queue-master-dep.yaml"
click node_prometheus "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests-monitoring/06-prometheus-dep.yaml"
click node_grafana "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests-monitoring/21-grafana-dep.yaml"
click node_dashboards "https://github.com/samyam-pradhan/microservices-demo/blob/master/graphs/sock-shop-performance.dashboard.py"
click node_logging "https://github.com/samyam-pradhan/microservices-demo/tree/master/deploy/kubernetes/manifests-logging"
click node_tracing "https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests-jaeger/jaeger.yaml"
click node_healthcheck "https://github.com/samyam-pradhan/microservices-demo/blob/master/healthcheck/healthcheck.rb"

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_frontend,node_catalogue,node_carts,node_user,node_orders,node_payment,node_shipping toneBlue
class node_catalogue_db,node_cart_db,node_orders_db,node_user_db,node_session_db,node_rabbitmq,node_queue_master toneAmber
class node_prometheus,node_grafana,node_dashboards,node_logging,node_tracing toneMint
class node_customer toneIndigo
class node_healthcheck toneTeal
```

## Components

### Shop services

- [Front end](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/09-front-end-dep.yaml): `deploy/kubernetes/manifests/09-front-end-dep.yaml`
- [Catalogue](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/05-catalogue-dep.yaml): `deploy/kubernetes/manifests/05-catalogue-dep.yaml`
- [Carts](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/01-carts-dep.yaml): `deploy/kubernetes/manifests/01-carts-dep.yaml`
- [User](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/25-user-dep.yaml): `deploy/kubernetes/manifests/25-user-dep.yaml`
- [Orders](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/11-orders-dep.yaml): `deploy/kubernetes/manifests/11-orders-dep.yaml`
- [Payment](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/15-payment-dep.yaml): `deploy/kubernetes/manifests/15-payment-dep.yaml`
- [Shipping](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/23-shipping-dep.yaml): `deploy/kubernetes/manifests/23-shipping-dep.yaml`

### Messaging and state

- [Catalogue DB](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/07-catalogue-db-dep.yaml): `deploy/kubernetes/manifests/07-catalogue-db-dep.yaml`
- [Cart DB](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/03-carts-db-dep.yaml): `deploy/kubernetes/manifests/03-carts-db-dep.yaml`
- [Orders DB](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/13-orders-db-dep.yaml): `deploy/kubernetes/manifests/13-orders-db-dep.yaml`
- [User DB](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/27-user-db-dep.yaml): `deploy/kubernetes/manifests/27-user-db-dep.yaml`
- [Session DB](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/21-session-db-dep.yaml): `deploy/kubernetes/manifests/21-session-db-dep.yaml`
- [RabbitMQ](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/19-rabbitmq-dep.yaml): `deploy/kubernetes/manifests/19-rabbitmq-dep.yaml`
- [Queue master](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests/17-queue-master-dep.yaml): `deploy/kubernetes/manifests/17-queue-master-dep.yaml`

### Observability

- [Prometheus](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests-monitoring/06-prometheus-dep.yaml): `deploy/kubernetes/manifests-monitoring/06-prometheus-dep.yaml`
- [Grafana](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests-monitoring/21-grafana-dep.yaml): `deploy/kubernetes/manifests-monitoring/21-grafana-dep.yaml`
- [Shop dashboards](https://github.com/samyam-pradhan/microservices-demo/blob/master/graphs/sock-shop-performance.dashboard.py): `graphs/sock-shop-performance.dashboard.py`
- [Logging stack](https://github.com/samyam-pradhan/microservices-demo/tree/master/deploy/kubernetes/manifests-logging): `deploy/kubernetes/manifests-logging`
- [Tracing](https://github.com/samyam-pradhan/microservices-demo/blob/master/deploy/kubernetes/manifests-jaeger/jaeger.yaml): `deploy/kubernetes/manifests-jaeger/jaeger.yaml`

### Other components

- **Shopper**
- [Health checker](https://github.com/samyam-pradhan/microservices-demo/blob/master/healthcheck/healthcheck.rb): `healthcheck/healthcheck.rb`

## Connections

- Shopper → Front end: uses
- Prometheus → Grafana: dashboard datasource
- Grafana → Shop dashboards: renders
- Health checker → Front end: checks health
- Health checker → Catalogue: checks health
- Health checker → Carts: checks health
- Health checker → User: checks health
- Health checker → Orders: checks health
- Health checker → Payment: checks health
- Health checker → Shipping: checks health
