# meamitpatil/zoom-learning-assistant architecture

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

- Interactive diagram: https://gitdiagram.com/meamitpatil/zoom-learning-assistant
- Repository: https://github.com/meamitpatil/zoom-learning-assistant

## Overview

##### Main Components

A. Client Layer:
- Zoom Chat Interface (Entry point for user commands)
- Zoom Webhook Endpoints

B. Application Layer:
- Flask Server
- Command Handlers
- Authentication Services

C. AI/Processing Layer:
- Embedding Processing
- Chat/LLM Processing (Fireworks AI)
- Vector Database (Qdrant)

D. External Services:
- Google Drive Integration
- Zoom API
- LlamaIndex
- Fireworks AI API

##### Component Relationships

**[Zoom Chat] → [Zoom Webhook] → [Flask Server] → [Command Handlers]**
- ↓
- [Authentication Services (zoom_auth.py)]
- ↓
- [Embedding Processing (embedding_utils.py)] ← → [Qdrant Vector DB]
- ↓
- [Chat Processing (chatgroq_handler.py)] ← → [Fireworks AI]
- ↓
- [Google Drive Upload (google_drive_upload.py)]

##### Important Details

A. Data Flow Annotations:
- Command inputs (/summarize, /start quiz, etc.)
- Webhook event handling
- Transcript processing flow
- Storage and retrieval

B. Key Integration Points:
- Zoom API authentication
- Vector database connections
- LLM API calls
- Google Drive upload process

##### Architectural Patterns to Highlight

- Event-Driven Architecture: Webhook handling for Zoom events
- Service-Oriented Architecture: Separate handlers for different functionalities
- API Gateway Pattern: Flask server managing various external service interactions

##### Implementation Details

- app.py (Main Flask application)
- zoom_webhook_handler.py (Webhook processing)
- chatgroq_handler.py (AI chat processing)
- embedding_utils.py (Vector embeddings)
- google_drive_upload.py (File storage)
- zoom_auth.py (Authentication)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        ZC[Zoom Chat]
        ZW[Zoom Webhook]
    end

    subgraph Application
        FS[Flask Server]:::server
        WH[Webhook Handler]:::handler
        ZA[Zoom Auth Service]:::auth
        ZM[Message Service]:::message
    end

    subgraph "AI Processing"
        EP[Embedding Processor]:::ai
        CP[Chat/LLM Processor]:::ai
        VDB[(Qdrant Vector DB)]:::db
    end

    subgraph "External Services"
        ZAPI[Zoom API]:::external
        FAI[Fireworks AI]:::external
        GD[Google Drive]:::external
        LI[LlamaIndex]:::external
    end

    subgraph Storage
        TS[Transcript Storage]:::storage
        TD[Sample Transcript Data]:::storage
    end

    %% Connections
    ZC --> ZW
    ZW --> FS
    FS --> WH
    WH --> ZA
    ZA <--> ZAPI
    WH --> ZM
    ZM --> ZAPI
    
    WH --> EP
    EP <--> VDB
    EP --> CP
    CP <--> FAI
    CP --> LI
    
    WH --> TS
    TS --> TD
    WH --> GD

    %% Click Events
    click FS "https://github.com/meAmitPatil/Zoom-Learning-Assistant/blob/master/app.py"
    click WH "https://github.com/meAmitPatil/Zoom-Learning-Assistant/blob/master/zoom_webhook_handler.py"
    click ZA "https://github.com/meAmitPatil/Zoom-Learning-Assistant/blob/master/zoom_auth.py"
    click ZM "https://github.com/meAmitPatil/Zoom-Learning-Assistant/blob/master/send_zoom_message.py"
    click CP "https://github.com/meAmitPatil/Zoom-Learning-Assistant/blob/master/chatgroq_handler.py"
    click EP "https://github.com/meAmitPatil/Zoom-Learning-Assistant/blob/master/embedding_utils.py"
    click GD "https://github.com/meAmitPatil/Zoom-Learning-Assistant/blob/master/google_drive_upload.py"
    click TS "https://github.com/meAmitPatil/Zoom-Learning-Assistant/tree/master/transcripts/"
    click TD "https://github.com/meAmitPatil/Zoom-Learning-Assistant/blob/master/transcripts/transcript_intro_to_ml.txt"

    %% Styles
    classDef server fill:#90EE90
    classDef handler fill:#98FB98
    classDef auth fill:#3CB371
    classDef message fill:#98FB98
    classDef ai fill:#FFD700
    classDef external fill:#DDA0DD
    classDef db fill:#A9A9A9
    classDef storage fill:#B8860B

    %% Legend
    subgraph Legend
        L1[Application Services]:::server
        L2[AI Services]:::ai
        L3[External APIs]:::external
        L4[Storage]:::storage
        L5[(Database)]:::db
    end
```
