# ivanpetrushev/meeting-notes-extractor architecture

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

- Interactive diagram: https://gitdiagram.com/ivanpetrushev/meeting-notes-extractor
- Repository: https://github.com/ivanpetrushev/meeting-notes-extractor

## Overview

##### Main Components

a) Input Layer:
- Input S3 Bucket (for raw recordings)
- Input Plugins System
- Google Drive Plugin (implemented)
- Google Meet Bot Plugin (planned)
- Future plugins placeholder

b) Processing Layer:
- AWS Lambda Functions
- start_transcribe Lambda
- summarize Lambda
- AWS Services
- AWS Transcribe
- AWS Bedrock (Claude 3 Haiku)
- Intermediate S3 Bucket (for transcripts)

c) Output Layer:
- Output S3 Bucket (for processed notes)
- Output Plugins System
- Google Chat Plugin (implemented)
- Future plugins placeholder

**[Input Sources] → [Input Plugins] → [Core Processing] → [Output Plugins] → [Output Destinations]**

##### Key Elements to Highlight

- Rectangles: AWS Lambda functions
- Hexagons: AWS services (Transcribe, Bedrock)
- Rounded rectangles: Plugins
- Clouds: External services (Google Drive, Google Chat)

- Blue: AWS native services
- Green: Input components
- Orange: Processing components
- Purple: Output components
- Gray: Future/planned components

Following flows:
- Recording upload → Input S3
- Input S3 → start_transcribe Lambda
- start_transcribe Lambda → AWS Transcribe
- AWS Transcribe → Transcript S3
- Transcript S3 → summarize Lambda
- summarize Lambda → AWS Bedrock
- summarize Lambda → Output S3
- Output S3 → Output plugins

##### Important Details

- Infrastructure elements:
- Terraform managed components
- DynamoDB for state management
- IAM roles and permissions flow

- Plugin Architecture:
- Plugin extension points
- Demonstrate plugin independence
- Configuration flow

##### Technical Notes

- Technologies:
- Node.js (visible in package.json files)
- Terraform for IaC
- Docker for bot components
- AWS SDK integrations

##### Recommendations

- Brief annotations for complex flows
- Error handling paths
- Monitoring points

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Style definitions
    classDef aws fill:#FF9900,stroke:#232F3E,color:white
    classDef input fill:#85B09A,stroke:#232F3E,color:white
    classDef process fill:#FF6B6B,stroke:#232F3E,color:white
    classDef output fill:#B39DDB,stroke:#232F3E,color:white
    classDef planned fill:#E0E0E0,stroke:#232F3E,color:black
    
    %% Input Layer
    subgraph InputLayer["Input Layer"]
        GDrive["Google Drive"]:::input
        GMeet["Google Meet"]:::planned
        FutureIn["Future Sources"]:::planned
        
        subgraph InputPlugins["Input Plugins"]
            GDrivePlugin["Google Drive Plugin"]:::input
            GMeetPlugin["Google Meet Bot Plugin"]:::planned
            FutureInPlugins["Future Input Plugins"]:::planned
        end
        
        InputS3[("Input S3 Bucket")]:::aws
    end
    
    %% Processing Layer
    subgraph ProcessingLayer["Processing Layer"]
        StartTranscribe["Start Transcribe Lambda"]:::process
        Transcribe["AWS Transcribe"]:::aws
        TranscriptS3[("Transcript S3")]:::aws
        Summarize["Summarize Lambda"]:::process
        Bedrock["AWS Bedrock\nClaude 3 Haiku"]:::aws
    end
    
    %% Output Layer
    subgraph OutputLayer["Output Layer"]
        OutputS3[("Output S3")]:::aws
        
        subgraph OutputPlugins["Output Plugins"]
            GChatPlugin["Google Chat Plugin"]:::output
            FutureOutPlugins["Future Output Plugins"]:::planned
        end
        
        GChat["Google Chat"]:::output
    end
    
    %% Connections
    GDrive --> GDrivePlugin
    GMeet --> GMeetPlugin
    GDrivePlugin --> InputS3
    GMeetPlugin --> InputS3
    InputS3 --> StartTranscribe
    StartTranscribe --> Transcribe
    Transcribe --> TranscriptS3
    TranscriptS3 --> Summarize
    Summarize --> Bedrock
    Bedrock --> Summarize
    Summarize --> OutputS3
    OutputS3 --> GChatPlugin
    GChatPlugin --> GChat
    
    %% Click events
    click GDrivePlugin "https://github.com/ivanpetrushev/meeting-notes-extractor/tree/master/plugins/input/google-drive/"
    click GMeetPlugin "https://github.com/ivanpetrushev/meeting-notes-extractor/tree/master/plugins/input/google-meet-bot/"
    click GChatPlugin "https://github.com/ivanpetrushev/meeting-notes-extractor/tree/master/plugins/output/google-chat/"
    click StartTranscribe "https://github.com/ivanpetrushev/meeting-notes-extractor/blob/master/src/handlers/transcribe.js"
    click Summarize "https://github.com/ivanpetrushev/meeting-notes-extractor/blob/master/src/handlers/summarize.js"
    click Transcribe "https://github.com/ivanpetrushev/meeting-notes-extractor/blob/master/src/lib/transcribe.js"
    click Bedrock "https://github.com/ivanpetrushev/meeting-notes-extractor/blob/master/src/lib/bedrock.js"
    click InputS3 "https://github.com/ivanpetrushev/meeting-notes-extractor/blob/master/terraform/s3.tf"
    click TranscriptS3 "https://github.com/ivanpetrushev/meeting-notes-extractor/blob/master/terraform/s3.tf"
    click OutputS3 "https://github.com/ivanpetrushev/meeting-notes-extractor/blob/master/terraform/s3.tf"
```
