# gtsedillo/coen424-project architecture

> Architecture diagram of the GitHub repository gtsedillo/coen424-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gtsedillo/coen424-project
- Repository: https://github.com/gtsedillo/coen424-project

## Overview

Online Boutique is a multilingual, gRPC-based e-commerce demo. The main user journey runs from browsing the web storefront through cart operations and checkout orchestration to payment, shipping, and an order-confirmation email. Product catalog, currency conversion, recommendations, and ads are supporting capabilities. Checkout’s sampled code exposes its service calls; README statements support the broader product map. Some frontend and optional capability links are therefore shown as unverified rather than asserted as source-confirmed calls.

Main entry points: [`src/checkoutservice/main.go`](https://github.com/gtsedillo/coen424-project/blob/main/src/checkoutservice/main.go) (Checkout orchestration), [`src/frontend/handlers.go`](https://github.com/gtsedillo/coen424-project/blob/main/src/frontend/handlers.go) (Web frontend), [`src/cartservice/src/cartstore/ICartStore.cs`](https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/cartstore/ICartStore.cs) (Cart store interface), [`src/cartservice/src/services/CartService.cs`](https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/services/CartService.cs) (Cart service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_frontend["Web frontend<br/>[handlers.go]"]
end

subgraph group_commerce["Commerce workflow"]
  node_checkout["Checkout orchestration<br/>[main.go]"]
  node_currency["Currency conversion<br/>[server.js]"]
  node_cartapi["Cart service<br/>[CartService.cs]"]
  node_payment["Mock payment<br/>[charge.js]"]
  node_shipping["Shipping quotes and tracking<br/>[main.go]"]
  node_email["Order email<br/>[email_server.py]"]
end

subgraph group_support["Shopping capabilities"]
  node_catalog["Product catalog<br/>[product_catalog.go]"]
  node_recommendations["Recommendations"]
  node_ads["Contextual ads<br/>[AdService.java]"]
end

subgraph group_cartstate["Cart storage"]
  node_cartstore["Cart store interface<br/>[ICartStore.cs]"]
  node_redis[("Redis cart store<br/>[RedisCartStore.cs]")]
  node_spanner[("Spanner cart store")]
  node_alloydb[("AlloyDB cart store")]
end

node_shopper(("Shopper"))
node_loadgen(("Load generator<br/>[locustfile.py]"))

node_shopper -->|"browses and buys"| node_frontend
node_loadgen -->|"sends shopping flows"| node_frontend
node_frontend -.->|"requests catalog"| node_catalog
node_frontend -.->|"updates cart"| node_cartapi
node_frontend -.->|"places order"| node_checkout
node_frontend -.->|"requests recommendations"| node_recommendations
node_frontend -.->|"requests ads"| node_ads
node_checkout -->|"reads and empties cart"| node_cartapi
node_checkout -->|"gets products"| node_catalog
node_checkout -->|"quotes and ships"| node_shipping
node_checkout -->|"converts amounts"| node_currency
node_checkout -->|"charges card"| node_payment
node_checkout -->|"sends confirmation"| node_email
node_cartapi -->|"delegates cart operations"| node_cartstore
node_cartstore -.->|"implemented by"| node_redis
node_cartstore -.->|"implemented by"| node_spanner
node_cartstore -.->|"implemented by"| node_alloydb

click node_loadgen "https://github.com/gtsedillo/coen424-project/blob/main/src/loadgenerator/locustfile.py"
click node_frontend "https://github.com/gtsedillo/coen424-project/blob/main/src/frontend/handlers.go"
click node_checkout "https://github.com/gtsedillo/coen424-project/blob/main/src/checkoutservice/main.go"
click node_catalog "https://github.com/gtsedillo/coen424-project/blob/main/src/productcatalogservice/product_catalog.go"
click node_recommendations "https://github.com/gtsedillo/coen424-project/blob/main/src/recommendationservice/recommendation_server.py"
click node_ads "https://github.com/gtsedillo/coen424-project/blob/main/src/adservice/src/main/java/hipstershop/AdService.java"
click node_currency "https://github.com/gtsedillo/coen424-project/blob/main/src/currencyservice/server.js"
click node_cartapi "https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/services/CartService.cs"
click node_cartstore "https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/cartstore/ICartStore.cs"
click node_redis "https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/cartstore/RedisCartStore.cs"
click node_spanner "https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/cartstore/SpannerCartStore.cs"
click node_alloydb "https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/cartstore/AlloyDBCartStore.cs"
click node_payment "https://github.com/gtsedillo/coen424-project/blob/main/src/paymentservice/charge.js"
click node_shipping "https://github.com/gtsedillo/coen424-project/blob/main/src/shippingservice/main.go"
click node_email "https://github.com/gtsedillo/coen424-project/blob/main/src/emailservice/email_server.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_frontend toneBlue
class node_checkout,node_currency,node_cartapi,node_payment,node_shipping,node_email toneAmber
class node_catalog,node_recommendations,node_ads toneMint
class node_cartstore,node_redis,node_spanner,node_alloydb toneRose
class node_shopper toneIndigo
class node_loadgen toneTeal
```

## Components

### Storefront

- [Web frontend](https://github.com/gtsedillo/coen424-project/blob/main/src/frontend/handlers.go): `src/frontend/handlers.go`

### Commerce workflow

- [Checkout orchestration](https://github.com/gtsedillo/coen424-project/blob/main/src/checkoutservice/main.go): `src/checkoutservice/main.go`
- [Currency conversion](https://github.com/gtsedillo/coen424-project/blob/main/src/currencyservice/server.js): `src/currencyservice/server.js`
- [Cart service](https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/services/CartService.cs): `src/cartservice/src/services/CartService.cs`
- [Mock payment](https://github.com/gtsedillo/coen424-project/blob/main/src/paymentservice/charge.js): `src/paymentservice/charge.js`
- [Shipping quotes and tracking](https://github.com/gtsedillo/coen424-project/blob/main/src/shippingservice/main.go): `src/shippingservice/main.go`
- [Order email](https://github.com/gtsedillo/coen424-project/blob/main/src/emailservice/email_server.py): `src/emailservice/email_server.py`

### Shopping capabilities

- [Product catalog](https://github.com/gtsedillo/coen424-project/blob/main/src/productcatalogservice/product_catalog.go): `src/productcatalogservice/product_catalog.go`
- [Recommendations](https://github.com/gtsedillo/coen424-project/blob/main/src/recommendationservice/recommendation_server.py): `src/recommendationservice/recommendation_server.py`
- [Contextual ads](https://github.com/gtsedillo/coen424-project/blob/main/src/adservice/src/main/java/hipstershop/AdService.java): `src/adservice/src/main/java/hipstershop/AdService.java`

### Cart storage

- [Cart store interface](https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/cartstore/ICartStore.cs): `src/cartservice/src/cartstore/ICartStore.cs`
- [Redis cart store](https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/cartstore/RedisCartStore.cs): `src/cartservice/src/cartstore/RedisCartStore.cs`
- [Spanner cart store](https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/cartstore/SpannerCartStore.cs): `src/cartservice/src/cartstore/SpannerCartStore.cs`
- [AlloyDB cart store](https://github.com/gtsedillo/coen424-project/blob/main/src/cartservice/src/cartstore/AlloyDBCartStore.cs): `src/cartservice/src/cartstore/AlloyDBCartStore.cs`

### Other components

- **Shopper**
- [Load generator](https://github.com/gtsedillo/coen424-project/blob/main/src/loadgenerator/locustfile.py): `src/loadgenerator/locustfile.py`

## Connections

- Shopper → Web frontend: browses and buys (evidence: `README.md`)
- Load generator → Web frontend: sends shopping flows (evidence: `README.md`)
- Web frontend → Product catalog: requests catalog
- Web frontend → Cart service: updates cart
- Web frontend → Checkout orchestration: places order
- Web frontend → Recommendations: requests recommendations
- Web frontend → Contextual ads: requests ads
- Checkout orchestration → Cart service: reads and empties cart (evidence: `src/checkoutservice/main.go`)
- Checkout orchestration → Product catalog: gets products (evidence: `src/checkoutservice/main.go`)
- Checkout orchestration → Shipping quotes and tracking: quotes and ships (evidence: `src/checkoutservice/main.go`)
- Checkout orchestration → Currency conversion: converts amounts (evidence: `src/checkoutservice/main.go`)
- Checkout orchestration → Mock payment: charges card (evidence: `src/checkoutservice/main.go`)
- Checkout orchestration → Order email: sends confirmation (evidence: `src/checkoutservice/main.go`)
- Cart service → Cart store interface: delegates cart operations (evidence: `src/cartservice/src/services/CartService.cs`)
- Cart store interface → Redis cart store: implemented by (evidence: `src/cartservice/src/Startup.cs`)
- Cart store interface → Spanner cart store: implemented by (evidence: `src/cartservice/src/Startup.cs`)
- Cart store interface → AlloyDB cart store: implemented by (evidence: `src/cartservice/src/Startup.cs`)
