# xoaicatchu/dotnet-open-library architecture

> Architecture diagram of the GitHub repository xoaicatchu/dotnet-open-library, 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/xoaicatchu/dotnet-open-library
- Repository: https://github.com/xoaicatchu/dotnet-open-library

## Overview

This repository is a playbook of independent .NET 10 examples, not one deployable system. The README describes library and showcase projects for APIs, business workflows, messaging, data access, and production concerns. The sampled AllInOne controller demonstrates an order workflow; the RAG service demonstrates document ingestion and question answering. Other capabilities are represented by their exact source paths from the tree, but their internal wiring was not sampled, so their connections are omitted.

Main entry points: [`100-AllInOne/AllInOne.Api/Controllers/OrdersController.cs`](https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Controllers/OrdersController.cs) (Order API), [`119-RAG-Pipeline/RagPipeline.Api/Rag/SemanticKernelRagService.cs`](https://github.com/xoaicatchu/dotnet-open-library/blob/main/119-RAG-Pipeline/RagPipeline.Api/Rag/SemanticKernelRagService.cs) (RAG service), [`100-AllInOne/AllInOne.Api/Services/OrderStateMachineService.cs`](https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Services/OrderStateMachineService.cs) (Order state), [`100-AllInOne/AllInOne.Api/Services/OrderDataService.cs`](https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Services/OrderDataService.cs) (Order data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api_patterns["API patterns"]
  node_fastendpoints["Product endpoints<br/>[Products]"]
  node_carter["Task module<br/>[TaskModule.cs]"]
  node_wolverine["Book handlers<br/>[Books]"]
  node_mediatr["Contact handlers<br/>[Contacts]"]
end

subgraph group_business_workflows["Business workflows"]
  node_allinone_api["Order API"]
  node_order_state["Order state"]
  node_order_data["Order data"]
  node_order_docs["Order documents"]
  node_order_messaging["Order messaging"]
  node_saga["Order saga<br/>[OrderSaga.cs]"]
  node_event_store[("Product event store<br/>[EventStore.cs]")]
end

subgraph group_messaging_data["Messaging and data"]
  node_mass_transit["Order consumers<br/>[Consumers]"]
  node_payment_events["Payment subscriber"]
  node_inventory_handlers["Inventory handlers"]
  node_shipment_events["Shipment subscriber"]
end

subgraph group_platform_capabilities["Platform capabilities"]
  node_rag_service["RAG service"]
  node_vector_store[("Vector store")]
  node_stockflow_api["Stock API"]
  node_auth_stack["JWT and roles<br/>[AuthController.cs]"]
  node_observability["Metrics and tracing<br/>[AppMetrics.cs]"]
end

node_client(("API clients"))

node_client -->|"sends HTTP"| node_allinone_api
node_allinone_api -->|"transitions order"| node_order_state
node_allinone_api -->|"loads order data"| node_order_data
node_allinone_api -->|"generates exports"| node_order_docs
node_allinone_api -->|"notifies lifecycle"| node_order_messaging
node_rag_service -->|"stores and searches"| node_vector_store

click node_fastendpoints "https://github.com/xoaicatchu/dotnet-open-library/tree/main/01-FastEndpoints/ProductCatalog.Api/Features/Products"
click node_carter "https://github.com/xoaicatchu/dotnet-open-library/blob/main/02-Carter/TaskBoard.Api/Modules/TaskModule.cs"
click node_wolverine "https://github.com/xoaicatchu/dotnet-open-library/tree/main/03-Wolverine/BookStore.Api/Features/Books"
click node_mediatr "https://github.com/xoaicatchu/dotnet-open-library/tree/main/04-MediatR/ContactManager.Api/Features/Contacts"
click node_allinone_api "https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Controllers/OrdersController.cs"
click node_order_state "https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Services/OrderStateMachineService.cs"
click node_order_data "https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Services/OrderDataService.cs"
click node_order_docs "https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Services/OrderDocumentService.cs"
click node_order_messaging "https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Services/OrderMessagingService.cs"
click node_saga "https://github.com/xoaicatchu/dotnet-open-library/blob/main/107-Saga-Pattern/SagaPattern.Api/Sagas/OrderSaga.cs"
click node_event_store "https://github.com/xoaicatchu/dotnet-open-library/blob/main/106-EventSourcing-CQRS/EventSourcing.Api/EventStore/EventStore.cs"
click node_mass_transit "https://github.com/xoaicatchu/dotnet-open-library/tree/main/06-MassTransit/OrderProcessor.Api/Consumers"
click node_payment_events "https://github.com/xoaicatchu/dotnet-open-library/blob/main/07-CAP/PaymentService.Api/Subscribers/PaymentEventSubscriber.cs"
click node_inventory_handlers "https://github.com/xoaicatchu/dotnet-open-library/blob/main/08-Rebus/InventoryService.Api/Handlers/InventoryHandlers.cs"
click node_shipment_events "https://github.com/xoaicatchu/dotnet-open-library/blob/main/10-Silverback/ShipmentTracker.Api/Subscribers/ShipmentSubscriber.cs"
click node_rag_service "https://github.com/xoaicatchu/dotnet-open-library/blob/main/119-RAG-Pipeline/RagPipeline.Api/Rag/SemanticKernelRagService.cs"
click node_vector_store "https://github.com/xoaicatchu/dotnet-open-library/blob/main/119-RAG-Pipeline/RagPipeline.Api/Rag/InMemoryVectorStore.cs"
click node_stockflow_api "https://github.com/xoaicatchu/dotnet-open-library/blob/main/128-StockFlow/StockFlow.Api/Products/ProductsController.cs"
click node_auth_stack "https://github.com/xoaicatchu/dotnet-open-library/blob/main/108-AuthStack/AuthStack.Api/Controllers/AuthController.cs"
click node_observability "https://github.com/xoaicatchu/dotnet-open-library/blob/main/109-Observability/Observability.Api/Metrics/AppMetrics.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_fastendpoints,node_carter,node_wolverine,node_mediatr,node_client toneBlue
class node_allinone_api,node_order_state,node_order_data,node_order_docs,node_order_messaging,node_saga,node_event_store toneAmber
class node_mass_transit,node_payment_events,node_inventory_handlers,node_shipment_events toneMint
class node_rag_service,node_vector_store,node_stockflow_api,node_auth_stack,node_observability toneRose
```

## Components

### API patterns

- [Product endpoints](https://github.com/xoaicatchu/dotnet-open-library/tree/main/01-FastEndpoints/ProductCatalog.Api/Features/Products): `01-FastEndpoints/ProductCatalog.Api/Features/Products`
- [Task module](https://github.com/xoaicatchu/dotnet-open-library/blob/main/02-Carter/TaskBoard.Api/Modules/TaskModule.cs): `02-Carter/TaskBoard.Api/Modules/TaskModule.cs`
- [Book handlers](https://github.com/xoaicatchu/dotnet-open-library/tree/main/03-Wolverine/BookStore.Api/Features/Books): `03-Wolverine/BookStore.Api/Features/Books`
- [Contact handlers](https://github.com/xoaicatchu/dotnet-open-library/tree/main/04-MediatR/ContactManager.Api/Features/Contacts): `04-MediatR/ContactManager.Api/Features/Contacts`

### Business workflows

- [Order API](https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Controllers/OrdersController.cs): `100-AllInOne/AllInOne.Api/Controllers/OrdersController.cs`
- [Order state](https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Services/OrderStateMachineService.cs): `100-AllInOne/AllInOne.Api/Services/OrderStateMachineService.cs`
- [Order data](https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Services/OrderDataService.cs): `100-AllInOne/AllInOne.Api/Services/OrderDataService.cs`
- [Order documents](https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Services/OrderDocumentService.cs): `100-AllInOne/AllInOne.Api/Services/OrderDocumentService.cs`
- [Order messaging](https://github.com/xoaicatchu/dotnet-open-library/blob/main/100-AllInOne/AllInOne.Api/Services/OrderMessagingService.cs): `100-AllInOne/AllInOne.Api/Services/OrderMessagingService.cs`
- [Order saga](https://github.com/xoaicatchu/dotnet-open-library/blob/main/107-Saga-Pattern/SagaPattern.Api/Sagas/OrderSaga.cs): `107-Saga-Pattern/SagaPattern.Api/Sagas/OrderSaga.cs`
- [Product event store](https://github.com/xoaicatchu/dotnet-open-library/blob/main/106-EventSourcing-CQRS/EventSourcing.Api/EventStore/EventStore.cs): `106-EventSourcing-CQRS/EventSourcing.Api/EventStore/EventStore.cs`

### Messaging and data

- [Order consumers](https://github.com/xoaicatchu/dotnet-open-library/tree/main/06-MassTransit/OrderProcessor.Api/Consumers): `06-MassTransit/OrderProcessor.Api/Consumers`
- [Payment subscriber](https://github.com/xoaicatchu/dotnet-open-library/blob/main/07-CAP/PaymentService.Api/Subscribers/PaymentEventSubscriber.cs): `07-CAP/PaymentService.Api/Subscribers/PaymentEventSubscriber.cs`
- [Inventory handlers](https://github.com/xoaicatchu/dotnet-open-library/blob/main/08-Rebus/InventoryService.Api/Handlers/InventoryHandlers.cs): `08-Rebus/InventoryService.Api/Handlers/InventoryHandlers.cs`
- [Shipment subscriber](https://github.com/xoaicatchu/dotnet-open-library/blob/main/10-Silverback/ShipmentTracker.Api/Subscribers/ShipmentSubscriber.cs): `10-Silverback/ShipmentTracker.Api/Subscribers/ShipmentSubscriber.cs`

### Platform capabilities

- [RAG service](https://github.com/xoaicatchu/dotnet-open-library/blob/main/119-RAG-Pipeline/RagPipeline.Api/Rag/SemanticKernelRagService.cs): `119-RAG-Pipeline/RagPipeline.Api/Rag/SemanticKernelRagService.cs`
- [Vector store](https://github.com/xoaicatchu/dotnet-open-library/blob/main/119-RAG-Pipeline/RagPipeline.Api/Rag/InMemoryVectorStore.cs): `119-RAG-Pipeline/RagPipeline.Api/Rag/InMemoryVectorStore.cs`
- [Stock API](https://github.com/xoaicatchu/dotnet-open-library/blob/main/128-StockFlow/StockFlow.Api/Products/ProductsController.cs): `128-StockFlow/StockFlow.Api/Products/ProductsController.cs`
- [JWT and roles](https://github.com/xoaicatchu/dotnet-open-library/blob/main/108-AuthStack/AuthStack.Api/Controllers/AuthController.cs): `108-AuthStack/AuthStack.Api/Controllers/AuthController.cs`
- [Metrics and tracing](https://github.com/xoaicatchu/dotnet-open-library/blob/main/109-Observability/Observability.Api/Metrics/AppMetrics.cs): `109-Observability/Observability.Api/Metrics/AppMetrics.cs`

### Other components

- **API clients**

## Connections

- API clients → Order API: sends HTTP (evidence: `100-AllInOne/AllInOne.Api/Controllers/OrdersController.cs`)
- Order API → Order state: transitions order (evidence: `100-AllInOne/AllInOne.Api/Controllers/OrdersController.cs`)
- Order API → Order data: loads order data (evidence: `100-AllInOne/AllInOne.Api/Controllers/OrdersController.cs`)
- Order API → Order documents: generates exports (evidence: `100-AllInOne/AllInOne.Api/Controllers/OrdersController.cs`)
- Order API → Order messaging: notifies lifecycle (evidence: `100-AllInOne/AllInOne.Api/Controllers/OrdersController.cs`)
- RAG service → Vector store: stores and searches (evidence: `119-RAG-Pipeline/RagPipeline.Api/Rag/SemanticKernelRagService.cs`)
