# jaya-naga-saikiran-vaddi/buildthoughts architecture

> Architecture diagram of the GitHub repository jaya-naga-saikiran-vaddi/buildthoughts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jaya-naga-saikiran-vaddi/buildthoughts
- Repository: https://github.com/jaya-naga-saikiran-vaddi/buildthoughts

## Overview

##### Project type and purpose
- This repository is a monorepo of four distinct Python-based applications (“micro-services” in a single repo):
1. HealthApp – a Flask-based health statistics web application
2. Tony Agent Email Clean Up – an AI-driven email classification and cleaning CLI/tool
3. Tony_Pdf_Chat_Bot – a PDF ingest + vector store + question-answering chatbot
4. tony_mcp_server_table_compare – a Streamlit app comparing MySQL/PostgreSQL tables

##### File structure
- Top-level directories correspond to four independent projects
- Each project follows a layered or pipeline pattern:
- HealthApp: config/, controller/, services/, repository/, static/, templates/
- Email Clean Up: config/, ai_classifier.py, email_cleaner.py, TonyAgentMailCleaner.py
- Pdf Chat Bot: PDFProcessor, VectorStoreManager, QAModel, ChatInterface, handlers
- Table Compare: main.py, controller.py, tools/(mysql, postgres, compare, report), utils/logger, streamlit_app.py
- Shared characteristics: config and logger modules, requirements.txt in each project

