# fcakiroglu16/dotnet-microservices-course architecture

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

- Interactive diagram: https://gitdiagram.com/fcakiroglu16/dotnet-microservices-course
- Repository: https://github.com/fcakiroglu16/dotnet-microservices-course

## Overview

One.API accepts a user-creation request and publishes a shared event to RabbitMQ. Two.API and NotificationWorkerService independently consume that event and log the received user details. The README documents these service roles; the excerpts show the publish, queue binding, consumption, and acknowledgement behavior. No database-backed user persistence is shown.

Main entry points: [`NotificationWorkerService/Consumers/UserCreatedEventConsumer.cs`](https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/NotificationWorkerService/Consumers/UserCreatedEventConsumer.cs) (Notification consumer), [`One.API/Program.cs`](https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/One.API/Program.cs) (User API), [`Two.API/Consumers/UserCreatedEventConsumer.cs`](https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/Two.API/Consumers/UserCreatedEventConsumer.cs) (Two.API consumer), [`SharedLibrary/UserCreatedEvent.cs`](https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/SharedLibrary/UserCreatedEvent.cs) (User-created event)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_producer["Event producer"]
  node_one_api["User API<br/>[Program.cs]"]
end

subgraph group_messaging["Message broker"]
  node_rabbitmq["RabbitMQ broker"]
end

subgraph group_consumers["Event consumers"]
  node_two_consumer["Two.API consumer"]
  node_notification_consumer["Notification consumer"]
end

subgraph group_contracts["Shared contract"]
  node_user_event["User-created event"]
end

node_client(("API client"))

node_client -->|"submits user"| node_one_api
node_one_api -->|"creates event"| node_user_event
node_one_api -->|"publishes event"| node_rabbitmq
node_two_consumer -->|"binds and consumes"| node_rabbitmq
node_notification_consumer -->|"binds and consumes"| node_rabbitmq
node_two_consumer -->|"deserializes event"| node_user_event
node_notification_consumer -->|"deserializes event"| node_user_event
node_two_consumer -->|"registered by"| node_one_api
node_notification_consumer -->|"registered by"| node_notification_consumer

click node_one_api "https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/One.API/Program.cs"
click node_user_event "https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/SharedLibrary/UserCreatedEvent.cs"
click node_two_consumer "https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/Two.API/Consumers/UserCreatedEventConsumer.cs"
click node_notification_consumer "https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/NotificationWorkerService/Consumers/UserCreatedEventConsumer.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_one_api,node_client toneBlue
class node_rabbitmq toneAmber
class node_two_consumer,node_notification_consumer toneMint
class node_user_event toneRose
```

## Components

### Event producer

- [User API](https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/One.API/Program.cs): `One.API/Program.cs`

### Message broker

- **RabbitMQ broker**

### Event consumers

- [Two.API consumer](https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/Two.API/Consumers/UserCreatedEventConsumer.cs): `Two.API/Consumers/UserCreatedEventConsumer.cs`
- [Notification consumer](https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/NotificationWorkerService/Consumers/UserCreatedEventConsumer.cs): `NotificationWorkerService/Consumers/UserCreatedEventConsumer.cs`

### Shared contract

- [User-created event](https://github.com/fcakiroglu16/dotnet-microservices-course/blob/main/SharedLibrary/UserCreatedEvent.cs): `SharedLibrary/UserCreatedEvent.cs`

### Other components

- **API client**

## Connections

- API client → User API: submits user (evidence: `README.md`)
- User API → User-created event: creates event (evidence: `One.API/Program.cs`)
- User API → RabbitMQ broker: publishes event (evidence: `One.API/Program.cs`)
- Two.API consumer → RabbitMQ broker: binds and consumes (evidence: `Two.API/Consumers/UserCreatedEventConsumer.cs`)
- Notification consumer → RabbitMQ broker: binds and consumes (evidence: `NotificationWorkerService/Consumers/UserCreatedEventConsumer.cs`)
- Two.API consumer → User-created event: deserializes event (evidence: `Two.API/Consumers/UserCreatedEventConsumer.cs`)
- Notification consumer → User-created event: deserializes event (evidence: `NotificationWorkerService/Consumers/UserCreatedEventConsumer.cs`)
- Two.API consumer → User API: registered by
- Notification consumer → Notification consumer: registered by (evidence: `NotificationWorkerService/Consumers/UserCreatedEventConsumer.cs`)
