# yeskabyl/sdp-assignment3 architecture

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

- Interactive diagram: https://gitdiagram.com/yeskabyl/sdp-assignment3
- Repository: https://github.com/yeskabyl/sdp-assignment3

## Overview

This is a small Java alerting library, not a deployed service: callers can resolve a delivery channel from severity and offline-zone status, then use notification abstractions to format and emit alerts through that channel. The resolver selects legacy pager, Telegram, or email delivery; the pager adapter translates the channel contract to the legacy service. Critical and digest notifications apply distinct formatting. The excerpts show these internal relationships, but no application entry point or external transport implementation, so no caller or external-service flow is asserted.

Main entry points: [`src/main/alerting/implementor/AlertChannel.java`](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/AlertChannel.java) (Alert channel contract), [`src/main/alerting/implementor/LegacyPagerAdapter.java`](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/LegacyPagerAdapter.java) (Legacy pager adapter), [`src/main/alerting/factory/DynamicChannelResolver.java`](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/factory/DynamicChannelResolver.java) (Dynamic channel resolver), [`src/main/alerting/implementor/EmailAlertChannel.java`](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/EmailAlertChannel.java) (Email channel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Channel selection"]
  node_resolver["Dynamic channel resolver"]
end

subgraph group_formatting["Alert formatting"]
  node_notification["Alert notification"]
  node_critical["Critical notification"]
  node_digest["Digest notification"]
end

subgraph group_delivery["Delivery implementations"]
  node_channel["Alert channel contract<br/>[AlertChannel.java]"]
  node_email["Email channel"]
  node_telegram["Telegram channel"]
  node_pager_adapter["Legacy pager adapter"]
  node_pager_service["Legacy pager service"]
  node_delivery_error["Delivery exception"]
end

node_resolver -->|"selects"| node_pager_adapter
node_resolver -->|"selects"| node_telegram
node_resolver -->|"selects"| node_email
node_pager_adapter -->|"transmits via"| node_pager_service
node_critical -->|"extends"| node_notification
node_digest -->|"extends"| node_notification
node_critical -->|"sends through"| node_channel
node_digest -->|"sends through"| node_channel
node_email -->|"implements"| node_channel
node_telegram -->|"implements"| node_channel
node_pager_adapter -->|"implements"| node_channel
node_email -->|"throws"| node_delivery_error
node_telegram -->|"throws"| node_delivery_error
node_pager_adapter -->|"throws"| node_delivery_error

click node_resolver "https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/factory/DynamicChannelResolver.java"
click node_notification "https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/abstraction/AlertNotification.java"
click node_critical "https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/abstraction/CriticalAlertNotification.java"
click node_digest "https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/abstraction/DigestAlertNotification.java"
click node_channel "https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/AlertChannel.java"
click node_email "https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/EmailAlertChannel.java"
click node_telegram "https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/TelegramAlertChannel.java"
click node_pager_adapter "https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/LegacyPagerAdapter.java"
click node_pager_service "https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/legacy/LegacyPagerService.java"
click node_delivery_error "https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/exception/ChannelDeliveryException.java"

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_resolver toneBlue
class node_notification,node_critical,node_digest toneAmber
class node_channel,node_email,node_telegram,node_pager_adapter,node_pager_service,node_delivery_error toneMint
```

## Components

### Channel selection

- [Dynamic channel resolver](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/factory/DynamicChannelResolver.java): `src/main/alerting/factory/DynamicChannelResolver.java`

### Alert formatting

- [Alert notification](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/abstraction/AlertNotification.java): `src/main/alerting/abstraction/AlertNotification.java`
- [Critical notification](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/abstraction/CriticalAlertNotification.java): `src/main/alerting/abstraction/CriticalAlertNotification.java`
- [Digest notification](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/abstraction/DigestAlertNotification.java): `src/main/alerting/abstraction/DigestAlertNotification.java`

### Delivery implementations

- [Alert channel contract](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/AlertChannel.java): `src/main/alerting/implementor/AlertChannel.java`
- [Email channel](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/EmailAlertChannel.java): `src/main/alerting/implementor/EmailAlertChannel.java`
- [Telegram channel](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/TelegramAlertChannel.java): `src/main/alerting/implementor/TelegramAlertChannel.java`
- [Legacy pager adapter](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/implementor/LegacyPagerAdapter.java): `src/main/alerting/implementor/LegacyPagerAdapter.java`
- [Legacy pager service](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/legacy/LegacyPagerService.java): `src/main/alerting/legacy/LegacyPagerService.java`
- [Delivery exception](https://github.com/yeskabyl/sdp-assignment3/blob/main/src/main/alerting/exception/ChannelDeliveryException.java): `src/main/alerting/exception/ChannelDeliveryException.java`

## Connections

- Dynamic channel resolver → Legacy pager adapter: selects (evidence: `src/main/alerting/factory/DynamicChannelResolver.java`)
- Dynamic channel resolver → Telegram channel: selects (evidence: `src/main/alerting/factory/DynamicChannelResolver.java`)
- Dynamic channel resolver → Email channel: selects (evidence: `src/main/alerting/factory/DynamicChannelResolver.java`)
- Legacy pager adapter → Legacy pager service: transmits via (evidence: `src/main/alerting/implementor/LegacyPagerAdapter.java`)
- Critical notification → Alert notification: extends (evidence: `src/main/alerting/abstraction/CriticalAlertNotification.java`)
- Digest notification → Alert notification: extends (evidence: `src/main/alerting/abstraction/DigestAlertNotification.java`)
- Critical notification → Alert channel contract: sends through (evidence: `src/main/alerting/abstraction/CriticalAlertNotification.java`)
- Digest notification → Alert channel contract: sends through (evidence: `src/main/alerting/abstraction/DigestAlertNotification.java`)
- Email channel → Alert channel contract: implements (evidence: `src/main/alerting/implementor/EmailAlertChannel.java`)
- Telegram channel → Alert channel contract: implements (evidence: `src/main/alerting/implementor/TelegramAlertChannel.java`)
- Legacy pager adapter → Alert channel contract: implements (evidence: `src/main/alerting/implementor/LegacyPagerAdapter.java`)
- Email channel → Delivery exception: throws (evidence: `src/main/alerting/implementor/EmailAlertChannel.java`)
- Telegram channel → Delivery exception: throws (evidence: `src/main/alerting/implementor/TelegramAlertChannel.java`)
- Legacy pager adapter → Delivery exception: throws (evidence: `src/main/alerting/implementor/LegacyPagerAdapter.java`)
