# mrak47anand007/email_timesheet_automation architecture

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

- Interactive diagram: https://gitdiagram.com/mrak47anand007/email_timesheet_automation
- Repository: https://github.com/mrak47anand007/email_timesheet_automation

## Overview

##### Main Components

a) Frontend Layer:
- PyQt5 GUI Components
- Task Management Dashboard
- Settings Window
- MoM Management Interface

b) Core Application Layer:
- Task Processing Engine
- Email Generation System
- MoM Generation System
- Database Interface

c) External Integration Layer:
- Power Automate Webhook Connection
- Microsoft 365 Integration
- Email System Integration

**[GUI Layer]**
- ↕
**[Core Application Layer]**
- ↕
**[External Services Layer]**

##### Detailed Component Breakdown

For the GUI Layer, show:
- Main TaskApp window (TaskApp.py)
- Settings window (SettingWindow.py)
- Version history component (VersionHistory.py)

For the Core Application Layer, represent:
- Database configuration (dbConfig.py)
- HTML email generator (htmlGenerator.py)
- MoM signature handler (momSignature.py)
- MoM settings manager (mom_setting.py)

For the External Services Layer, include:
- Power Automate webhook
- Microsoft 365 Timesheet System
- Email Service

##### Data Flow Representation

- User input flow from GUI to core components
- Data persistence flow to/from SQLite database
- External communication with Power Automate webhook
- Email and timesheet update processes

##### Component Relationships

Clear connections between:
- Task Management → Database
- Task Management → Email Generation
- Settings → Configuration Storage
- MoM Management → Email Generation
- All Components → Power Automate Webhook

##### Additional Notes

- Keep the main workflow (Task → Email → Timesheet) prominent
- Automation pipeline
- Clear separation between local operations and external services
- Future AI/ML integration points as planned components

This system design should effectively communicate both the current functionality and the planned future enhancements while maintaining clarity about the core automation purpose of the application.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef gui fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef external fill:#e74c3c,stroke:#c0392b,color:white
    classDef database fill:#f1c40f,stroke:#f39c12,color:black
    classDef future fill:#9b59b6,stroke:#8e44ad,color:white

    %% GUI Layer
    subgraph GUI
        TaskDash["Task Management Dashboard"]:::gui
        Settings["Settings Window"]:::gui
        VersionHist["Version History"]:::gui
        MoMInterface["MoM Management Interface"]:::gui
    end

    %% Core Application Layer
    subgraph Core
        TaskEngine["Task Processing Engine"]:::core
        EmailGen["Email Generation System"]:::core
        MoMGen["MoM Generation System"]:::core
        DBInterface["Database Interface"]:::core
        MoMSettings["MoM Settings Manager"]:::core
        HTMLGen["HTML Email Generator"]:::core
        MoMSig["MoM Signature Handler"]:::core
    end

    %% External Integration Layer
    subgraph External
        PowerAuto["Power Automate Webhook"]:::external
        MS365["Microsoft 365 Integration"]:::external
        EmailSys["Email System"]:::external
    end

    %% Database
    DB[(SQLite Database)]:::database

    %% Relationships
    TaskDash --> TaskEngine
    TaskEngine --> DBInterface
    DBInterface --> DB
    Settings --> MoMSettings
    MoMInterface --> MoMGen
    MoMGen --> MoMSig
    MoMSig --> EmailGen
    EmailGen --> HTMLGen
    HTMLGen --> EmailSys
    TaskEngine --> PowerAuto
    PowerAuto --> MS365

    %% Future Integration (dotted lines)
    AIMLIntegration["Future AI/ML Integration"]:::future
    TaskEngine -.-> AIMLIntegration
    AIMLIntegration -.-> EmailGen

    %% Click Events
    click TaskDash "https://github.com/MrAk47Anand007/Email_TimeSheet_Automation/blob/main/Email_and_Timesheet_Automation/TaskApp.py"
    click Settings "https://github.com/MrAk47Anand007/Email_TimeSheet_Automation/blob/main/Email_and_Timesheet_Automation/SettingWindow.py"
    click VersionHist "https://github.com/MrAk47Anand007/Email_TimeSheet_Automation/blob/main/Email_and_Timesheet_Automation/VersionHistory.py"
    click DBInterface "https://github.com/MrAk47Anand007/Email_TimeSheet_Automation/blob/main/Email_and_Timesheet_Automation/dbConfig.py"
    click HTMLGen "https://github.com/MrAk47Anand007/Email_TimeSheet_Automation/blob/main/Email_and_Timesheet_Automation/htmlGenerator.py"
    click MoMSig "https://github.com/MrAk47Anand007/Email_TimeSheet_Automation/blob/main/Email_and_Timesheet_Automation/momSignature.py"
    click MoMSettings "https://github.com/MrAk47Anand007/Email_TimeSheet_Automation/blob/main/Email_and_Timesheet_Automation/mom_setting.py"

    %% Legend
    subgraph Legend
        L1["GUI Components"]:::gui
        L2["Core Components"]:::core
        L3["External Services"]:::external
        L4["Database"]:::database
        L5["Future Integration"]:::future
    end
```
