# leits/meetingbar architecture

> Architecture diagram of the GitHub repository leits/meetingbar, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/leits/meetingbar
- Repository: https://github.com/leits/meetingbar

## Overview

- Calendar Data Flow:
External Calendars → EventStores → Core Application → StatusBarItemController

- Meeting Launch Flow:
StatusBarItemController → MeetingServices → External Meeting Apps/Browser

- User Preferences Flow:
Preferences Views → AppStore → Core Application

##### External Integration Points (use cloud symbols)
- macOS Calendar API
- Google Calendar API
- Meeting Service Providers (Zoom, Teams, etc.)
- macOS Menu Bar
- Browser Integration
- System Notifications

##### Key Technical Elements to Highlight

- Swift 5.0 as primary language
- KeyboardShortcuts integration
- SwiftyStoreKit for in-app purchases
- macOS integration points (10.15+)
- AppleScript execution capability

##### Important Architectural Patterns
- Protocol-oriented design for EventStores
- MVC pattern for views
- Delegate pattern for app lifecycle
- Observer pattern for status updates

## Diagram (Mermaid)

```mermaid
graph TB
    %% Core Application Layer
    subgraph Core
        AppDelegate["AppDelegate"]:::core
        StatusBar["StatusBarItemController"]:::core
        Constants["Constants & Helpers"]:::core
        AppStore["AppStore"]:::core
    end

    %% Event Management Layer
    subgraph EventManagement
        EventStores["EventStores Module"]:::event
        Protocol["Protocol"]:::event
        EKStore["EKEventStore"]:::event
        GCStore["GCEventStore"]:::event
        CalendarModel["Calendar Model"]:::event
        EventModel["Event Model"]:::event
    end

    %% Meeting Services Layer
    subgraph MeetingServices
        ServiceManager["MeetingServices"]:::meeting
        VendorIcons["Vendor Icons"]:::meeting
    end

    %% User Interface Layer
    subgraph UI
        Views["Views Module"]:::ui
        Preferences["Preferences"]:::ui
        Onboarding["Onboarding"]:::ui
        Changelog["Changelog"]:::ui
        FullscreenNotif["FullscreenNotification"]:::ui
        Localization["Localization"]:::ui
        Assets["Assets"]:::ui
    end

    %% Supporting Components
    subgraph Support
        Extensions["Extensions"]:::support
        Scripts["Scripts"]:::support
        Notifications["Notifications"]:::support
    end

    %% External Systems
    MacCalendar[("macOS Calendar")]:::external
    GoogleCalendar[("Google Calendar")]:::external
    MenuBar[("macOS Menu Bar")]:::external
    MeetingApps[("Meeting Apps")]:::external
    Browser[("Browser")]:::external
    SystemNotif[("System Notifications")]:::external

    %% Relationships
    MacCalendar --> EKStore
    GoogleCalendar --> GCStore
    EKStore --> EventStores
    GCStore --> EventStores
    EventStores --> AppDelegate
    AppDelegate --> StatusBar
    StatusBar --> ServiceManager
    ServiceManager --> MeetingApps
    ServiceManager --> Browser
    AppStore --> AppDelegate
    Views --> AppStore
    Notifications --> SystemNotif
    StatusBar --> MenuBar

    %% Click Events
    click AppDelegate "https://github.com/leits/MeetingBar/blob/master/MeetingBar/AppDelegate.swift"
    click StatusBar "https://github.com/leits/MeetingBar/blob/master/MeetingBar/StatusBarItemController.swift"
    click Constants "https://github.com/leits/MeetingBar/blob/master/MeetingBar/Constants.swift"
    click AppStore "https://github.com/leits/MeetingBar/blob/master/MeetingBar/AppStore.swift"
    click EventStores "https://github.com/leits/MeetingBar/tree/master/MeetingBar/EventStores/"
    click Protocol "https://github.com/leits/MeetingBar/blob/master/MeetingBar/EventStores/Protocol.swift"
    click EKStore "https://github.com/leits/MeetingBar/blob/master/MeetingBar/EventStores/EKEventStore.swift"
    click GCStore "https://github.com/leits/MeetingBar/blob/master/MeetingBar/EventStores/GCEventStore.swift"
    click CalendarModel "https://github.com/leits/MeetingBar/blob/master/MeetingBar/EventStores/Calendar.swift"
    click EventModel "https://github.com/leits/MeetingBar/blob/master/MeetingBar/EventStores/Event.swift"
    click ServiceManager "https://github.com/leits/MeetingBar/blob/master/MeetingBar/MeetingServices.swift"
    click VendorIcons "https://github.com/leits/MeetingBar/tree/master/MeetingBar/Assets.xcassets/vendor-icons/"
    click Views "https://github.com/leits/MeetingBar/tree/master/MeetingBar/Views/"
    click Preferences "https://github.com/leits/MeetingBar/tree/master/MeetingBar/Views/Preferences/"
    click Onboarding "https://github.com/leits/MeetingBar/tree/master/MeetingBar/Views/Onboarding/"
    click Changelog "https://github.com/leits/MeetingBar/tree/master/MeetingBar/Views/Changelog/"
    click FullscreenNotif "https://github.com/leits/MeetingBar/blob/master/MeetingBar/Views/FullscreenNotification.swift"
    click Localization "https://github.com/leits/MeetingBar/tree/master/MeetingBar/Resources/Localization/"
    click Assets "https://github.com/leits/MeetingBar/tree/master/MeetingBar/Assets.xcassets/"
    click Extensions "https://github.com/leits/MeetingBar/tree/master/MeetingBar/Extensions/"
    click Scripts "https://github.com/leits/MeetingBar/blob/master/MeetingBar/Scripts.swift"
    click Notifications "https://github.com/leits/MeetingBar/blob/master/MeetingBar/Notifications.swift"

    %% Styles
    classDef core fill:#2b6cb0,stroke:#1a4971,color:white
    classDef event fill:#48bb78,stroke:#2f855a,color:white
    classDef meeting fill:#ed8936,stroke:#c05621,color:white
    classDef ui fill:#805ad5,stroke:#553c9a,color:white
    classDef support fill:#718096,stroke:#4a5568,color:white
    classDef external fill:#cbd5e0,stroke:#718096,color:black

    %% Legend
    subgraph Legend
        CoreLegend["Core Component"]:::core
        EventLegend["Event Management"]:::event
        MeetingLegend["Meeting Services"]:::meeting
        UILegend["User Interface"]:::ui
        SupportLegend["Support"]:::support
        ExternalLegend["External Systems"]:::external
    end
```
