# phunkybob/meeting-minutes architecture

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

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

## Overview

##### Project Type and Purpose
- This is a full-stack application where the “frontend” is implemented as a Streamlit dashboard (launched via main.py) and the “backend” encompasses business logic, transcription analysis, and database interactions.
- Key external dependencies include AssemblyAI (for transcription) and LeMUR (for analysis).

##### File Structure
- Top-level files: main.py serves as the entry point, and configuration files (Dockerfile, docker-compose.yml, .env.sample, pyproject.toml) indicate containerization and dependency management.
- The meeting_minutes directory contains core components:
- database.py: likely handles the SQLite database initialization and session management via SQLAlchemy.
- models.py: defines ORM models for data consistency.
- repository.py: abstracts data access operations.
- services.py: holds business logic or orchestrates operations between transcription, analysis, and storage.
- tab_history.py, tab_new.py, tab_prompts.py, tabs.py: handle different view components in the interactive interface.
- The tests directory verifies that repository and services functions are working as expected.

##### Elements
- UI to Services (user actions triggering logic).
- Services to Repository and vice versa (for data storage/retrieval).
- Services to External APIs (for transcription and analysis).
- Containerization element (Docker) as an additional layer “wrapping” the application components.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Docker Container encapsulating the application
    subgraph "Docker Container"
        direction TB
        UI["Streamlit Dashboard (main.py)"]:::ui
        subgraph "UI Layer"
            direction TB
            TabHistory["Tab History (tab_history.py)"]:::ui
            TabNew["Tab New (tab_new.py)"]:::ui
            TabPrompts["Tab Prompts (tab_prompts.py)"]:::ui
            TabsNavigator["Tabs Navigator (tabs.py)"]:::ui
        end

        subgraph "Business Logic Layer"
            direction TB
            Services["Services (services.py)"]:::logic
        end

        subgraph "Data Access Layer"
            direction TB
            Repository["Repository (repository.py)"]:::data
            Models["ORM Models (models.py)"]:::data
        end

        subgraph "Persistence Layer"
            direction TB
            Database["SQLite DB (database.py)"]:::persistence
        end
    end

    %% External Services not inside Docker container
    subgraph "External Services"
        direction TB
        AssemblyAI["AssemblyAI Transcription"]:::external
        LeMUR["LeMUR Analysis"]:::external
    end

    %% Testing Framework
    subgraph "Testing"
        direction TB
        TestRepo["Test Repository (tests/test_repository.py)"]:::test
        TestServices["Test Services (tests/test_services.py)"]:::test
    end

    %% Interactions between components
    UI -->|"User input"| TabHistory
    UI -->|"User input"| TabNew
    UI -->|"User input"| TabPrompts
    UI -->|"Navigation"| TabsNavigator

    TabHistory -->|"Triggers"| Services
    TabNew -->|"Triggers"| Services
    TabPrompts -->|"Triggers"| Services
    TabsNavigator -->|"Updates view"| UI

    Services -->|"Orchestrates"| Repository
    Services -->|"Uses"| Models
    Repository -->|"Reads/Writes"| Database

    Services -->|"Calls"| AssemblyAI
    Services -->|"Calls"| LeMUR

    %% Click Events for UI Layer
    click UI "https://github.com/phunkybob/meeting-minutes/blob/main/main.py"
    click TabHistory "https://github.com/phunkybob/meeting-minutes/blob/main/meeting_minutes/tab_history.py"
    click TabNew "https://github.com/phunkybob/meeting-minutes/blob/main/meeting_minutes/tab_new.py"
    click TabPrompts "https://github.com/phunkybob/meeting-minutes/blob/main/meeting_minutes/tab_prompts.py"
    click TabsNavigator "https://github.com/phunkybob/meeting-minutes/blob/main/meeting_minutes/tabs.py"

    %% Click Event for Business Logic
    click Services "https://github.com/phunkybob/meeting-minutes/blob/main/meeting_minutes/services.py"

    %% Click Events for Data Access Layer
    click Repository "https://github.com/phunkybob/meeting-minutes/blob/main/meeting_minutes/repository.py"
    click Models "https://github.com/phunkybob/meeting-minutes/blob/main/meeting_minutes/models.py"

    %% Click Event for Persistence Layer
    click Database "https://github.com/phunkybob/meeting-minutes/blob/main/meeting_minutes/database.py"

    %% Click Events for Containerization & Deployment Nodes
    %% Representing container/deployment files in a separate subgraph note
    subgraph "Deployment Files" 
        direction TB
        Dockerfile["Dockerfile"]:::deploy
        DockerCompose["docker-compose.yml"]:::deploy
        EnvSample[".env.sample"]:::deploy
        PyProject["pyproject.toml"]:::deploy
    end
    UI --- Dockerfile
    UI --- DockerCompose
    UI --- EnvSample
    UI --- PyProject

    %% Click Events for Testing
    click TestRepo "https://github.com/phunkybob/meeting-minutes/blob/main/tests/test_repository.py"
    click TestServices "https://github.com/phunkybob/meeting-minutes/blob/main/tests/test_services.py"

    %% Styles
    classDef ui fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef logic fill:#ABEBC6,stroke:#229954,stroke-width:2px;
    classDef data fill:#F9E79F,stroke:#D4AC0D,stroke-width:2px;
    classDef persistence fill:#F5CBA7,stroke:#CA6F1E,stroke-width:2px;
    classDef external fill:#F7DC6F,stroke:#B7950B,stroke-width:2px;
    classDef deploy fill:#D2B4DE,stroke:#8E44AD,stroke-width:2px;
    classDef test fill:#FADBD8,stroke:#E74C3C,stroke-width:2px;
```
