# skilledgamer101/job_notifiers_public architecture

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

- Interactive diagram: https://gitdiagram.com/skilledgamer101/job_notifiers_public
- Repository: https://github.com/skilledgamer101/job_notifiers_public

## Overview

##### Input Layer
- User Credentials (McMaster Email, Password)
- Notification Email Address
- Chromedriver Path
- Configuration Files (*.txt files for job tracking)

##### Core Components
- Main Notifier (notifier.py)
- Job Board Scrapers:
- OscarPlus Scraper (oscarplus.py)
- SSC Scraper (ssc.py)
- Mosaic SWP Scraper (mosaic_swp.py)
- Mosaic TA Scraper (mosaic_ta.py)

##### External Services
- Chrome WebDriver
- McMaster Authentication System (with 2FA)
- Job Board Websites
- Gmail API (EZGmail)

- [User Input/Config] → [Core System] → [External Services] → [Output]

##### Component Relationships

Specific Instructions for Drawing:

##### Top Layer (Input)
- Configuration files (*.txt) as persistent storage

##### Middle Layer (Core)
- Notifier.py in the center as the main orchestrator
- Four scraper modules (oscarplus.py, ssc.py, mosaic_swp.py, mosaic_ta.py) in a horizontal line below it
- Connections to their respective .txt files

##### External Services Layer
- Chrome WebDriver and McMaster Auth system on the left
- Job Board websites in the middle
- Gmail API on the right

##### Important flows
- Authentication flow through McMaster's 2FA
- Web scraping flow through ChromeDriver
- Data persistence flow to .txt files
- Email notification flow through Gmail API

Key Technical Details to Highlight:

##### Dependencies
- Selenium for web automation
- BeautifulSoup4 for HTML parsing
- EZGmail for email notifications
- PyInputPlus for user input handling

##### State Management
- How .txt files store job states
- Comparison logic between stored and new jobs

##### Authentication Flow
- 2FA phone call verification process
- Secure credential handling

Remember to:
- Notes about critical requirements (Chrome v117, 2FA setup)
- Error handling paths
- Automated scheduling capability through Windows Task Scheduler

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef input fill:#a8d1f0,stroke:#333
    classDef core fill:#90EE90,stroke:#333
    classDef external fill:#FFE4B5,stroke:#333
    classDef storage fill:#FFA07A,stroke:#333
    classDef auth fill:#FF6B6B,stroke:#333
    classDef output fill:#DDA0DD,stroke:#333

    %% Input Layer
    subgraph Input
        Creds[User Credentials]:::input
        Config[Configuration]:::input
        Driver["Chrome WebDriver"]:::input
    end

    %% Core System Layer
    subgraph CoreSystem
        Notifier["Main Notifier"]:::core
        
        subgraph Scrapers
            Oscar["OscarPlus Scraper"]:::core
            SSC["SSC Scraper"]:::core
            SWP["Mosaic SWP Scraper"]:::core
            TA["Mosaic TA Scraper"]:::core
        end
        
        subgraph Storage
            CoopTxt["Co-op Jobs"]:::storage
            SSCTxt["SSC Jobs"]:::storage
            SWPTxt["SWP Jobs"]:::storage
            TATxt["TA Jobs"]:::storage
        end
    end

    %% External Services Layer
    subgraph External
        ChromeD["Chrome Driver"]:::external
        McMaster["McMaster Auth"]:::auth
        JobSites["Job Board Sites"]:::external
        Gmail["Gmail API"]:::external
    end

    %% Output Layer
    Notification["Email Notifications"]:::output

    %% Relationships
    Creds --> Notifier
    Config --> Notifier
    Driver --> ChromeD
    
    Notifier --> Oscar
    Notifier --> SSC
    Notifier --> SWP
    Notifier --> TA
    
    Oscar --> CoopTxt
    SSC --> SSCTxt
    SWP --> SWPTxt
    TA --> TATxt
    
    Oscar & SSC & SWP & TA --> ChromeD
    ChromeD --> JobSites
    
    Oscar & SSC & SWP & TA --> McMaster
    
    Notifier --> Gmail
    Gmail --> Notification

    %% Click Events
    click Notifier "https://github.com/Skilledgamer101/job_notifiers_public/blob/main/notifier.py"
    click Oscar "https://github.com/Skilledgamer101/job_notifiers_public/blob/main/oscarplus.py"
    click SSC "https://github.com/Skilledgamer101/job_notifiers_public/blob/main/ssc.py"
    click SWP "https://github.com/Skilledgamer101/job_notifiers_public/blob/main/mosaic_swp.py"
    click TA "https://github.com/Skilledgamer101/job_notifiers_public/blob/main/mosaic_ta.py"
    click SSCTxt "https://github.com/Skilledgamer101/job_notifiers_public/blob/main/ssc.txt"
    click SWPTxt "https://github.com/Skilledgamer101/job_notifiers_public/blob/main/mosaic_swp.txt"
    click TATxt "https://github.com/Skilledgamer101/job_notifiers_public/blob/main/mosaic_ta.txt"
    click CoopTxt "https://github.com/Skilledgamer101/job_notifiers_public/blob/main/coop.txt"
    click ChromeD "https://github.com/Skilledgamer101/job_notifiers_public/blob/main/chromedriver.exe"

    %% Legend
    subgraph Legend
        L1["User Input"]:::input
        L2["Core Component"]:::core
        L3["External Service"]:::external
        L4["Storage"]:::storage
        L5["Authentication"]:::auth
        L6["Output"]:::output
    end
```
