# evilazaro/eshop architecture

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

- Interactive diagram: https://gitdiagram.com/evilazaro/eshop
- Repository: https://github.com/evilazaro/eshop

## Overview

eShop is a services-based commerce application. The main shopper journey runs through the storefront: browse the catalog, use a shared basket, check out into an order, and follow asynchronous fulfilment and status updates. The graph also preserves documented identity, webhook, AI, and mobile capabilities. Several service internals were not sampled, so links for those capabilities rely on README statements; unsupported implementation-level relationships are omitted.

Main entry points: [`src/WebApp/Program.cs`](https://github.com/evilazaro/eshop/blob/main/src/WebApp/Program.cs) (Web storefront), [`src/Catalog.API/Apis/CatalogApi.cs`](https://github.com/evilazaro/eshop/blob/main/src/Catalog.API/Apis/CatalogApi.cs) (Catalog API), [`src/EventBus/Abstractions/IEventBus.cs`](https://github.com/evilazaro/eshop/blob/main/src/EventBus/Abstractions/IEventBus.cs) (Integration event bus), [`src/Ordering.API/Apis/OrdersApi.cs`](https://github.com/evilazaro/eshop/blob/main/src/Ordering.API/Apis/OrdersApi.cs) (Ordering API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Shopping experience"]
  node_webapp["Web storefront<br/>[Program.cs]"]
  node_chat["Shopping chatbot<br/>[ChatState.cs]"]
end

subgraph group_commerce["Commerce services"]
  node_catalog["Catalog API<br/>[CatalogApi.cs]"]
  node_catalogai["Semantic search<br/>[CatalogAI.cs]"]
  node_basketapi["Basket gRPC API<br/>[BasketService.cs]"]
  node_basketstore[("Basket Redis store")]
  node_ordering["Ordering API<br/>[OrdersApi.cs]"]
  node_orderdomain["Order domain<br/>[Order.cs]"]
  node_requestmanager[("Checkout idempotency<br/>[RequestManager.cs]")]
end

subgraph group_fulfilment["Order fulfilment"]
  node_orderprocessor["Grace-period worker"]
  node_payment["Payment worker"]
end

subgraph group_platform["Identity and integration"]
  node_eventbus["Integration event bus<br/>[IEventBus.cs]"]
  node_identity["Identity service"]
  node_webhooks["Webhook subscriptions"]
  node_webhookclient["Webhook client"]
end

subgraph group_clients["Additional clients"]
  node_maui["Native MAUI app<br/>[App.xaml.cs]"]
  node_hybrid["Blazor Hybrid app<br/>[App.xaml.cs]"]
  node_components["Shared catalog UI<br/>[CatalogService.cs]"]
end

node_shopper(("Shopper"))
node_external(("External systems"))

node_shopper -->|"shops through"| node_webapp
node_webapp -->|"browses products"| node_catalog
node_webapp -->|"manages basket"| node_basketapi
node_webapp -->|"checks out"| node_ordering
node_basketapi -->|"reads and writes"| node_basketstore
node_ordering -->|"deduplicates checkout"| node_requestmanager
node_ordering -.->|"handles orders"| node_orderdomain
node_webapp -->|"offers assistance"| node_chat
node_chat -->|"searches catalog"| node_catalog
node_chat -->|"updates basket"| node_basketapi
node_catalog -->|"ranks search"| node_catalogai
node_orderprocessor -->|"publishes grace event"| node_eventbus
node_orderprocessor -->|"reads submitted orders"| node_ordering
node_eventbus -->|"dispatches stock events"| node_payment
node_eventbus -->|"dispatches order events"| node_catalog
node_eventbus -->|"notifies status changes"| node_webapp
node_identity -->|"issues sign-in tokens"| node_webapp
node_identity -->|"issues sign-in tokens"| node_maui
node_identity -->|"issues sign-in tokens"| node_webhookclient
node_webhooks -->|"delivers event callbacks"| node_external
node_external -->|"registers callbacks"| node_webhooks
node_webhookclient -->|"receives callbacks"| node_webhooks
node_maui -->|"uses shared backend"| node_catalog
node_maui -->|"uses shared basket"| node_basketapi
node_hybrid -->|"hosts catalog UI"| node_components
node_components -->|"loads catalog"| node_catalog

click node_webapp "https://github.com/evilazaro/eshop/blob/main/src/WebApp/Program.cs"
click node_chat "https://github.com/evilazaro/eshop/blob/main/src/WebApp/Components/Chatbot/ChatState.cs"
click node_catalog "https://github.com/evilazaro/eshop/blob/main/src/Catalog.API/Apis/CatalogApi.cs"
click node_catalogai "https://github.com/evilazaro/eshop/blob/main/src/Catalog.API/Services/CatalogAI.cs"
click node_basketapi "https://github.com/evilazaro/eshop/blob/main/src/Basket.API/Grpc/BasketService.cs"
click node_basketstore "https://github.com/evilazaro/eshop/blob/main/src/Basket.API/Repositories/RedisBasketRepository.cs"
click node_ordering "https://github.com/evilazaro/eshop/blob/main/src/Ordering.API/Apis/OrdersApi.cs"
click node_orderdomain "https://github.com/evilazaro/eshop/blob/main/src/Ordering.Domain/AggregatesModel/OrderAggregate/Order.cs"
click node_requestmanager "https://github.com/evilazaro/eshop/blob/main/src/Ordering.Infrastructure/Idempotency/RequestManager.cs"
click node_eventbus "https://github.com/evilazaro/eshop/blob/main/src/EventBus/Abstractions/IEventBus.cs"
click node_orderprocessor "https://github.com/evilazaro/eshop/blob/main/src/OrderProcessor/Services/GracePeriodManagerService.cs"
click node_payment "https://github.com/evilazaro/eshop/blob/main/src/PaymentProcessor/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs"
click node_identity "https://github.com/evilazaro/eshop/blob/main/src/Identity.API/Quickstart/Account/AccountController.cs"
click node_webhooks "https://github.com/evilazaro/eshop/blob/main/src/Webhooks.API/Services/WebhooksRetriever.cs"
click node_webhookclient "https://github.com/evilazaro/eshop/blob/main/src/WebhookClient/Endpoints/WebhookEndpoints.cs"
click node_maui "https://github.com/evilazaro/eshop/blob/main/src/ClientApp/App.xaml.cs"
click node_hybrid "https://github.com/evilazaro/eshop/blob/main/src/HybridApp/App.xaml.cs"
click node_components "https://github.com/evilazaro/eshop/blob/main/src/WebAppComponents/Services/CatalogService.cs"

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_webapp,node_chat toneBlue
class node_catalog,node_catalogai,node_basketapi,node_basketstore,node_ordering,node_orderdomain,node_requestmanager toneAmber
class node_orderprocessor,node_payment toneMint
class node_eventbus,node_identity,node_webhooks,node_webhookclient toneRose
class node_maui,node_hybrid,node_components,node_shopper,node_external toneIndigo
```

## Components

### Shopping experience

- [Web storefront](https://github.com/evilazaro/eshop/blob/main/src/WebApp/Program.cs): `src/WebApp/Program.cs`
- [Shopping chatbot](https://github.com/evilazaro/eshop/blob/main/src/WebApp/Components/Chatbot/ChatState.cs): `src/WebApp/Components/Chatbot/ChatState.cs`

### Commerce services

- [Catalog API](https://github.com/evilazaro/eshop/blob/main/src/Catalog.API/Apis/CatalogApi.cs): `src/Catalog.API/Apis/CatalogApi.cs`
- [Semantic search](https://github.com/evilazaro/eshop/blob/main/src/Catalog.API/Services/CatalogAI.cs): `src/Catalog.API/Services/CatalogAI.cs`
- [Basket gRPC API](https://github.com/evilazaro/eshop/blob/main/src/Basket.API/Grpc/BasketService.cs): `src/Basket.API/Grpc/BasketService.cs`
- [Basket Redis store](https://github.com/evilazaro/eshop/blob/main/src/Basket.API/Repositories/RedisBasketRepository.cs): `src/Basket.API/Repositories/RedisBasketRepository.cs`
- [Ordering API](https://github.com/evilazaro/eshop/blob/main/src/Ordering.API/Apis/OrdersApi.cs): `src/Ordering.API/Apis/OrdersApi.cs`
- [Order domain](https://github.com/evilazaro/eshop/blob/main/src/Ordering.Domain/AggregatesModel/OrderAggregate/Order.cs): `src/Ordering.Domain/AggregatesModel/OrderAggregate/Order.cs`
- [Checkout idempotency](https://github.com/evilazaro/eshop/blob/main/src/Ordering.Infrastructure/Idempotency/RequestManager.cs): `src/Ordering.Infrastructure/Idempotency/RequestManager.cs`

### Order fulfilment

- [Grace-period worker](https://github.com/evilazaro/eshop/blob/main/src/OrderProcessor/Services/GracePeriodManagerService.cs): `src/OrderProcessor/Services/GracePeriodManagerService.cs`
- [Payment worker](https://github.com/evilazaro/eshop/blob/main/src/PaymentProcessor/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs): `src/PaymentProcessor/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs`

### Identity and integration

- [Integration event bus](https://github.com/evilazaro/eshop/blob/main/src/EventBus/Abstractions/IEventBus.cs): `src/EventBus/Abstractions/IEventBus.cs`
- [Identity service](https://github.com/evilazaro/eshop/blob/main/src/Identity.API/Quickstart/Account/AccountController.cs): `src/Identity.API/Quickstart/Account/AccountController.cs`
- [Webhook subscriptions](https://github.com/evilazaro/eshop/blob/main/src/Webhooks.API/Services/WebhooksRetriever.cs): `src/Webhooks.API/Services/WebhooksRetriever.cs`
- [Webhook client](https://github.com/evilazaro/eshop/blob/main/src/WebhookClient/Endpoints/WebhookEndpoints.cs): `src/WebhookClient/Endpoints/WebhookEndpoints.cs`

### Additional clients

- [Native MAUI app](https://github.com/evilazaro/eshop/blob/main/src/ClientApp/App.xaml.cs): `src/ClientApp/App.xaml.cs`
- [Blazor Hybrid app](https://github.com/evilazaro/eshop/blob/main/src/HybridApp/App.xaml.cs): `src/HybridApp/App.xaml.cs`
- [Shared catalog UI](https://github.com/evilazaro/eshop/blob/main/src/WebAppComponents/Services/CatalogService.cs): `src/WebAppComponents/Services/CatalogService.cs`

### Other components

- **Shopper**
- **External systems**

## Connections

- Shopper → Web storefront: shops through (evidence: `README.md`)
- Web storefront → Catalog API: browses products (evidence: `README.md`)
- Web storefront → Basket gRPC API: manages basket (evidence: `README.md`)
- Web storefront → Ordering API: checks out (evidence: `README.md`)
- Basket gRPC API → Basket Redis store: reads and writes (evidence: `README.md`)
- Ordering API → Checkout idempotency: deduplicates checkout (evidence: `README.md`)
- Ordering API → Order domain: handles orders
- Web storefront → Shopping chatbot: offers assistance (evidence: `README.md`)
- Shopping chatbot → Catalog API: searches catalog (evidence: `README.md`)
- Shopping chatbot → Basket gRPC API: updates basket (evidence: `README.md`)
- Catalog API → Semantic search: ranks search (evidence: `README.md`)
- Grace-period worker → Integration event bus: publishes grace event (evidence: `src/OrderProcessor/Services/GracePeriodManagerService.cs`)
- Grace-period worker → Ordering API: reads submitted orders (evidence: `src/OrderProcessor/Services/GracePeriodManagerService.cs`)
- Integration event bus → Payment worker: dispatches stock events (evidence: `README.md`)
- Integration event bus → Catalog API: dispatches order events (evidence: `README.md`)
- Integration event bus → Web storefront: notifies status changes (evidence: `README.md`)
- Identity service → Web storefront: issues sign-in tokens (evidence: `README.md`)
- Identity service → Native MAUI app: issues sign-in tokens (evidence: `README.md`)
- Identity service → Webhook client: issues sign-in tokens (evidence: `README.md`)
- Webhook subscriptions → External systems: delivers event callbacks (evidence: `README.md`)
- External systems → Webhook subscriptions: registers callbacks (evidence: `README.md`)
- Webhook client → Webhook subscriptions: receives callbacks (evidence: `README.md`)
- Native MAUI app → Catalog API: uses shared backend (evidence: `README.md`)
- Native MAUI app → Basket gRPC API: uses shared basket (evidence: `README.md`)
- Blazor Hybrid app → Shared catalog UI: hosts catalog UI (evidence: `README.md`)
- Shared catalog UI → Catalog API: loads catalog (evidence: `README.md`)
