# zoom/meetingsdk-headless-linux-sample architecture

> Architecture diagram of the GitHub repository zoom/meetingsdk-headless-linux-sample, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-02-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zoom/meetingsdk-headless-linux-sample
- Repository: https://github.com/zoom/meetingsdk-headless-linux-sample

## Overview

##### Project Type and Purpose
- The README makes it clear that this is a sample bot for the Zoom Meeting SDK on Linux. It’s built to run inside a Docker container, and it uses a configuration file (config.toml) or command line arguments to set up details such as Zoom credentials, meeting parameters, and potentially integrations with external services (e.g., AssemblyAI, Anthropic).
- The project integrates with the Zoom SDK (found in the lib/zoomsdk folder) and handles multiple kinds of events (authentication, meeting events, recording control, reminders).

##### File Structure
- Top-Level Files: Files like Dockerfile, compose.yaml, CMakeLists.txt, and sample.config.toml indicate how the project is built, deployed, and configured.
- bin/entry.sh: This is the entry point script that likely sets up environment variables or triggers the main executable.
- src/ Directory: Contains the bulk of the core logic.
- Main application (src/main.cpp) serves as the application’s entry point.
- src/Config.* files handle configuration management.
- src/Zoom.* wraps or interacts with the Zoom SDK functionality.
- src/events: Contains a set of event classes (for authentication, meeting service, recording, and reminders) that form the event-handling backbone of the application.
- src/raw_record and src/raw_send: Likely manage handling of raw audio data and video sources, interfacing directly with lower-level API callbacks from Zoom.
- src/util: Provides supporting utilities like logging, a Singleton helper, and a SocketServer for inter-component communication.
- lib/zoomsdk: Contains the Zoom SDK library (it’s a placeholder directory where you load the actual SDK).

## Diagram (Mermaid)

```mermaid
graph TD
    %% Docker/Deployment Layer
    subgraph "Docker/Deployment Layer"
        D1["Dockerfile"]:::deployment
        D2["compose.yaml"]:::deployment
    end

    %% Entry Point
    subgraph "Entry Point"
        E1["bin/entry.sh"]:::entry
    end

    %% Configuration Module
    subgraph "Configuration Module"
        C1["sample.config.toml"]:::config
        C2["src/Config.cpp"]:::config
        C3["src/Config.h"]:::config
    end

    %% Core Application Engine
    subgraph "Core Application Engine"
        M1["src/main.cpp"]:::core
    end

    %% Zoom Integration Module
    subgraph "Zoom Integration Module"
        Z1["src/Zoom.cpp & src/Zoom.h"]:::zoom
        Z2["Zoom SDK (lib/zoomsdk)"]:::zoom
    end

    %% Event Handlers
    subgraph "Event Handlers"
        EV1["AuthServiceEvent"]:::event
        EV2["MeetingRecordingCtrlEvent"]:::event
        EV3["MeetingReminderEvent"]:::event
        EV4["MeetingServiceEvent"]:::event
    end

    %% Raw Data Handling Modules
    subgraph "Raw Data Handling"
        R1["Raw Audio Handler (src/raw_record)"]:::raw
        R2["Raw Video Handler (src/raw_send)"]:::raw
    end

    %% Utility Services
    subgraph "Utility Services"
        U1["SocketServer & Log/Singleton (src/util)"]:::util
    end

    %% Connections
    D1 --> E1
    D2 --> E1
    E1 --> C1
    C1 --> M1
    M1 --> Z1
    Z1 --> Z2
    M1 --> EV1
    M1 --> EV2
    M1 --> EV3
    M1 --> EV4
    Z1 --> R1
    Z1 --> R2
    M1 --> U1
    EV1 --> U1
    EV2 --> U1
    EV3 --> U1
    EV4 --> U1

    %% Click Events
    click D1 "https://github.com/zoom/meetingsdk-headless-linux-sample/tree/main/Dockerfile"
    click D2 "https://github.com/zoom/meetingsdk-headless-linux-sample/blob/main/compose.yaml"
    click E1 "https://github.com/zoom/meetingsdk-headless-linux-sample/blob/main/bin/entry.sh"
    click C1 "https://github.com/zoom/meetingsdk-headless-linux-sample/blob/main/sample.config.toml"
    click C2 "https://github.com/zoom/meetingsdk-headless-linux-sample/blob/main/src/Config.cpp"
    click C3 "https://github.com/zoom/meetingsdk-headless-linux-sample/blob/main/src/Config.h"
    click M1 "https://github.com/zoom/meetingsdk-headless-linux-sample/blob/main/src/main.cpp"
    click Z1 "https://github.com/zoom/meetingsdk-headless-linux-sample/blob/main/src/Zoom.cpp"
    click Z2 "https://github.com/zoom/meetingsdk-headless-linux-sample/tree/main/lib/zoomsdk"
    click EV1 "https://github.com/zoom/meetingsdk-headless-linux-sample/tree/main/src/events"
    click EV2 "https://github.com/zoom/meetingsdk-headless-linux-sample/tree/main/src/events"
    click EV3 "https://github.com/zoom/meetingsdk-headless-linux-sample/tree/main/src/events"
    click EV4 "https://github.com/zoom/meetingsdk-headless-linux-sample/tree/main/src/events"
    click R1 "https://github.com/zoom/meetingsdk-headless-linux-sample/tree/main/src/raw_record"
    click R2 "https://github.com/zoom/meetingsdk-headless-linux-sample/tree/main/src/raw_send"
    click U1 "https://github.com/zoom/meetingsdk-headless-linux-sample/tree/main/src/util"

    %% Styles
    classDef deployment fill:#add8e6,stroke:#000,stroke-width:2px;
    classDef entry fill:#fdd835,stroke:#000,stroke-width:2px;
    classDef config fill:#ce93d8,stroke:#000,stroke-width:2px;
    classDef core fill:#ffa726,stroke:#000,stroke-width:2px;
    classDef zoom fill:#81d4fa,stroke:#000,stroke-width:2px;
    classDef event fill:#a5d6a7,stroke:#000,stroke-width:2px;
    classDef raw fill:#ffab91,stroke:#000,stroke-width:2px;
    classDef util fill:#e6ee9c,stroke:#000,stroke-width:2px;
```
