# noah-duncan/attendee architecture

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

- Interactive diagram: https://gitdiagram.com/noah-duncan/attendee
- Repository: https://github.com/noah-duncan/attendee

## Overview

##### Project Type and Purpose
- Project Type: A Django-based backend API platform.
- Purpose: To manage meeting bots that join meetings, capture transcripts, handle media streams, and interact with third-party services like Zoom (via OAuth), Deepgram (for transcription), Google Meet, and Microsoft Teams.
- Key Use Cases:
- Creating bots for meetings via API requests.
- Managing bot lifecycle and media stream processing.
- Retrieving transcripts and meeting recordings.

##### File Structure
- Top-Level Directories:
- accounts: Handles user registration, authentication, and account-specific operations (templates, forms, models, views).
- attendee: Contains Django project settings, URL configuration, and add environment-specific settings (development, production, testing).
- bots: Contains the core logic related to the meeting bots functionality. This includes:
– Bot controllers (for handling media streams, audio input/output, transcription via Deepgram).
– Bot adapters (separate modules for Zoom, Google Meet, Teams, and web bots).
– Management commands to launch, run, and manage bots.
– Celery tasks and other asynchronous job handling.
- docs, static, and templates: Provide documentation and static assets that support the UI elements (if any) and potential API response templates.
- Configuration Files:
- Dockerfile, docker-compose files (e.g., dev.docker-compose.yaml): Indicate containerized deployment.
- Procfile, heroku.yml, and Makefile: Show deployment and build/deployment automation.
- Environment settings (attendee/settings/*): Reflect best practice separation of configuration for development, staging, and production.
- Architectural Indicators:
- Separation of concerns with distinct Django apps (accounts for user operations, bots for meeting bot operations).
- Usage of management commands and Celery tasks implies asynchronous processing components.
- Presence of migration files indicates a relational database (likely Postgres based on README) as a storage backend.

##### README for Additional Insights
- The README details how to use the Attendee API including key endpoints such as POST /bots to join a meeting and GET /bots/<id> to monitor state, plus GET /bots/<id>/transcript to get transcripts.
- It outlines external dependencies:
- Postgres and Redis are required for storage and task-queue respectively.
- Zoom OAuth credentials and Deepgram API key for streaming and transcription.
- The instructions for “self-hosting” indicate that the project runs in a single Docker container for the Django app with external services required as separate containers or managed services.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Interaction
    Client("Client"):::external
    Client -->|"sendsAPICall"| API["API/Web Server"]:::django

    %% API interactions with modules and infrastructure
    API -->|"handlesAuth"| Accounts["Accounts Module"]:::django
    API -->|"handlesBotLogic"| Bots["Bots Module"]:::bot
    API -->|"storesData"| DB["Database (Postgres)"]:::external
    API -->|"queuesTasks"| Redis["Message Broker (Redis)"]:::external
    Accounts -->|"persistsData"| DB

    %% Bots Module Breakdown
    subgraph "Bots Module Components"
        Controller("Bot Controller"):::bot
        Bots --> Controller
        Adapters("Bot Adapters"):::bot
        Controller -->|"invokes"| Adapters
        Pod("Bot Pod Creator"):::bot
        Bots --> Pod
        Tasks("Task Queue"):::async
        Bots --> Tasks

        %% Adapters Subgroup
        subgraph "Adapters"
            ZoomAdapter("Zoom Bot Adapter"):::adapter
            MeetAdapter("Google Meet Bot Adapter"):::adapter
            TeamsAdapter("Teams Bot Adapter"):::adapter
            WebAdapter("Web Bot Adapter"):::adapter
            Adapters --> ZoomAdapter
            Adapters --> MeetAdapter
            Adapters --> TeamsAdapter
            Adapters --> WebAdapter
            %% External API calls from adapters
            ZoomAdapter -->|"calls"| ZoomAPI["Zoom API"]:::external
        end

        %% Asynchronous Processing Subgroup
        subgraph "Asynchronous Processing"
            CeleryConfig("Celery Config"):::async
            CeleryTasks("Celery Tasks"):::async
            Tasks --> CeleryConfig
            Tasks --> CeleryTasks
            CeleryTasks -->|"usesQueue"| Redis
        end

        %% External transcription call from controller
        Controller -->|"transcribes"| DeepgramAPI["Deepgram API"]:::external
        %% Bots module persistence
        Controller -->|"updatesState"| DB
    end

    %% Deployment & Infrastructure
    Deploy("Deployment & Infra"):::deployment
    Deploy -->|"deploys"| API

    %% Click Events for Component Mapping
    click API "https://github.com/noah-duncan/attendee/tree/main/attendee/"
    click Accounts "https://github.com/noah-duncan/attendee/tree/main/accounts/"
    click Bots "https://github.com/noah-duncan/attendee/tree/main/bots/"
    click Controller "https://github.com/noah-duncan/attendee/tree/main/bots/bot_controller/"
    click ZoomAdapter "https://github.com/noah-duncan/attendee/tree/main/bots/zoom_bot_adapter/"
    click MeetAdapter "https://github.com/noah-duncan/attendee/tree/main/bots/google_meet_bot_adapter/"
    click TeamsAdapter "https://github.com/noah-duncan/attendee/tree/main/bots/teams_bot_adapter/"
    click WebAdapter "https://github.com/noah-duncan/attendee/tree/main/bots/web_bot_adapter/"
    click Pod "https://github.com/noah-duncan/attendee/tree/main/bots/bot_pod_creator/"
    click CeleryConfig "https://github.com/noah-duncan/attendee/blob/main/attendee/celery.py"
    click CeleryTasks "https://github.com/noah-duncan/attendee/tree/main/bots/tasks/"

    %% Styling
    classDef django fill:#cce5ff,stroke:#333,stroke-width:2px;
    classDef bot fill:#ffe6cc,stroke:#333,stroke-width:2px;
    classDef adapter fill:#fff2cc,stroke:#333,stroke-width:2px;
    classDef async fill:#ffcccc,stroke:#333,stroke-width:2px;
    classDef external fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef deployment fill:#d5e8d4,stroke:#333,stroke-width:2px;
```
