# erbulataida/assignment-3-board-game-rental architecture

> Architecture diagram of the GitHub repository erbulataida/assignment-3-board-game-rental, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/erbulataida/assignment-3-board-game-rental
- Repository: https://github.com/erbulataida/assignment-3-board-game-rental

## Overview

This Java demo implements board-game rental notices using Bridge and Adapter patterns. A user chooses a delivery channel and recipient; Main builds a rental request, resolves its channel through the registry, creates a booking confirmation, and sends it. Notice variants share the channel abstraction, with screen and inbox implementations plus an adapter for the legacy SMS service. The README also identifies return reminders as a notice capability. The runtime files are excerpted; edges below are limited to relationships visible in those excerpts or explicitly documented.

Main entry points: [`src/main/java/boardgamerental/Main.java`](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/Main.java) (Program entry), [`src/main/java/boardgamerental/NotificationChannel.java`](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/NotificationChannel.java) (Channel interface), [`src/main/java/boardgamerental/ChannelRegistry.java`](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/ChannelRegistry.java) (Channel registry), [`src/main/java/boardgamerental/BookingConfirmation.java`](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/BookingConfirmation.java) (Booking confirmation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flow["Rental workflow"]
  node_main["Program entry<br/>[Main.java]"]
  node_request["Rental request<br/>[RentalRequest.java]"]
  node_registry["Channel registry"]
  node_error["Delivery exception"]
end

subgraph group_notices["Notice types"]
  node_notice["Notice abstraction<br/>[RentalNotice.java]"]
  node_booking["Booking confirmation"]
  node_reminder["Return reminder"]
end

subgraph group_channels["Delivery channels"]
  node_channel["Channel interface"]
  node_screen["Screen channel"]
  node_inbox[("Inbox channel<br/>[InboxChannel.java]")]
end

subgraph group_sms["Legacy SMS adapter"]
  node_adapter["SMS adapter<br/>[OldSmsAdapter.java]"]
  node_oldservice["Legacy SMS service<br/>[OldSmsService.java]"]
end

node_user(("Console user"))

node_user -->|"chooses channel"| node_main
node_main -->|"creates request"| node_request
node_main -->|"resolves channel"| node_registry
node_registry -->|"reads key"| node_request
node_registry -->|"throws on unknown"| node_error
node_main -->|"creates notice"| node_booking
node_booking -->|"extends"| node_notice
node_reminder -->|"extends"| node_notice
node_notice -->|"holds channel"| node_channel
node_booking -->|"sends message"| node_channel
node_reminder -->|"sends message"| node_channel
node_main -->|"registers channel"| node_screen
node_main -->|"registers channel"| node_inbox
node_main -->|"registers SMS"| node_adapter
node_screen -->|"implements"| node_channel
node_inbox -->|"implements"| node_channel
node_adapter -->|"implements"| node_channel
node_adapter -->|"transmits SMS"| node_oldservice
node_main -->|"reads saved messages"| node_inbox

click node_main "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/Main.java"
click node_request "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/RentalRequest.java"
click node_registry "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/ChannelRegistry.java"
click node_error "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/DeliveryException.java"
click node_notice "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/RentalNotice.java"
click node_booking "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/BookingConfirmation.java"
click node_reminder "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/ReturnReminder.java"
click node_channel "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/NotificationChannel.java"
click node_screen "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/ScreenMessageChannel.java"
click node_inbox "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/InboxChannel.java"
click node_adapter "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/OldSmsAdapter.java"
click node_oldservice "https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/OldSmsService.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_main,node_request,node_registry,node_error,node_user toneBlue
class node_notice,node_booking,node_reminder toneAmber
class node_channel,node_screen,node_inbox toneMint
class node_adapter,node_oldservice toneRose
```

## Components

### Rental workflow

- [Program entry](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/Main.java): `src/main/java/boardgamerental/Main.java`
- [Rental request](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/RentalRequest.java): `src/main/java/boardgamerental/RentalRequest.java`
- [Channel registry](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/ChannelRegistry.java): `src/main/java/boardgamerental/ChannelRegistry.java`
- [Delivery exception](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/DeliveryException.java): `src/main/java/boardgamerental/DeliveryException.java`

### Notice types

- [Notice abstraction](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/RentalNotice.java): `src/main/java/boardgamerental/RentalNotice.java`
- [Booking confirmation](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/BookingConfirmation.java): `src/main/java/boardgamerental/BookingConfirmation.java`
- [Return reminder](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/ReturnReminder.java): `src/main/java/boardgamerental/ReturnReminder.java`

### Delivery channels

- [Channel interface](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/NotificationChannel.java): `src/main/java/boardgamerental/NotificationChannel.java`
- [Screen channel](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/ScreenMessageChannel.java): `src/main/java/boardgamerental/ScreenMessageChannel.java`
- [Inbox channel](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/InboxChannel.java): `src/main/java/boardgamerental/InboxChannel.java`

### Legacy SMS adapter

- [SMS adapter](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/OldSmsAdapter.java): `src/main/java/boardgamerental/OldSmsAdapter.java`
- [Legacy SMS service](https://github.com/erbulataida/assignment-3-board-game-rental/blob/main/src/main/java/boardgamerental/OldSmsService.java): `src/main/java/boardgamerental/OldSmsService.java`

### Other components

- **Console user**

## Connections

- Console user → Program entry: chooses channel (evidence: `src/main/java/boardgamerental/Main.java`)
- Program entry → Rental request: creates request (evidence: `src/main/java/boardgamerental/Main.java`)
- Program entry → Channel registry: resolves channel (evidence: `src/main/java/boardgamerental/Main.java`)
- Channel registry → Rental request: reads key (evidence: `src/main/java/boardgamerental/ChannelRegistry.java`)
- Channel registry → Delivery exception: throws on unknown (evidence: `src/main/java/boardgamerental/ChannelRegistry.java`)
- Program entry → Booking confirmation: creates notice (evidence: `src/main/java/boardgamerental/Main.java`)
- Booking confirmation → Notice abstraction: extends (evidence: `src/main/java/boardgamerental/BookingConfirmation.java`)
- Return reminder → Notice abstraction: extends (evidence: `src/main/java/boardgamerental/ReturnReminder.java`)
- Notice abstraction → Channel interface: holds channel (evidence: `src/main/java/boardgamerental/RentalNotice.java`)
- Booking confirmation → Channel interface: sends message (evidence: `src/main/java/boardgamerental/BookingConfirmation.java`)
- Return reminder → Channel interface: sends message (evidence: `src/main/java/boardgamerental/ReturnReminder.java`)
- Program entry → Screen channel: registers channel (evidence: `src/main/java/boardgamerental/Main.java`)
- Program entry → Inbox channel: registers channel (evidence: `src/main/java/boardgamerental/Main.java`)
- Program entry → SMS adapter: registers SMS (evidence: `src/main/java/boardgamerental/Main.java`)
- Screen channel → Channel interface: implements (evidence: `src/main/java/boardgamerental/ScreenMessageChannel.java`)
- Inbox channel → Channel interface: implements (evidence: `src/main/java/boardgamerental/InboxChannel.java`)
- SMS adapter → Channel interface: implements (evidence: `src/main/java/boardgamerental/OldSmsAdapter.java`)
- SMS adapter → Legacy SMS service: transmits SMS (evidence: `src/main/java/boardgamerental/OldSmsAdapter.java`)
- Program entry → Inbox channel: reads saved messages (evidence: `src/main/java/boardgamerental/Main.java`)
