# veeramaddula/opentelemetry-demo-main-gke architecture

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

- Interactive diagram: https://gitdiagram.com/veeramaddula/opentelemetry-demo-main-gke
- Repository: https://github.com/veeramaddula/opentelemetry-demo-main-gke

## Overview

OpenTelemetry Astronomy Shop is a microservice-based demo storefront for illustrating distributed-system observability. The principal user workflow is browsing the shop, managing a cart, and placing an order; checkout coordinates cart retrieval, shipping quotes, payment, cart clearing, confirmation email, and optional order-event publishing. The wider service map includes catalog, currency, ads, recommendations, shipping, and asynchronous order consumers, alongside feature-flag management and assistant integrations. Source excerpts are partial, so several service-to-service links and the internals of unsampled capabilities are intentionally omitted; the README describes the product’s observability purpose, not detailed runtime wiring.

Main entry points: [`src/checkout/main.go`](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/checkout/main.go) (Checkout Service), [`src/frontend/pages/api`](https://github.com/veeramaddula/opentelemetry-demo-main-gke/tree/master/src/frontend/pages/api) (Store API Routes), [`src/frontend/pages/index.tsx`](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/frontend/pages/index.tsx) (Web Storefront), [`src/checkout/kafka/producer.go`](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/checkout/kafka/producer.go) (Orders Topic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_web_store["Web Storefront<br/>[index.tsx]"]
  node_web_api["Store API Routes"]
  node_catalog_gateway["Catalog Gateway"]
  node_cart_gateway["Cart Gateway<br/>[Cart.gateway.ts]"]
  node_checkout_gateway["Checkout Gateway"]
end

subgraph group_commerce["Commerce Services"]
  node_catalog["Product Catalog<br/>[main.go]"]
  node_catalog_db[("Catalog Database")]
  node_cart["Cart Service<br/>[Program.cs]"]
  node_cart_store[("Cart Store<br/>[ValkeyCartStore.cs]")]
  node_checkout["Checkout Service<br/>[main.go]"]
  node_shipping["Shipping Service<br/>[main.rs]"]
  node_quote["Quote Endpoint<br/>[routes.php]"]
  node_currency["Currency Service<br/>[server.cpp]"]
  node_ads["Ad Service<br/>[AdService.java]"]
  node_recommendations["Recommendations"]
  node_payment["Payment Service<br/>[index.js]"]
  node_email["Email Service<br/>[email_server.rb]"]
end

subgraph group_order_ops["Order Processing"]
  node_kafka["Orders Topic<br/>[producer.go]"]
  node_accounting["Accounting Consumer<br/>[Consumer.cs]"]
  node_fraud["Fraud Detection<br/>[main.kt]"]
end

subgraph group_flags["Feature Flags"]
  node_flag_ui["Flag Management UI"]
  node_flag_storage[("Flag Configuration<br/>[storage.ex]")]
  node_flagd["Flag Provider"]
end

subgraph group_extensions["Extensions"]
  node_chatbot["Chat Interface<br/>[chat_interface.py]"]
  node_mcp["Astronomy Shop MCP"]
  node_agent["Agent Services<br/>[agents.py]"]
end

node_shopper(("Shopper"))
node_otel["OpenTelemetry Collector"]

node_shopper -->|"browses and orders"| node_web_store
node_web_store -->|"requests shop data"| node_web_api
node_web_api -->|"fetches products"| node_catalog_gateway
node_web_api -->|"manages cart"| node_cart_gateway
node_web_api -->|"submits order"| node_checkout_gateway
node_catalog -->|"queries products"| node_catalog_db
node_checkout -->|"gets and empties cart"| node_cart
node_checkout -->|"requests quote"| node_shipping
node_checkout -->|"charges card"| node_payment
node_checkout -->|"sends confirmation"| node_email
node_checkout -.->|"publishes order"| node_kafka
node_accounting -->|"consumes orders"| node_kafka
node_fraud -->|"consumes orders"| node_kafka
node_flag_ui -->|"reads and writes flags"| node_flag_storage
node_flag_storage -->|"persists flag config"| node_flagd
node_chatbot -.->|"uses agent capability"| node_agent
node_agent -.->|"uses MCP tools"| node_mcp
node_web_store -->|"exports telemetry"| node_otel
node_checkout -->|"exports telemetry"| node_otel
node_catalog -->|"exports telemetry"| node_otel

click node_web_store "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/frontend/pages/index.tsx"
click node_web_api "https://github.com/veeramaddula/opentelemetry-demo-main-gke/tree/master/src/frontend/pages/api"
click node_catalog_gateway "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/frontend/gateways/rpc/ProductCatalog.gateway.ts"
click node_cart_gateway "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/frontend/gateways/rpc/Cart.gateway.ts"
click node_checkout_gateway "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/frontend/gateways/rpc/Checkout.gateway.ts"
click node_catalog "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/product-catalog/main.go"
click node_cart "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/cart/src/Program.cs"
click node_cart_store "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/cart/src/cartstore/ValkeyCartStore.cs"
click node_checkout "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/checkout/main.go"
click node_shipping "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/shipping/src/main.rs"
click node_quote "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/quote/app/routes.php"
click node_currency "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/currency/src/server.cpp"
click node_ads "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/ad/src/main/java/oteldemo/AdService.java"
click node_recommendations "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/recommendation/recommendation_server.py"
click node_payment "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/payment/index.js"
click node_email "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/email/email_server.rb"
click node_kafka "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/checkout/kafka/producer.go"
click node_accounting "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/accounting/Consumer.cs"
click node_fraud "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/fraud-detection/src/main/kotlin/frauddetection/main.kt"
click node_flag_ui "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/flagd-ui/lib/flagd_ui_web/controllers/feature_controller.ex"
click node_flag_storage "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/flagd-ui/lib/flagd_ui/storage.ex"
click node_chatbot "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/chatbot/src/chat_interface/chat_interface.py"
click node_mcp "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/mcp/src/mcp_server/astronomy_shop_mcp_server.py"
click node_agent "https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/agent/src/agents/agents.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_web_store,node_web_api,node_catalog_gateway,node_cart_gateway,node_checkout_gateway toneBlue
class node_catalog,node_catalog_db,node_cart,node_cart_store,node_checkout,node_shipping,node_quote,node_currency,node_ads,node_recommendations,node_payment,node_email toneAmber
class node_kafka,node_accounting,node_fraud toneMint
class node_flag_ui,node_flag_storage,node_flagd toneRose
class node_chatbot,node_mcp,node_agent,node_shopper,node_otel toneIndigo
```

## Components

### Storefront

- [Web Storefront](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/frontend/pages/index.tsx): `src/frontend/pages/index.tsx`
- [Store API Routes](https://github.com/veeramaddula/opentelemetry-demo-main-gke/tree/master/src/frontend/pages/api): `src/frontend/pages/api`
- [Catalog Gateway](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/frontend/gateways/rpc/ProductCatalog.gateway.ts): `src/frontend/gateways/rpc/ProductCatalog.gateway.ts`
- [Cart Gateway](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/frontend/gateways/rpc/Cart.gateway.ts): `src/frontend/gateways/rpc/Cart.gateway.ts`
- [Checkout Gateway](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/frontend/gateways/rpc/Checkout.gateway.ts): `src/frontend/gateways/rpc/Checkout.gateway.ts`

### Commerce Services

- [Product Catalog](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/product-catalog/main.go): `src/product-catalog/main.go`
- **Catalog Database**
- [Cart Service](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/cart/src/Program.cs): `src/cart/src/Program.cs`
- [Cart Store](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/cart/src/cartstore/ValkeyCartStore.cs): `src/cart/src/cartstore/ValkeyCartStore.cs`
- [Checkout Service](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/checkout/main.go): `src/checkout/main.go`
- [Shipping Service](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/shipping/src/main.rs): `src/shipping/src/main.rs`
- [Quote Endpoint](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/quote/app/routes.php): `src/quote/app/routes.php`
- [Currency Service](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/currency/src/server.cpp): `src/currency/src/server.cpp`
- [Ad Service](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/ad/src/main/java/oteldemo/AdService.java): `src/ad/src/main/java/oteldemo/AdService.java`
- [Recommendations](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/recommendation/recommendation_server.py): `src/recommendation/recommendation_server.py`
- [Payment Service](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/payment/index.js): `src/payment/index.js`
- [Email Service](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/email/email_server.rb): `src/email/email_server.rb`

### Order Processing

- [Orders Topic](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/checkout/kafka/producer.go): `src/checkout/kafka/producer.go`
- [Accounting Consumer](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/accounting/Consumer.cs): `src/accounting/Consumer.cs`
- [Fraud Detection](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/fraud-detection/src/main/kotlin/frauddetection/main.kt): `src/fraud-detection/src/main/kotlin/frauddetection/main.kt`

### Feature Flags

- [Flag Management UI](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/flagd-ui/lib/flagd_ui_web/controllers/feature_controller.ex): `src/flagd-ui/lib/flagd_ui_web/controllers/feature_controller.ex`
- [Flag Configuration](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/flagd-ui/lib/flagd_ui/storage.ex): `src/flagd-ui/lib/flagd_ui/storage.ex`
- **Flag Provider**

### Extensions

- [Chat Interface](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/chatbot/src/chat_interface/chat_interface.py): `src/chatbot/src/chat_interface/chat_interface.py`
- [Astronomy Shop MCP](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/mcp/src/mcp_server/astronomy_shop_mcp_server.py): `src/mcp/src/mcp_server/astronomy_shop_mcp_server.py`
- [Agent Services](https://github.com/veeramaddula/opentelemetry-demo-main-gke/blob/master/src/agent/src/agents/agents.py): `src/agent/src/agents/agents.py`

### Other components

- **Shopper**
- **OpenTelemetry Collector**

## Connections

- Shopper → Web Storefront: browses and orders
- Web Storefront → Store API Routes: requests shop data
- Store API Routes → Catalog Gateway: fetches products
- Store API Routes → Cart Gateway: manages cart
- Store API Routes → Checkout Gateway: submits order
- Product Catalog → Catalog Database: queries products
- Checkout Service → Cart Service: gets and empties cart
- Checkout Service → Shipping Service: requests quote
- Checkout Service → Payment Service: charges card
- Checkout Service → Email Service: sends confirmation
- Checkout Service → Orders Topic: publishes order
- Accounting Consumer → Orders Topic: consumes orders
- Fraud Detection → Orders Topic: consumes orders
- Flag Management UI → Flag Configuration: reads and writes flags
- Flag Configuration → Flag Provider: persists flag config
- Chat Interface → Agent Services: uses agent capability
- Agent Services → Astronomy Shop MCP: uses MCP tools
- Web Storefront → OpenTelemetry Collector: exports telemetry
- Checkout Service → OpenTelemetry Collector: exports telemetry
- Product Catalog → OpenTelemetry Collector: exports telemetry
