# pod5-devops-team-dgwit/ecommerce-project-application-dgwi architecture

> Architecture diagram of the GitHub repository pod5-devops-team-dgwit/ecommerce-project-application-dgwi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi
- Repository: https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi

## Overview

Astronomy Shop is a distributed telescope e-commerce application, with web and mobile storefronts backed by independently implemented services. The main user journey is browsing products and recommendations, managing a cart, then placing an order through checkout, which obtains shipping costs, charges payment, sends confirmation, and can publish order events for downstream processing. The README also identifies advertising, AI-assistant, feature-flag, and platform capabilities. Some service-to-service topology is not shown in the excerpts, so uncertain links are omitted or marked dashed; this map covers application runtime, not deployment automation.

Main entry points: [`src/checkout/main.go`](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/checkout/main.go) (Checkout), [`src/frontend/pages`](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/tree/main/src/frontend/pages) (Web storefront), [`src/react-native-app/app`](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/tree/main/src/react-native-app/app) (Mobile storefront), [`src/cart/src/services/CartService.cs`](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/cart/src/services/CartService.cs) (Cart service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefronts"]
  node_web["Web storefront"]
  node_mobile["Mobile storefront"]
end

subgraph group_commerce["Commerce services"]
  node_catalog["Product catalog<br/>[main.go]"]
  node_recommendation["Recommendations"]
  node_advertising["Advertising<br/>[AdService.java]"]
  node_cart["Cart service<br/>[CartService.cs]"]
  node_cartstore[("Valkey cart store<br/>[ValkeyCartStore.cs]")]
  node_checkout["Checkout<br/>[main.go]"]
  node_shipping["Shipping and quotes"]
  node_currency["Currency conversion<br/>[server.cpp]"]
  node_payment["Payment<br/>[charge.js]"]
  node_email["Order email<br/>[email_server.rb]"]
end

subgraph group_orders["Order processing"]
  node_accounting["Accounting consumer<br/>[Consumer.cs]"]
  node_fraud["Fraud detection<br/>[main.kt]"]
end

subgraph group_assistant["AI assistant"]
  node_chatbot["Chat interface<br/>[chat_interface.py]"]
  node_agent["AI agent<br/>[agents.py]"]
  node_mcp["Shop MCP server"]
end

subgraph group_platform["Platform services"]
  node_flagui["Feature-flag UI<br/>[router.ex]"]
  node_loadgen["Load generator<br/>[locustfile.py]"]
end

node_shopper(("Shopper"))
node_postgres[("PostgreSQL catalog")]
node_kafka["Kafka broker"]

node_shopper -.->|"browses and orders"| node_web
node_shopper -.->|"shops"| node_mobile
node_web -.->|"requests products"| node_catalog
node_web -.->|"requests suggestions"| node_recommendation
node_web -.->|"requests ads"| node_advertising
node_web -.->|"manages cart"| node_cart
node_web -.->|"places order"| node_checkout
node_mobile -.->|"manages cart"| node_cart
node_mobile -.->|"places order"| node_checkout
node_catalog -->|"queries catalog"| node_postgres
node_cart -->|"reads and writes"| node_cartstore
node_checkout -->|"requests quote"| node_shipping
node_checkout -->|"charges payment"| node_payment
node_checkout -->|"sends confirmation"| node_email
node_checkout -->|"publishes order"| node_kafka
node_checkout -.->|"order events"| node_accounting
node_checkout -.->|"order processing"| node_fraud
node_web -->|"converts prices"| node_currency
node_chatbot -.->|"assistant requests"| node_agent
node_agent -.->|"uses tools"| node_mcp

click node_web "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/tree/main/src/frontend/pages"
click node_mobile "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/tree/main/src/react-native-app/app"
click node_catalog "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/product-catalog/main.go"
click node_recommendation "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/recommendation/recommendation_server.py"
click node_advertising "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/ad/src/main/java/oteldemo/AdService.java"
click node_cart "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/cart/src/services/CartService.cs"
click node_cartstore "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/cart/src/cartstore/ValkeyCartStore.cs"
click node_checkout "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/checkout/main.go"
click node_shipping "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/shipping/src/shipping_service.rs"
click node_currency "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/currency/src/server.cpp"
click node_payment "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/payment/charge.js"
click node_email "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/email/email_server.rb"
click node_accounting "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/accounting/Consumer.cs"
click node_fraud "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/fraud-detection/src/main/kotlin/frauddetection/main.kt"
click node_chatbot "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/chatbot/src/chat_interface/chat_interface.py"
click node_agent "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/agent/src/agents/agents.py"
click node_mcp "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/mcp/src/mcp_server/astronomy_shop_mcp_server.py"
click node_flagui "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/flagd-ui/lib/flagd_ui_web/router.ex"
click node_loadgen "https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/load-generator/locustfile.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,node_mobile toneBlue
class node_catalog,node_recommendation,node_advertising,node_cart,node_cartstore,node_checkout,node_shipping,node_currency,node_payment,node_email,node_postgres toneAmber
class node_accounting,node_fraud toneMint
class node_chatbot,node_agent,node_mcp toneRose
class node_flagui,node_loadgen,node_shopper,node_kafka toneIndigo
```

## Components

### Storefronts

- [Web storefront](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/tree/main/src/frontend/pages): `src/frontend/pages`
- [Mobile storefront](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/tree/main/src/react-native-app/app): `src/react-native-app/app`

### Commerce services

- [Product catalog](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/product-catalog/main.go): `src/product-catalog/main.go`
- [Recommendations](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/recommendation/recommendation_server.py): `src/recommendation/recommendation_server.py`
- [Advertising](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/ad/src/main/java/oteldemo/AdService.java): `src/ad/src/main/java/oteldemo/AdService.java`
- [Cart service](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/cart/src/services/CartService.cs): `src/cart/src/services/CartService.cs`
- [Valkey cart store](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/cart/src/cartstore/ValkeyCartStore.cs): `src/cart/src/cartstore/ValkeyCartStore.cs`
- [Checkout](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/checkout/main.go): `src/checkout/main.go`
- [Shipping and quotes](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/shipping/src/shipping_service.rs): `src/shipping/src/shipping_service.rs`
- [Currency conversion](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/currency/src/server.cpp): `src/currency/src/server.cpp`
- [Payment](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/payment/charge.js): `src/payment/charge.js`
- [Order email](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/email/email_server.rb): `src/email/email_server.rb`

### Order processing

- [Accounting consumer](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/accounting/Consumer.cs): `src/accounting/Consumer.cs`
- [Fraud detection](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/fraud-detection/src/main/kotlin/frauddetection/main.kt): `src/fraud-detection/src/main/kotlin/frauddetection/main.kt`

### AI assistant

- [Chat interface](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/chatbot/src/chat_interface/chat_interface.py): `src/chatbot/src/chat_interface/chat_interface.py`
- [AI agent](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/agent/src/agents/agents.py): `src/agent/src/agents/agents.py`
- [Shop MCP server](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/mcp/src/mcp_server/astronomy_shop_mcp_server.py): `src/mcp/src/mcp_server/astronomy_shop_mcp_server.py`

### Platform services

- [Feature-flag UI](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/flagd-ui/lib/flagd_ui_web/router.ex): `src/flagd-ui/lib/flagd_ui_web/router.ex`
- [Load generator](https://github.com/pod5-devops-team-dgwit/ecommerce-project-application-dgwi/blob/main/src/load-generator/locustfile.py): `src/load-generator/locustfile.py`

### Other components

- **Shopper**
- **PostgreSQL catalog**
- **Kafka broker**

## Connections

- Shopper → Web storefront: browses and orders
- Shopper → Mobile storefront: shops
- Web storefront → Product catalog: requests products
- Web storefront → Recommendations: requests suggestions
- Web storefront → Advertising: requests ads
- Web storefront → Cart service: manages cart
- Web storefront → Checkout: places order
- Mobile storefront → Cart service: manages cart
- Mobile storefront → Checkout: places order
- Product catalog → PostgreSQL catalog: queries catalog (evidence: `src/product-catalog/main.go`)
- Cart service → Valkey cart store: reads and writes (evidence: `src/cart/src/services/CartService.cs`)
- Checkout → Shipping and quotes: requests quote (evidence: `src/checkout/main.go`)
- Checkout → Payment: charges payment (evidence: `src/checkout/main.go`)
- Checkout → Order email: sends confirmation (evidence: `src/checkout/main.go`)
- Checkout → Kafka broker: publishes order (evidence: `src/checkout/main.go`)
- Checkout → Accounting consumer: order events
- Checkout → Fraud detection: order processing
- Web storefront → Currency conversion: converts prices
- Chat interface → AI agent: assistant requests
- AI agent → Shop MCP server: uses tools
