# godsscion/auto_job_applier_linkedin architecture

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

- Interactive diagram: https://gitdiagram.com/godsscion/auto_job_applier_linkedin
- Repository: https://github.com/godsscion/auto_job_applier_linkedin

## Overview

##### Project type and purpose
- This is a Python-based automation and web-scraping “bot” that runs headless or visible Chrome sessions to search LinkedIn, filter and auto-answer Easy-Apply forms, generate tailored resumes via the OpenAI API, record successes/failures, and present a small Flask‐based UI for viewing applied-jobs history.

##### File structure
- Top level:
- app.py – Flask backend for the history/UI
- runAiBot.py – main entry point for the LinkedIn bot
- config/ – all user-facing configuration modules (personals, questions, search, secrets, settings, resume)
- modules/ – the core library of helpers, Chrome‐launchers, clickers, validators, AI connectors, resume extractors/generators, deprecated code
- templates/ – HTML template for the Flask UI
- setup/ – OS‐specific installation scripts
- requirements.txt – Python dependencies
- test.py – ad hoc test harness

##### Key insights from README
- The architecture is layered:
- Configuration → Validation → Orchestration (runAiBot) → Browser Automation → AI Resume Generation → Data Persistence → UI
- External integrations: LinkedIn web app, OpenAI API, ChromeDriver
- Data outputs: Excel files (applied_jobs.xlsx, failed_jobs.xlsx), screenshots, logs

##### Elements
- Blue for internal modules
- Green for configuration
- Yellow for persistence
- Gray for external services

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Layers
    subgraph "Frontend / UI Layer"
        direction TB
        UI["Flask UI<br/>(app.py)"]:::internal
        Template["templates/index.html"]:::internal
    end

    subgraph "Bot Layer"
        direction TB
        Orchestrator["Bot Orchestrator<br/>(runAiBot.py)"]:::internal

        subgraph "Configuration Loader & Validator"
            direction TB
            Config_Personals["personals.py"]:::config
            Config_Questions["questions.py"]:::config
            Config_Resume["resume.py"]:::config
            Config_Search["search.py"]:::config
            Config_Secrets["secrets.py"]:::config
            Config_Settings["settings.py"]:::config
            Validator["modules/validator.py"]:::internal
        end

        subgraph "Browser Automation Engine"
            direction TB
            OpenChrome["modules/open_chrome.py"]:::internal
            Clickers["modules/clickers_and_finders.py"]:::internal
            JSUnfollow["modules/javascript/unfollow_companies.js"]:::internal
        end

        subgraph "AI Integration Layer"
            direction TB
            OpenAIConn["modules/ai/openaiConnections.py"]:::internal
            DeepseekConn["modules/ai/deepseekConnections.py"]:::internal
            Prompts["modules/ai/prompts.py"]:::internal
        end

        subgraph "Resume Processor"
            direction TB
            Extractor["modules/resumes/extractor.py"]:::internal
            Generator["modules/resumes/generator.py"]:::internal
        end

        subgraph "Persistence & Logging"
            direction TB
            Helpers["modules/helpers.py"]:::persistence
            DataStore[(Excel & Logs)]:::persistence
        end
    end

    subgraph "External Services"
        direction TB
        LinkedIn[("LinkedIn Web App")]:::external
        OpenAIAPI[("OpenAI API")]:::external
    end

    subgraph "Installation Scripts"
        direction TB
        SetupSH["setup/setup.sh"]:::internal
        SetupBat["setup/windows-setup.bat"]:::internal
        SetupPS1["setup/windows-setup.ps1"]:::internal
    end

    %% Connections
    UI -->|HTTP request| DataStore
    Template -->|renders| UI

    Orchestrator -->|loads config| Config_Personals
    Orchestrator --> Config_Questions
    Orchestrator --> Config_Resume
    Orchestrator --> Config_Search
    Orchestrator --> Config_Secrets
    Orchestrator --> Config_Settings
    Config_Personals --> Validator
    Config_Questions --> Validator
    Config_Resume --> Validator
    Config_Search --> Validator
    Config_Secrets --> Validator
    Config_Settings --> Validator

    Validator -->|validates| Orchestrator
    Orchestrator -->|spawns Chrome| OpenChrome
    OpenChrome --> Clickers
    Clickers --> JSUnfollow
    Clickers -->|navigates & scrapes| LinkedIn
    Clickers -->|captures job info| Orchestrator

    Clickers -->|passes job data| Extractor
    Extractor --> Generator
    Generator -->|requests tailored resume| OpenAIConn
    OpenAIConn -->|API call| OpenAIAPI
    Prompts --> OpenAIConn
    DeepseekConn -->|optional lookup| OpenAIAPI

    Orchestrator -->|auto-fills forms| Clickers
    Clickers -->|writes status| Helpers
    Helpers --> DataStore
    Helpers -->|saves screenshots| DataStore

    UI -->|polls| DataStore

    %% Click Events
    click UI "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/app.py"
    click Template "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/templates/index.html"
    click Orchestrator "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/runAiBot.py"
    click Config_Personals "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/config/personals.py"
    click Config_Questions "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/config/questions.py"
    click Config_Resume "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/config/resume.py"
    click Config_Search "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/config/search.py"
    click Config_Secrets "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/config/secrets.py"
    click Config_Settings "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/config/settings.py"
    click Validator "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/modules/validator.py"
    click OpenChrome "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/modules/open_chrome.py"
    click Clickers "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/modules/clickers_and_finders.py"
    click JSUnfollow "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/modules/javascript/unfollow_companies.js"
    click OpenAIConn "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/modules/ai/openaiConnections.py"
    click DeepseekConn "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/modules/ai/deepseekConnections.py"
    click Prompts "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/modules/ai/prompts.py"
    click Extractor "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/modules/resumes/extractor.py"
    click Generator "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/modules/resumes/generator.py"
    click Helpers "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/modules/helpers.py"
    click SetupSH "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/setup/setup.sh"
    click SetupBat "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/setup/windows-setup.bat"
    click SetupPS1 "https://github.com/godsscion/auto_job_applier_linkedin/blob/main/setup/windows-setup.ps1"

    %% Styles
    classDef config fill:#a2f2a2,stroke:#333,stroke-width:1px
    classDef internal fill:#bee3f8,stroke:#333,stroke-width:1px
    classDef persistence fill:#f9e79f,stroke:#333,stroke-width:1px
    classDef external fill:#d5d8dc,stroke:#333,stroke-width:1px
```
