# harsha-global/dot-net-microservices-with-azure-and-aks architecture

> Architecture diagram of the GitHub repository harsha-global/dot-net-microservices-with-azure-and-aks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harsha-global/dot-net-microservices-with-azure-and-aks
- Repository: https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks

## Overview

This repository is a tutorial series for building an ASP.NET Core e-commerce microservice system, rather than one consolidated deployable application. Its clearest user-facing flow spans account access, product browsing and administration, and—starting in the microservice-communication chapters—cart and order screens. The tree also documents separate learning branches for resilience, caching, gateways, messaging, and identity integrations. The excerpts show Angular route registrations, not backend request wiring; broader service interactions are therefore omitted or marked unverified.

Main entry points: [`02. Products Microservice`](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/02.%20Products%20Microservice) (Products Service), [`06. Microservice Communication`](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/06.%20Microservice%20Communication) (Orders Service), [`09. API Gateway using Ocelot`](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/09.%20API%20Gateway%20using%20Ocelot) (Ocelot Gateway), [`01. Users Microservice/19. Angular Client App/src/app`](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/01.%20Users%20Microservice/19.%20Angular%20Client%20App/src/app) (Users Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web Clients"]
  node_users_ui["Users Client<br/>[app]"]
  node_products_ui["Products Client<br/>[app]"]
  node_orders_ui["Orders Client<br/>[app]"]
end

subgraph group_commerce["Commerce Services"]
  node_users_api["Users API<br/>[Controllers]"]
  node_users_service["Users Service<br/>[UsersService.cs]"]
  node_users_data["Users Repository<br/>[UsersRepository.cs]"]
  node_products_service["Products Service"]
  node_orders_service["Orders Service"]
  node_orders_store[("Service Data Stores")]
  node_postgres[("PostgreSQL")]
end

subgraph group_platform["Platform Capabilities"]
  node_resilience["Fault Policies"]
  node_cache[("Redis Caching<br/>[08. Caching]")]
  node_gateway["Ocelot Gateway"]
  node_rabbit["RabbitMQ Messaging<br/>[10. RabbitMQ]"]
  node_servicebus["Azure Service Bus"]
  node_apim["Azure API Management"]
end

subgraph group_identity["Identity"]
  node_entra["Entra B2C"]
end

node_shopper(("Shopper"))

node_shopper -->|"uses"| node_users_ui
node_users_ui -.->|"auth requests"| node_users_api
node_users_api -.->|"delegates"| node_users_service
node_users_service -.->|"uses repository"| node_users_data
node_users_data -.->|"reads and writes"| node_postgres
node_shopper -->|"uses"| node_products_ui
node_products_ui -.->|"product requests"| node_products_service
node_shopper -->|"uses"| node_orders_ui
node_orders_ui -.->|"order requests"| node_orders_service
node_orders_service -.->|"persists orders"| node_orders_store
node_products_service -.->|"cache access"| node_cache
node_gateway -.->|"routes requests"| node_users_api
node_gateway -.->|"routes requests"| node_products_service
node_gateway -.->|"routes requests"| node_orders_service
node_products_service -.->|"publishes events"| node_rabbit
node_rabbit -.->|"delivers events"| node_orders_service
node_products_service -.->|"publishes updates"| node_servicebus
node_servicebus -.->|"delivers updates"| node_orders_service
node_apim -.->|"fronts APIs"| node_gateway
node_users_ui -.->|"B2C sign-in"| node_entra
node_products_service -.->|"uses policies"| node_resilience

click node_users_ui "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/01.%20Users%20Microservice/19.%20Angular%20Client%20App/src/app"
click node_products_ui "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/02.%20Products%20Microservice/16.%20Products%20Angular%20UI/src/app"
click node_orders_ui "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/06.%20Microservice%20Communication/12.%20Frontend%20with%20Orders/frontend/src/app"
click node_users_api "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/01.%20Users%20Microservice/15.%20FluentValidation/eCommerce.API/Controllers"
click node_users_service "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/blob/main/01.%20Users%20Microservice/15.%20FluentValidation/eCommerce.Core/Services/UsersService.cs"
click node_users_data "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/blob/main/01.%20Users%20Microservice/14.%20Dapper%20QueryAsync/eCommerce.Infrastructure/Repositories/UsersRepository.cs"
click node_products_service "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/02.%20Products%20Microservice"
click node_orders_service "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/06.%20Microservice%20Communication"
click node_orders_store "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/06.%20Microservice%20Communication"
click node_resilience "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/07.%20Fault%20Tolerance"
click node_cache "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/08.%20Caching"
click node_gateway "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/09.%20API%20Gateway%20using%20Ocelot"
click node_rabbit "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/10.%20RabbitMQ"
click node_servicebus "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/16.%20Azure%20ServiceBus"
click node_apim "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/14.%20Azure%20API%20Management"
click node_entra "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/15.%20Microsoft%20Entra%20ID%20-%20B2C%20Authentication"
click node_postgres "https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/01.%20Users%20Microservice/11.%20Postgres/eCommerce.Infrastructure"

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_users_ui,node_products_ui,node_orders_ui toneBlue
class node_users_api,node_users_service,node_users_data,node_products_service,node_orders_service,node_orders_store,node_postgres toneAmber
class node_resilience,node_cache,node_gateway,node_rabbit,node_servicebus,node_apim toneMint
class node_entra toneRose
class node_shopper toneIndigo
```

## Components

### Web Clients

- [Users Client](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/01.%20Users%20Microservice/19.%20Angular%20Client%20App/src/app): `01. Users Microservice/19. Angular Client App/src/app`
- [Products Client](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/02.%20Products%20Microservice/16.%20Products%20Angular%20UI/src/app): `02. Products Microservice/16. Products Angular UI/src/app`
- [Orders Client](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/06.%20Microservice%20Communication/12.%20Frontend%20with%20Orders/frontend/src/app): `06. Microservice Communication/12. Frontend with Orders/frontend/src/app`

### Commerce Services

- [Users API](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/01.%20Users%20Microservice/15.%20FluentValidation/eCommerce.API/Controllers): `01. Users Microservice/15. FluentValidation/eCommerce.API/Controllers`
- [Users Service](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/blob/main/01.%20Users%20Microservice/15.%20FluentValidation/eCommerce.Core/Services/UsersService.cs): `01. Users Microservice/15. FluentValidation/eCommerce.Core/Services/UsersService.cs`
- [Users Repository](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/blob/main/01.%20Users%20Microservice/14.%20Dapper%20QueryAsync/eCommerce.Infrastructure/Repositories/UsersRepository.cs): `01. Users Microservice/14. Dapper QueryAsync/eCommerce.Infrastructure/Repositories/UsersRepository.cs`
- [Products Service](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/02.%20Products%20Microservice): `02. Products Microservice`
- [Orders Service](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/06.%20Microservice%20Communication): `06. Microservice Communication`
- [Service Data Stores](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/06.%20Microservice%20Communication): `06. Microservice Communication`
- [PostgreSQL](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/01.%20Users%20Microservice/11.%20Postgres/eCommerce.Infrastructure): `01. Users Microservice/11. Postgres/eCommerce.Infrastructure`

### Platform Capabilities

- [Fault Policies](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/07.%20Fault%20Tolerance): `07. Fault Tolerance`
- [Redis Caching](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/08.%20Caching): `08. Caching`
- [Ocelot Gateway](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/09.%20API%20Gateway%20using%20Ocelot): `09. API Gateway using Ocelot`
- [RabbitMQ Messaging](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/10.%20RabbitMQ): `10. RabbitMQ`
- [Azure Service Bus](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/16.%20Azure%20ServiceBus): `16. Azure ServiceBus`
- [Azure API Management](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/14.%20Azure%20API%20Management): `14. Azure API Management`

### Identity

- [Entra B2C](https://github.com/harsha-global/dot-net-microservices-with-azure-and-aks/tree/main/15.%20Microsoft%20Entra%20ID%20-%20B2C%20Authentication): `15. Microsoft Entra ID - B2C Authentication`

### Other components

- **Shopper**

## Connections

- Shopper → Users Client: uses (evidence: `01. Users Microservice/19. Angular Client App/src/app/app.routes.ts`)
- Users Client → Users API: auth requests
- Users API → Users Service: delegates
- Users Service → Users Repository: uses repository
- Users Repository → PostgreSQL: reads and writes
- Shopper → Products Client: uses (evidence: `02. Products Microservice/16. Products Angular UI/src/app/app.routes.ts`)
- Products Client → Products Service: product requests (evidence: `02. Products Microservice/16. Products Angular UI/src/app/app.routes.ts`)
- Shopper → Orders Client: uses (evidence: `06. Microservice Communication/12. Frontend with Orders/frontend/src/app/app.routes.ts`)
- Orders Client → Orders Service: order requests (evidence: `06. Microservice Communication/12. Frontend with Orders/frontend/src/app/app.routes.ts`)
- Orders Service → Service Data Stores: persists orders
- Products Service → Redis Caching: cache access
- Ocelot Gateway → Users API: routes requests
- Ocelot Gateway → Products Service: routes requests
- Ocelot Gateway → Orders Service: routes requests
- Products Service → RabbitMQ Messaging: publishes events
- RabbitMQ Messaging → Orders Service: delivers events
- Products Service → Azure Service Bus: publishes updates
- Azure Service Bus → Orders Service: delivers updates
- Azure API Management → Ocelot Gateway: fronts APIs
- Users Client → Entra B2C: B2C sign-in
- Products Service → Fault Policies: uses policies
