# univac-1/meeting-ai-agent architecture

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

- Interactive diagram: https://gitdiagram.com/univac-1/meeting-ai-agent
- Repository: https://github.com/univac-1/meeting-ai-agent

## Overview

##### Main Components

- Frontend Application:
- Located under the apps/frontend directory.
- Built using TypeScript/React, with pages clearly laid out (e.g., 404, home, join, meeting, meetingInfo, meetingSchedule).
- Organized as page components alongside shared resources (common, components, router, store).

- Cloud Run Service:
- Located under the apps/cloudrun directory.
- Contains Python-based modules that implement various agents (feedback_agent, intervention_check_agent, etc.), services, and utility functions.
- Modules are responsible for tasks such as handling meeting data, managing AI functionalities (e.g., feedback and intervention operations), and updating service states.

- Deployment Infrastructure:
- GitHub Actions workflows are defined (in .github/workflows) for deploying both the Cloud Run backend and Firebase Hosted frontend.
- Additional config files such as firebase.json and Dockerfiles in both frontend and backend indicate containerized deployment.

- External Services:
- Firebase Hosting is used to serve the frontend.
- Cloud Run provides the backend service.

##### Relationships and Interactions

- Frontend-to-Backend Communication:
- The frontend interfaces with the Cloud Run service likely via REST APIs or similar endpoints (as indicated by the organization of both applications).

- Internal Component Interactions within the Cloud Run Service:
- Several Python modules in the “agent” directory work together (e.g., feedback_agent, intervention_check_agent) to process meeting-related events.

- Deployment Pipeline:
- GitHub Actions pipeline triggering deployments based on tag patterns (“b-“ for Cloud Run and “f-“ for Firebase).

##### Architectural Patterns and Technologies

- Architectural Patterns:
- Separation of concerns: Frontend is modularized by pages, and the backend is structured into agents and service modules.
- Containerization: Dockerfiles in both deployments suggest that both environments are containerized.
- Serverless/Managed Infrastructure: Utilizing Cloud Run and Firebase Hosting implies a serverless or managed services approach.

- Technologies/Frameworks:
- Frontend: React (with TypeScript), state management (Redux or similar store pattern), routing, and a well-organized component structure.
- Backend: Python for Cloud Run services, employing modules for business logic and agent interactions.
- Deployment: GitHub Actions for CI/CD automation, Firebase Hosting & Cloud Run as deployment targets.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Application Subgraph
    subgraph "Frontend Application"
        FA["Frontend Application"]:::frontend
        FP1["404 Page"]:::page
        FP2["Home Page"]:::page
        FP3["Join Page"]:::page
        FP4["Meeting Page"]:::page
        FP5["MeetingInfo Page"]:::page
        FP6["MeetingSchedule Page"]:::page
    end

    %% Cloud Run Service Subgraph
    subgraph "Cloud Run Service"
        CR["Cloud Run Service"]:::cloudrun
        FA_Agent["Feedback Agent"]:::agent
        FR_Agent["Feedback Repository"]:::agent
        FS_Agent["Feedback Service"]:::agent
        ICA_Agent["Intervention Check Agent"]:::agent
        IRS_Agent["Intervention Request Service"]:::agent
        IS_Agent["Intervention Service"]:::agent
        FC["Update Minutes Function"]:::agent
        MEET["Meeting Module"]:::module
        MSG["Message Module"]:::module
        MIN["Minutes Module"]:::module
    end

    %% Deployment / CI-CD Pipeline Subgraph
    subgraph "Deployment / CI-CD Pipeline"
        GH["GitHub Actions"]:::deploy
    end

    %% External Services Subgraph
    subgraph "External Services"
        FB["Firebase Hosting"]:::external
        CR_Env["Cloud Run Environment"]:::external
    end

    %% Relationships
    %% Frontend pages invoking the Cloud Run service via API calls
    FP1 -->|"API_call"| CR
    FP2 -->|"API_call"| CR
    FP3 -->|"API_call"| CR
    FP4 -->|"API_call"| CR
    FP5 -->|"API_call"| CR
    FP6 -->|"API_call"| CR

    %% Frontend container serving static assets via Firebase Hosting
    FA -->|"static_assets"| FB

    %% Internal Cloud Run module integration (illustrative)
    FA_Agent --> CR
    FR_Agent --> CR
    FS_Agent --> CR
    ICA_Agent --> CR
    IRS_Agent --> CR
    IS_Agent --> CR
    FC --> CR
    MEET --> CR
    MSG --> CR
    MIN --> CR

    %% Deployment pipeline connections
    GH -->|"deploy_f-"| FB
    GH -->|"deploy_b-"| CR_Env

    %% Click Events for Frontend Application
    click FA "https://github.com/univac-1/meeting-ai-agent/tree/main/apps/frontend"
    click FP1 "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/frontend/src/pages/404/index.tsx"
    click FP2 "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/frontend/src/pages/home/index.tsx"
    click FP3 "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/frontend/src/pages/join/index.tsx"
    click FP4 "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/frontend/src/pages/meeting/index.tsx"
    click FP5 "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/frontend/src/pages/meetingInfo/index.tsx"
    click FP6 "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/frontend/src/pages/meetingSchedule/index.tsx"

    %% Click Events for Cloud Run Service Components
    click CR "https://github.com/univac-1/meeting-ai-agent/tree/main/apps/cloudrun"
    click FA_Agent "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/cloudrun/agent/feedback_agent.py"
    click FR_Agent "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/cloudrun/agent/feedback_repository.py"
    click FS_Agent "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/cloudrun/agent/feedback_service.py"
    click ICA_Agent "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/cloudrun/agent/intervention_check_agent.py"
    click IRS_Agent "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/cloudrun/agent/intervention_request_service.py"
    click IS_Agent "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/cloudrun/agent/intervention_service.py"
    click FC "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/cloudrun/function_calling/update_minutes.py"
    click MEET "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/cloudrun/meeting/meeting.py"
    click MSG "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/cloudrun/message/message.py"
    click MIN "https://github.com/univac-1/meeting-ai-agent/blob/main/apps/cloudrun/minutes/minutes.py"

    %% Click Events for Deployment Pipeline
    click GH "https://github.com/univac-1/meeting-ai-agent/blob/main/.github/workflows/cloudrun-hosting.yml"
    click GH "https://github.com/univac-1/meeting-ai-agent/blob/main/.github/workflows/firebase-hosting.yml"

    %% Styles
    classDef frontend fill:#f9dada,stroke:#cc0000,stroke-width:2px;
    classDef page fill:#fae6a0,stroke:#e69500,stroke-width:2px;
    classDef cloudrun fill:#d4f4fa,stroke:#0077cc,stroke-width:2px;
    classDef agent fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px;
    classDef module fill:#d1c4e9,stroke:#512da8,stroke-width:2px;
    classDef deploy fill:#ffe0b2,stroke:#e65100,stroke-width:2px;
    classDef external fill:#bbdefb,stroke:#0d47a1,stroke-width:2px;
```
