# shynbui/meeting-minutes-generator architecture

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

- Interactive diagram: https://gitdiagram.com/shynbui/meeting-minutes-generator
- Repository: https://github.com/shynbui/meeting-minutes-generator

## Overview

##### Project Type and Purpose
- This is a lightweight full-stack application for generating meeting minutes from a transcript.
- It consists of a Python FastAPI backend (`app/`) that handles core logic (preprocessing, summarization via OpenAI/Gemini, export to Word) and a Gradio frontend (`ui/`) for user interaction.

##### File Structure Analysis
- Top-level:
- .env – environment variables for API keys
- run.py – script to spin up both FastAPI and Gradio (optional)
- requirements.txt – Python dependencies
- `app/`: FastAPI service
- main.py – FastAPI entry point
- config.py – global configuration (API keys, model parameters)
- modules/
– preprocessing.py
– summarizer.py
– exporter.py
– schema.py
- `ui/`: Gradio interface
- interface.py – launches web UI, takes user transcript, displays/downloads minutes

a. User Interface (Gradio)
b. API Layer (FastAPI)
c. Processing Modules (chain of internal services)
- Preprocessor
- Summarizer (calls external LLM API)
- Exporter (writes .docx via python-docx)
d. External Services
- OpenAI or Gemini API
e. Configuration/Environment (.env)

##### Relationships & Data Flow
1. User uploads/transcribes meeting via Gradio UI
2. UI sends transcript to FastAPI endpoint (“/generate”) over HTTP
3. FastAPI/main.py loads config.py, then orchestrates modules in sequence:
- preprocessing → summarization (external API call) → formatting/schema → exporter
4. Exporter returns a .docx file path or binary
5. FastAPI responds to UI with generated document
6. UI displays download link for the meeting minutes

##### Architectural Patterns & Design Principles
- Layered Architecture: UI → API → Business Logic modules → External API
- Single-responsibility modules (each does one step: preprocess, summarize, export)
- Configuration-driven (via config.py and .env)
- Stateless HTTP service; no persistent database

##### Essential Details to Capture
- File-generation step and delivery back to the UI.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        GradioUI["Gradio UI"]:::frontend
        SampleTranscript["Sample Transcript Input"]:::frontend
        Output["Generated Meeting Minutes Output"]:::frontend
    end

    %% Backend Layer
    subgraph "Backend Layer"
        RunScript["Run Script (run.py)"]:::config
        FastAPI["FastAPI Server<br>POST /generate"]:::backend
        Config["Config Loader<br>(config.py & .env)"]:::config
        Preprocessor["Preprocessor"]:::module
        Summarizer["Summarizer"]:::module
        Schema["Schema Processor"]:::module
        Exporter["Exporter"]:::module
    end

    %% External Services
    ExternalAPI["OpenAI/Gemini API"]:::external

    %% Data Flow
    SampleTranscript --> GradioUI
    GradioUI -->|"HTTP POST /generate"| FastAPI
    FastAPI --> Config
    FastAPI --> Preprocessor
    Preprocessor --> Summarizer
    Summarizer --> ExternalAPI
    ExternalAPI --> Summarizer
    Summarizer --> Schema
    Schema --> Exporter
    Exporter --> FastAPI
    FastAPI -->|"Response with .docx"| GradioUI
    GradioUI --> Output

    %% Optional Run Script Launch
    RunScript --> GradioUI
    RunScript --> FastAPI

    %% Click Events
    click GradioUI "https://github.com/shynbui/meeting-minutes-generator/blob/main/ui/interface.py"
    click FastAPI "https://github.com/shynbui/meeting-minutes-generator/blob/main/app/main.py"
    click Config "https://github.com/shynbui/meeting-minutes-generator/blob/main/app/config.py"
    click Config "https://github.com/shynbui/meeting-minutes-generator/blob/main/.env"
    click RunScript "https://github.com/shynbui/meeting-minutes-generator/blob/main/run.py"
    click Preprocessor "https://github.com/shynbui/meeting-minutes-generator/blob/main/app/modules/preprocessing.py"
    click Summarizer "https://github.com/shynbui/meeting-minutes-generator/blob/main/app/modules/summarizer.py"
    click Schema "https://github.com/shynbui/meeting-minutes-generator/blob/main/app/modules/schema.py"
    click Exporter "https://github.com/shynbui/meeting-minutes-generator/blob/main/app/modules/exporter.py"
    click SampleTranscript "https://github.com/shynbui/meeting-minutes-generator/blob/main/app/transcript.txt"
    click Output "https://github.com/shynbui/meeting-minutes-generator/blob/main/ui/generated_meeting_minutes.docx"

    %% Styles
    classDef frontend fill:#D0E8FF,stroke:#0366d6,color:#0366d6
    classDef backend fill:#DFFFE0,stroke:#2E8B57,color:#2E8B57
    classDef module fill:#E0FFE0,stroke:#228B22,color:#228B22
    classDef external fill:#FFEFD5,stroke:#FFA500,color:#FFA500
    classDef config fill:#F0F0F0,stroke:#A9A9A9,color:#555
```
