# crazyprash007/meeting-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/crazyprash007/meeting-analyzer
- Repository: https://github.com/crazyprash007/meeting-analyzer

## Overview

##### Project type and purpose
- This is a full-stack web application called “Meeting Analyzer.”
- Purpose: allow users to upload meeting audio, transcribe it, translate, summarize, extract action items, and export results as PDFs.

##### File structure
Top-level division:
- frontend/ – React single-page app (components, pages, API client)
- backend/  – FastAPI service (api, core, db, services)
- backend/data/ – SQLite database file
- backend/assets/, scripts/, run.py, main.py, requirements.txt
Key patterns:
- “backend/app/api” holds endpoint definitions (meetings.py)
- “backend/app/services” contains business logic (AI integrations, PDF gen)
- “backend/app/db” wraps database connection and models
- “frontend/src/services/api.js” centralizes HTTP calls to the backend

##### Pull additional insights from the README
- Frontend uses React + Material-UI
- Backend uses FastAPI + SQLite, plus external AI services: AssemblyAI & Cohere
- PDF generation via ReportLab
- Demo mode vs. production mode behavior

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client"
        direction TB
        ReactSPA["React SPA"]:::frontend
        EntryPoint["index.js"]:::frontend
        MainComp["App.js"]:::frontend
        UIComponents["UI Components"]:::frontend
        APIClient["api.js"]:::frontend
        subgraph "Pages"
            direction TB
            HomePage["HomePage.js"]:::frontend
            MeetingsListPage["MeetingsListPage.js"]:::frontend
            MeetingDetailPage["MeetingDetailPage.js"]:::frontend
            UploadPage["UploadPage.js"]:::frontend
            UserProfile["UserProfile.js"]:::frontend
        end
    end

    %% Server Layer
    subgraph "Server"
        direction TB
        FastAPIGateway["FastAPI Gateway"]:::backend
        RunScript["run.py"]:::backend
        CoreConfig["config.py"]:::backend
        APIMeetings["meetings.py"]:::backend
        DatabaseWrapper["database.py"]:::backend
        subgraph "Services"
            direction TB
            AssemblyAIService["assembly_ai.py"]:::backend
            CohereService["cohere_analysis.py"]:::backend
            PDFGenerator["pdf_generator.py"]:::backend
        end
    end

    %% External Services
    subgraph "External Services"
        direction TB
        AssemblyAI["AssemblyAI"]:::external
        Cohere["Cohere"]:::external
    end

    %% Data Storage
    subgraph "Data Storage"
        direction TB
        SQLiteDB["meetings.db"]:::storage
        UploadsFS["Uploads Folder"]:::storage
        PDFsFS["PDFs Folder"]:::storage
        FontsAssets["Fonts Assets"]:::storage
    end

    %% Utility & Config
    UtilityScripts["scripts/"]:::backend
    Requirements["requirements.txt"]:::backend
    PackageJSON["package.json"]:::frontend

    %% User interaction
    User["User"]:::external
    User -->|uploads audio, views data| ReactSPA
    ReactSPA -->|renders via| EntryPoint
    EntryPoint --> MainComp
    MainComp --> UIComponents
    MainComp --> APIClient
    MainComp --> HomePage
    MainComp --> MeetingsListPage
    MainComp --> MeetingDetailPage
    MainComp --> UploadPage
    MainComp --> UserProfile

    %% Frontend to Backend
    APIClient -->|REST calls| FastAPIGateway
    FastAPIGateway -->|routes to| APIMeetings
    FastAPIGateway -->|config via| CoreConfig

    %% API to Services
    APIMeetings -->|calls| AssemblyAIService
    APIMeetings -->|calls| CohereService
    APIMeetings -->|calls| PDFGenerator
    AssemblyAIService -->|transcribe| AssemblyAI
    CohereService -->|summarize/extract| Cohere
    PDFGenerator -->|uses fonts| FontsAssets

    %% Persistence
    AssemblyAIService -->|store transcript| SQLiteDB
    CohereService -->|store summary| SQLiteDB
    PDFGenerator -->|store PDF| PDFsFS
    APIMeetings -->|store metadata| UploadsFS

    %% Utility & Config links
    FastAPIGateway --> UtilityScripts
    FastAPIGateway --> Requirements
    ReactSPA --> PackageJSON

    %% Click events
    click ReactSPA "https://github.com/crazyprash007/meeting-analyzer/tree/main/frontend/"
    click EntryPoint "https://github.com/crazyprash007/meeting-analyzer/blob/main/frontend/src/index.js"
    click MainComp "https://github.com/crazyprash007/meeting-analyzer/blob/main/frontend/src/App.js"
    click UIComponents "https://github.com/crazyprash007/meeting-analyzer/tree/main/frontend/src/components/"
    click APIClient "https://github.com/crazyprash007/meeting-analyzer/blob/main/frontend/src/services/api.js"
    click HomePage "https://github.com/crazyprash007/meeting-analyzer/blob/main/frontend/src/pages/HomePage.js"
    click MeetingsListPage "https://github.com/crazyprash007/meeting-analyzer/blob/main/frontend/src/pages/MeetingsListPage.js"
    click MeetingDetailPage "https://github.com/crazyprash007/meeting-analyzer/blob/main/frontend/src/pages/MeetingDetailPage.js"
    click UploadPage "https://github.com/crazyprash007/meeting-analyzer/blob/main/frontend/src/pages/UploadPage.js"
    click UserProfile "https://github.com/crazyprash007/meeting-analyzer/blob/main/frontend/src/pages/UserProfile.js"
    click FastAPIGateway "https://github.com/crazyprash007/meeting-analyzer/blob/main/backend/app/main.py"
    click RunScript "https://github.com/crazyprash007/meeting-analyzer/blob/main/backend/run.py"
    click APIMeetings "https://github.com/crazyprash007/meeting-analyzer/blob/main/backend/app/api/meetings.py"
    click CoreConfig "https://github.com/crazyprash007/meeting-analyzer/blob/main/backend/app/core/config.py"
    click DatabaseWrapper "https://github.com/crazyprash007/meeting-analyzer/blob/main/backend/app/db/database.py"
    click AssemblyAIService "https://github.com/crazyprash007/meeting-analyzer/blob/main/backend/app/services/assembly_ai.py"
    click CohereService "https://github.com/crazyprash007/meeting-analyzer/blob/main/backend/app/services/cohere_analysis.py"
    click PDFGenerator "https://github.com/crazyprash007/meeting-analyzer/blob/main/backend/app/services/pdf_generator.py"
    click FontsAssets "https://github.com/crazyprash007/meeting-analyzer/tree/main/backend/assets/fonts/"
    click SQLiteDB "https://github.com/crazyprash007/meeting-analyzer/blob/main/backend/data/meetings.db"
    click UtilityScripts "https://github.com/crazyprash007/meeting-analyzer/tree/main/backend/scripts/"
    click Requirements "https://github.com/crazyprash007/meeting-analyzer/blob/main/backend/requirements.txt"
    click PackageJSON "https://github.com/crazyprash007/meeting-analyzer/blob/main/frontend/package.json"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef backend fill:#90EE90,stroke:#000,stroke-width:1px
    classDef external fill:#FFA500,stroke:#000,stroke-width:1px
    classDef storage fill:#D3D3D3,stroke:#000,stroke-width:1px
```