##### README
- Only contains “# BuildThoughts,” so there is no cross-project architecture description. We infer from filenames and directory names.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Monorepo"
        direction TB

        subgraph "HealthApp"
            direction TB
            HA_App["HealthStats.py (App Setup)"]:::ui
            HA_Config["config.py"]:::util
            HA_Logger["logger_config.py"]:::util
            HA_Exception["AppException.py"]:::util
            HA_UI_Templates["Templates"]:::ui
            HA_UI_Static["Static Assets"]:::ui
            HA_Controller["health_controller.py"]:::logic
            HA_Service["health_service.py"]:::logic
            HA_Repo["health_repository.py"]:::data
            HA_DB[(Database)]:::external
            HA_App -->|starts| HA_Controller
            HA_Controller -->|calls| HA_Service
            HA_Service -->|queries| HA_Repo
            HA_Repo -->|connects to| HA_DB
            HA_UI_Templates -->|renders| HA_App
            HA_UI_Static -->|serves| HA_App
            HA_Config --> HA_App
            HA_Config --> HA_Service
            HA_Logger --> HA_App
            HA_Logger --> HA_Service
            HA_Exception --> HA_Service
        end

        subgraph "Tony Agent Email Clean Up"
            direction TB
            TC_CLI["TonyAgentMailCleaner.py"]:::ui
            TC_Classifier["ai_classifier.py"]:::logic
            TC_Cleaner["email_cleaner.py"]:::logic
            TC_Config["Constants.py"]:::util
            TC_Logger["logger_config.py"]:::util
            TC_CLI -->|uses| TC_Classifier
            TC_Classifier -->|classifies| TC_Cleaner
            TC_Cleaner -->|outputs cleaned emails| TC_CLI
            TC_Config --> TC_Classifier
            TC_Config --> TC_Cleaner
            TC_Logger --> TC_Classifier
            TC_Logger --> TC_Cleaner
        end

        subgraph "Tony_Pdf_Chat_Bot"
            direction TB
            PC_BotRunner["PdfChatBot.py"]:::ui
            PC_ChatInterface["ChatInterface.py"]:::ui
            PC_PDFProcessor["PDFProcessor.py"]:::logic
            PC_VectorStore["VectorStoreManager.py"]:::data
            PC_QAModel["QAModel.py"]:::logic
            PC_mcpModel["mcpModel.py"]:::logic
            PC_mcpHandler["mcp_handler.py"]:::logic
            PC_Constants["Constants.py"]:::util
            PC_ChatInterface -->|sends query| PC_BotRunner
            PC_BotRunner -->|ingests PDF| PC_PDFProcessor
            PC_PDFProcessor -->|stores embeddings| PC_VectorStore
            PC_BotRunner -->|queries| PC_QAModel
            PC_QAModel -->|fetches from| PC_VectorStore
            PC_mcpModel -->|extends| PC_QAModel
            PC_mcpHandler -->|hooks into| PC_BotRunner
            PC_QAModel -->|responds| PC_ChatInterface
            PC_Constants --> PC_BotRunner
            PC_Constants --> PC_QAModel
        end

        subgraph "tony_mcp_server_table_compare"
            direction TB
            TC_UI["streamlit_app.py"]:::ui
            TC_Main["main.py"]:::ui
            TC_Controller["controller.py"]:::logic
            TC_MySQL["mysql_tool.py"]:::data
            TC_Postgres["postgres_tool.py"]:::data
            TC_Compare["compare_tool.py"]:::data
            TC_Report["report_tool.py"]:::data
            TC_Logger["logger.py"]:::util
            TC_Env["tony.env"]:::external
            TC_Main -->|launches| TC_UI
            TC_UI -->|calls| TC_Controller
            TC_Controller --> TC_MySQL
            TC_Controller --> TC_Postgres
            TC_MySQL -->|provides data| TC_Compare
            TC_Postgres -->|provides data| TC_Compare
            TC_Compare -->|generates diff| TC_Report
            TC_Report -->|displays| TC_UI
            TC_Logger --> TC_Controller
            TC_Env --> TC_UI
        end
    end

    %% Click Events
    click HA_Config "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/config/config.py"
    click HA_Logger "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/config/logger_config.py"
    click HA_Exception "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/Exception/AppException.py"
    click HA_App "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/HealthStats.py"
    click HA_Repo "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/repository/health_repository.py"
    click HA_Service "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/services/health_service.py"
    click HA_Controller "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/controller/health_controller.py"
    click HA_UI_Templates "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/templates/all_entries.html"
    click HA_UI_Templates "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/templates/healthView.html"
    click HA_UI_Static "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/static/healthInfo.css"
    click HA_UI_Static "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/HealthApp/static/styles.css"

    click TC_CLI "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony Agent Email Clean Up/TonyAgentMailCleanar.py"
    click TC_Classifier "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony Agent Email Clean Up/ai_classifier.py"
    click TC_Cleaner "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony Agent Email Clean Up/email_cleaner.py"
    click TC_Config "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony Agent Email Clean Up/config/Constants.py"
    click TC_Logger "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony Agent Email Clean Up/config/logger_config.py"

    click PC_ChatInterface "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony_Pdf_Chat_Bot/ChatInterface.py"
    click PC_PDFProcessor "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony_Pdf_Chat_Bot/PDFProcessor.py"
    click PC_VectorStore "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony_Pdf_Chat_Bot/VectorStoreManager.py"
    click PC_QAModel "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony_Pdf_Chat_Bot/QAModel.py"
    click PC_mcpModel "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony_Pdf_Chat_Bot/mcpModel.py"
    click PC_mcpHandler "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony_Pdf_Chat_Bot/mcp_handler.py"
    click PC_BotRunner "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony_Pdf_Chat_Bot/PdfChatBot.py"
    click PC_Constants "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/Tony_Pdf_Chat_Bot/Constants.py"

    click TC_UI "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/tony_mcp_server_table_compare/streamlit_app.py"
    click TC_Main "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/tony_mcp_server_table_compare/main.py"
    click TC_Controller "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/tony_mcp_server_table_compare/mcp_server/controller.py"
    click TC_MySQL "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/tony_mcp_server_table_compare/mcp_server/tools/mysql_tool.py"
    click TC_Postgres "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/tony_mcp_server_table_compare/mcp_server/tools/postgres_tool.py"
    click TC_Compare "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/tony_mcp_server_table_compare/mcp_server/tools/compare_tool.py"
    click TC_Report "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/tony_mcp_server_table_compare/mcp_server/tools/report_tool.py"
    click TC_Logger "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/tony_mcp_server_table_compare/mcp_server/utils/logger.py"
    click TC_Env "https://github.com/jaya-naga-saikiran-vaddi/buildthoughts/blob/Develop/tony_mcp_server_table_compare/tony.env"

    %% Styles
    classDef ui fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef logic fill:#90EE90,stroke:#333,stroke-width:1px
    classDef data fill:#FFA500,stroke:#333,stroke-width:1px
    classDef util fill:#D3D3D3,stroke:#333,stroke-width:1px
    classDef external fill:#F0E68C,stroke:#333,stroke-width:1px
```
