# aam11/meeting-airplane architecture

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

- Interactive diagram: https://gitdiagram.com/aam11/meeting-airplane
- Repository: https://github.com/aam11/meeting-airplane

## Overview

Meeting Airplane is a macOS background app that checks Calendar events and animates a meeting banner shortly before a meeting starts. Its main workflow is app startup and configuration, calendar polling and deduplication, a callback to the app delegate, title formatting, and overlay display. The README also documents launchd operation and runtime settings. Source excerpts show the key runtime calls; Calendar.app access and launchd startup are additionally documented in the README.

Main entry points: [`Sources/main.swift`](https://github.com/aam11/meeting-airplane/blob/main/Sources/main.swift) (App delegate), [`Sources/CalendarWatcher.swift`](https://github.com/aam11/meeting-airplane/blob/main/Sources/CalendarWatcher.swift) (Calendar watcher), [`Sources/OverlayController.swift`](https://github.com/aam11/meeting-airplane/blob/main/Sources/OverlayController.swift) (Overlay controller), [`Sources/Config.swift`](https://github.com/aam11/meeting-airplane/blob/main/Sources/Config.swift) (Config loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App lifecycle"]
  node_main["App delegate<br/>[main.swift]"]
end

subgraph group_calendar["Meeting detection"]
  node_watcher["Calendar watcher"]
end

subgraph group_display["Overlay display"]
  node_overlay["Overlay controller"]
  node_banner_view["Banner and plane view"]
  node_animation["Window animation"]
  node_artwork["Plane and banner artwork"]
end

subgraph group_settings["Runtime settings"]
  node_config["Config loader<br/>[Config.swift]"]
end

node_user(("User"))
node_launchd["launchd agent"]
node_calendar_app["Calendar.app"]
node_user_defaults[("UserDefaults")]

node_launchd -.->|"starts app"| node_main
node_main -->|"loads settings"| node_config
node_config -->|"reads preferences"| node_user_defaults
node_main -->|"starts polling"| node_watcher
node_main -->|"sets callback"| node_watcher
node_watcher -.->|"reads events"| node_calendar_app
node_watcher -->|"fires callback"| node_main
node_main -->|"formats title"| node_watcher
node_main -->|"shows meeting"| node_overlay
node_watcher -->|"uses timing settings"| node_config
node_overlay -->|"uses animation settings"| node_config
node_overlay -->|"builds content"| node_banner_view
node_overlay -->|"animates window"| node_animation
node_banner_view -->|"loads images"| node_artwork

click node_main "https://github.com/aam11/meeting-airplane/blob/main/Sources/main.swift"
click node_config "https://github.com/aam11/meeting-airplane/blob/main/Sources/Config.swift"
click node_watcher "https://github.com/aam11/meeting-airplane/blob/main/Sources/CalendarWatcher.swift"
click node_overlay "https://github.com/aam11/meeting-airplane/blob/main/Sources/OverlayController.swift"
click node_banner_view "https://github.com/aam11/meeting-airplane/blob/main/Sources/OverlayController.swift"
click node_animation "https://github.com/aam11/meeting-airplane/blob/main/Sources/OverlayController.swift"
click node_artwork "https://github.com/aam11/meeting-airplane/tree/main/art"

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_user toneBlue
class node_watcher,node_user_defaults toneAmber
class node_overlay,node_banner_view,node_animation,node_artwork toneMint
class node_config toneRose
class node_launchd,node_calendar_app toneIndigo
```

## Components

### App lifecycle

- [App delegate](https://github.com/aam11/meeting-airplane/blob/main/Sources/main.swift): `Sources/main.swift`

### Meeting detection

- [Calendar watcher](https://github.com/aam11/meeting-airplane/blob/main/Sources/CalendarWatcher.swift): `Sources/CalendarWatcher.swift`

### Overlay display

- [Overlay controller](https://github.com/aam11/meeting-airplane/blob/main/Sources/OverlayController.swift): `Sources/OverlayController.swift`
- [Banner and plane view](https://github.com/aam11/meeting-airplane/blob/main/Sources/OverlayController.swift): `Sources/OverlayController.swift`
- [Window animation](https://github.com/aam11/meeting-airplane/blob/main/Sources/OverlayController.swift): `Sources/OverlayController.swift`
- [Plane and banner artwork](https://github.com/aam11/meeting-airplane/tree/main/art): `art`

### Runtime settings

- [Config loader](https://github.com/aam11/meeting-airplane/blob/main/Sources/Config.swift): `Sources/Config.swift`

### Other components

- **User**
- **launchd agent**
- **Calendar.app**
- **UserDefaults**

## Connections

- launchd agent → App delegate: starts app (evidence: `README.md`)
- App delegate → Config loader: loads settings (evidence: `Sources/main.swift`)
- Config loader → UserDefaults: reads preferences (evidence: `Sources/Config.swift`)
- App delegate → Calendar watcher: starts polling (evidence: `Sources/main.swift`)
- App delegate → Calendar watcher: sets callback (evidence: `Sources/main.swift`)
- Calendar watcher → Calendar.app: reads events (evidence: `README.md`)
- Calendar watcher → App delegate: fires callback (evidence: `Sources/CalendarWatcher.swift`)
- App delegate → Calendar watcher: formats title (evidence: `Sources/main.swift`)
- App delegate → Overlay controller: shows meeting (evidence: `Sources/main.swift`)
- Calendar watcher → Config loader: uses timing settings (evidence: `Sources/CalendarWatcher.swift`)
- Overlay controller → Config loader: uses animation settings (evidence: `Sources/OverlayController.swift`)
- Overlay controller → Banner and plane view: builds content (evidence: `Sources/OverlayController.swift`)
- Overlay controller → Window animation: animates window (evidence: `Sources/OverlayController.swift`)
- Banner and plane view → Plane and banner artwork: loads images (evidence: `Sources/OverlayController.swift`)
