# skhan7332/gbitcodechallenge20261009 architecture

> Architecture diagram of the GitHub repository skhan7332/gbitcodechallenge20261009, 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/skhan7332/gbitcodechallenge20261009
- Repository: https://github.com/skhan7332/gbitcodechallenge20261009

## Overview

This is a small ASP.NET Core notification-processing API. A client submits an email notification; the API validates it, rejects recent duplicates or stores it Pending, and returns an HTTP result. Separate endpoints retrieve notifications and trigger processing of due items, which are claimed in priority/FIFO order and marked Sent or Failed after provider delivery. The graph follows documented capabilities and relationships visible in the excerpts; startup dependency-injection wiring and the response DTO implementation were not sampled.

Main entry points: [`src/NotificationApi/Services/NotificationService.cs`](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Services/NotificationService.cs) (Notification Service), [`src/NotificationApi/Controllers/NotificationsController.cs`](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Controllers/NotificationsController.cs) (Notifications Controller), [`src/NotificationApi/Repositories/InMemoryNotificationRepository.cs`](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Repositories/InMemoryNotificationRepository.cs) (In-Memory Repository), [`src/NotificationApi/Models/Notification.cs`](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Models/Notification.cs) (Notification Record)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_controller["Notifications Controller"]
  node_contracts["Request and Response Contracts"]
end

subgraph group_domain["Notification Rules"]
  node_validator["Request Validator"]
  node_service["Notification Service"]
  node_fingerprint["Duplicate Fingerprint"]
  node_notification["Notification Record<br/>[Notification.cs]"]
end

subgraph group_storage["Persistence"]
  node_repository[("In-Memory Repository")]
end

subgraph group_delivery["Delivery"]
  node_email["Simulated Email Provider"]
end

node_client(("API Client"))

node_client -->|"calls endpoints"| node_controller
node_controller -->|"binds and formats"| node_contracts
node_controller -->|"delegates requests"| node_service
node_service -->|"validates request"| node_validator
node_service -->|"computes duplicate key"| node_fingerprint
node_service -->|"stores and retrieves"| node_repository
node_repository -->|"stores records"| node_notification
node_service -->|"creates and updates"| node_notification
node_service -->|"dispatches delivery"| node_email

click node_controller "https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Controllers/NotificationsController.cs"
click node_contracts "https://github.com/skhan7332/gbitcodechallenge20261009/tree/main/src/NotificationApi/Contracts"
click node_validator "https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Validation/NotificationRequestValidator.cs"
click node_service "https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Services/NotificationService.cs"
click node_fingerprint "https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Services/NotificationFingerprint.cs"
click node_notification "https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Models/Notification.cs"
click node_repository "https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Repositories/InMemoryNotificationRepository.cs"
click node_email "https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Providers/SimulatedEmailProvider.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_controller,node_contracts,node_client toneBlue
class node_validator,node_service,node_fingerprint,node_notification toneAmber
class node_repository toneMint
class node_email toneRose
```

## Components

### HTTP API

- [Notifications Controller](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Controllers/NotificationsController.cs): `src/NotificationApi/Controllers/NotificationsController.cs`
- [Request and Response Contracts](https://github.com/skhan7332/gbitcodechallenge20261009/tree/main/src/NotificationApi/Contracts): `src/NotificationApi/Contracts`

### Notification Rules

- [Request Validator](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Validation/NotificationRequestValidator.cs): `src/NotificationApi/Validation/NotificationRequestValidator.cs`
- [Notification Service](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Services/NotificationService.cs): `src/NotificationApi/Services/NotificationService.cs`
- [Duplicate Fingerprint](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Services/NotificationFingerprint.cs): `src/NotificationApi/Services/NotificationFingerprint.cs`
- [Notification Record](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Models/Notification.cs): `src/NotificationApi/Models/Notification.cs`

### Persistence

- [In-Memory Repository](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Repositories/InMemoryNotificationRepository.cs): `src/NotificationApi/Repositories/InMemoryNotificationRepository.cs`

### Delivery

- [Simulated Email Provider](https://github.com/skhan7332/gbitcodechallenge20261009/blob/main/src/NotificationApi/Providers/SimulatedEmailProvider.cs): `src/NotificationApi/Providers/SimulatedEmailProvider.cs`

### Other components

- **API Client**

## Connections

- API Client → Notifications Controller: calls endpoints (evidence: `README.md`)
- Notifications Controller → Request and Response Contracts: binds and formats (evidence: `src/NotificationApi/Controllers/NotificationsController.cs`)
- Notifications Controller → Notification Service: delegates requests (evidence: `src/NotificationApi/Controllers/NotificationsController.cs`)
- Notification Service → Request Validator: validates request (evidence: `src/NotificationApi/Services/NotificationService.cs`)
- Notification Service → Duplicate Fingerprint: computes duplicate key (evidence: `src/NotificationApi/Services/NotificationService.cs`)
- Notification Service → In-Memory Repository: stores and retrieves (evidence: `src/NotificationApi/Services/NotificationService.cs`)
- In-Memory Repository → Notification Record: stores records (evidence: `src/NotificationApi/Repositories/InMemoryNotificationRepository.cs`)
- Notification Service → Notification Record: creates and updates (evidence: `src/NotificationApi/Services/NotificationService.cs`)
- Notification Service → Simulated Email Provider: dispatches delivery (evidence: `src/NotificationApi/Services/NotificationService.cs`)
