# zackriya-solutions/meeting-minutes architecture

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

- Interactive diagram: https://gitdiagram.com/zackriya-solutions/meeting-minutes
- Repository: https://github.com/zackriya-solutions/meeting-minutes

## Overview

##### Project Type & Purpose
- Recognize that this is a full-stack application designed for capturing live meeting audio, transcribing it in real-time, and generating summaries via AI.
- The solution emphasizes local processing (privacy-first), cost effectiveness, and support for multiple LLM providers as specified in the README.
- That the project involves components built with multiple languages and frameworks (Python, Rust, Next.js/Tauri, and C++).

##### Analyzing the File Structure
- Top-Level Directories:
– backend: Contains Python scripts (e.g., main.py, Process_transcrip.py, db.py) to run FastAPI servers, API documentation, shell scripts to manage processes, and a “whisper-custom” folder with C++ code (server.cpp) and supporting files indicating a custom transcription engine.
– frontend: Includes Next.js configuration, Tauri-specific sources (Rust code under src-tauri), and supporting scripts, indicating the desktop application and web UI aspects.
- Configuration and build files (e.g., package.json, requirements.txt, CMakeLists.txt) show the dependency management and build orchestration.

##### Extracting Additional Insights from the README
- The README explicitly outlines the high-level architectural components:
– Audio Capture Service: Built partly in Rust (experimental) and Python for capturing real-time audio.
– Transcription Engine: Uses Whisper.cpp for local transcription.
– LLM Orchestrator: Manages integration with external LLM providers (Anthropic, Groq, Ollama) with fallback mechanisms.
– Data Services: Includes ChromaDB for vector embeddings and SQLite for metadata storage.
– API Layer: Built with FastAPI to provide endpoints (upload, process, summary retrieval, deletion).
– Deployment Architecture: Frontend built as a Tauri app coupled with Next.js and backend with Python/FastAPI transcript workers.
- This detailed description gives you the logical components and their interactions.

a. Core Components:
- Frontend Component:
- Next.js/Tauri (Desktop and UI layer)
- Client-side components (meeting notes, audio controls, etc. from src/app and src/components)
- Backend Component:
- API Layer (FastAPI endpoints, process orchestration)
- Audio Capture Service (scripts, audio processing modules in Python/Rust)
- Transcription Engine (Whisper.cpp integration; C++ and Python scripts under whisper-custom and backend/app)
- LLM Orchestrator (manages interactions with Anthropic, Groq, and Ollama APIs)
- Data Services:
- Database(s): Likely SQLite for process tracking and possibly ChromaDB for transcript embeddings.
- External Dependencies & Configurations:
- External libraries like FFmpeg, Node.js, Python, Rust, and C++ compilers.
- Environment variables and API keys as indicated in the README (.env file requirements).

b. Relationships and Data Flow:
- Audio flow from the Audio Capture Service to the Transcription Engine.
- Transcription output flowing to the LLM Orchestrator for summarization.
- Client requests from the Frontend interacting with the Backend API Layer.
- Data movement between the Transcription Engine/LLM processes and Data Services for storage/retrieval.
- How the API layer orchestrates these services through endpoints (upload, process, summary).

c. Architectural Patterns and Design Principles:
- Separation of Concerns: Clearly separate presentation (frontend) from business logic (backend) and data storage (SQLite/ChromaDB).
- Modular Design: Independent components (audio capture, transcription, LLM processing) communicate via clearly defined APIs.
- Local Processing Emphasis: Privacy-first design where core AI processing happens locally.

d. Technologies/Frameworks:
- Frontend: Tauri (Rust), Next.js (React/TypeScript), Tailwind CSS.
- Backend: Python (FastAPI), Whisper.cpp, custom C++ components, shell scripts.
- Others: Rust for experimental audio capture; ChromaDB and SQLite for data management.

##### Final Recommendations
- Be as detailed as possible – don’t shy away from splitting the backend into multiple components (e.g., separate audio capture, transcription, and LLM orchestrator blocks).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend"
        UI["Frontend – UI/Client Layer"]:::frontend
        Desktop["Desktop App/Tauri Integration"]:::frontend
    end

    %% Backend Layer
    subgraph "Backend"
        API["API Layer (FastAPI)"]:::backend
        Audio["Audio Capture Service (Rust/Python)"]:::backend
        Transcription["Transcription Engine (Whisper.cpp)"]:::backend
        LLM["LLM Orchestrator"]:::backend
    end

    %% Data Services
    subgraph "Data Services"
        DB["SQLite/ChromaDB"]:::databases
    end

    %% Connections: UI and Desktop layer
    UI -->|"sendsRequests"| API
    Desktop -->|"integratesWith"| UI

    %% Backend Internal Flow
    API -->|"orchestratesAudio"| Audio
    Audio -->|"providesAudioData"| Transcription
    Transcription -->|"returnsTranscript"| API
    API -->|"triggersLLM"| LLM
    LLM -->|"sendsSummary"| API

    %% Data Storage Flow
    API -->|"storesData"| DB

    %% Click Events
    click UI "https://github.com/zackriya-solutions/meeting-minutes/tree/main/frontend/src/app"
    click UI "https://github.com/zackriya-solutions/meeting-minutes/tree/main/frontend/src/components"
    click Desktop "https://github.com/zackriya-solutions/meeting-minutes/tree/main/frontend/src-tauri"
    click API "https://github.com/zackriya-solutions/meeting-minutes/blob/main/backend/app/main.py"
    click API "https://github.com/zackriya-solutions/meeting-minutes/blob/main/backend/app/Process_transcrip.py"
    click API "https://github.com/zackriya-solutions/meeting-minutes/blob/main/backend/app/db.py"
    click Transcription "https://github.com/zackriya-solutions/meeting-minutes/blob/main/backend/whisper.cpp"
    click Transcription "https://github.com/zackriya-solutions/meeting-minutes/tree/main/backend/whisper-custom/server"
    click Audio "https://github.com/zackriya-solutions/meeting-minutes/tree/main/frontend/src-tauri/src/audio"
    click LLM "https://github.com/zackriya-solutions/meeting-minutes/blob/main/frontend/src-tauri/src/ollama.rs"

    %% Style Definitions
    classDef frontend fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef backend fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef databases fill:#fff3cd,stroke:#856404,stroke-width:2px;
```
