# aihawk-foss/auto_jobs_applier_ai_agent architecture

> Architecture diagram of the GitHub repository aihawk-foss/auto_jobs_applier_ai_agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aihawk-foss/auto_jobs_applier_ai_agent
- Repository: https://github.com/aihawk-foss/auto_jobs_applier_ai_agent

## Overview

##### Main Components Identification

a) Core Components:
- LLM Integration Service (supports OpenAI, Ollama, Claude, Gemini)
- Resume Generator
- Cover Letter Generator
- Job Application Manager
- Data Management System

b) External Integrations:
- LLM API Services
- Browser Automation System
- File System Storage

**┌─ User Interface Layer ─────────────────────┐**
- main.py                     │
- ┬─────────────────────┬─┘

**┌─ Application Layer ┴─────────────────┐  │**
- ┌─ Job Management ─────┐             │  │
- job.py           │             │  │
- jobContext.py    │             │  │
- ┬┘             │  │
- ┌─ Resume/Cover Letter Generation ─┐ │  │
- resume_facade.py             │ │  │
- resume_generator.py          │ │  │
- ┬────────────┘ │  │
- ┼──────────────┘  │

**┌─ Service Layer ──────┴──────────────┐  │**
- ┌─ LLM Services ─────────────────┐  │  │
- llm_manager.py             │  │  │
- Multiple LLM Integrations  │  │  │
- ┘  │  │
- ┌─ Data Services ────────────────┐  │  │
- job_application_saver.py    │  │  │
- resume_schemas/            │  │  │
- ┘  │  │
- ┬──────────────┘  │

**┌─ Data Layer ─────────┴──────────────┐  │**
- data_folder/                     │  │
- Configuration Files              │◄─┘
- Templates                        │
- ┬┘

**┌─ External Services ────────────────┴─┐**
- OpenAI API                       │
- Ollama API                       │
- Claude API                       │
- Gemini API                       │
- ┘

##### Component Relationships

- Double lines: API communications

##### Technical Details to Highlight

- Python 3.10+ compatibility
- Browser automation integration
- File system interactions
- API security and rate limiting
- Template management system

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and classes
    classDef ui fill:#B3E5FC,stroke:#0288D1
    classDef core fill:#C8E6C9,stroke:#388E3C
    classDef service fill:#E1BEE7,stroke:#7B1FA2
    classDef data fill:#FFE0B2,stroke:#F57C00
    classDef external fill:#FFCDD2,stroke:#D32F2F
    classDef config fill:#CFD8DC,stroke:#455A64

    %% User Interface Layer
    subgraph UI["User Interface Layer"]
        Main["Main Application"]
    end

    %% Application Layer
    subgraph AppLayer["Application Layer"]
        subgraph JobMgmt["Job Management"]
            JobManager["Job Manager"]:::core
            JobContext["Job Context"]:::core
            JobSaver["Job Application Saver"]:::core
        end

        subgraph DocGen["Document Generation"]
            ResumeFacade["Resume Facade"]:::core
            ResumeGen["Resume Generator"]:::core
            CoverGen["Cover Letter Generator"]:::core
            StyleManager["Style Manager"]:::core
        end
    end

    %% Service Layer
    subgraph Services["Service Layer"]
        subgraph LLMServices["LLM Services"]
            LLMManager["LLM Manager"]:::service
            LLMResumeGen["LLM Resume Generator"]:::service
            LLMCoverGen["LLM Cover Letter Generator"]:::service
        end

        ChromeUtils["Browser Automation"]:::service
    end

    %% Data Layer
    subgraph DataLayer["Data Layer"]
        ResumeSchemas["Resume Schemas"]:::data
        DataFolder["Data Folder"]:::data
        Templates["Templates"]:::data
    end

    %% Configuration
    subgraph Config["Configuration"]
        ConfigFile["Configuration File"]:::config
        Secrets["Secrets"]:::config
        WorkPrefs["Work Preferences"]:::config
    end

    %% External Services
    subgraph External["External Services"]
        OpenAI["OpenAI API"]:::external
        Ollama["Ollama API"]:::external
        Claude["Claude API"]:::external
        Gemini["Gemini API"]:::external
    end

    %% Relationships
    Main --> JobManager
    Main --> ResumeFacade
    JobManager --> JobContext
    JobManager --> JobSaver
    ResumeFacade --> ResumeGen
    ResumeFacade --> CoverGen
    ResumeGen --> StyleManager
    CoverGen --> StyleManager
    ResumeGen --> LLMResumeGen
    CoverGen --> LLMCoverGen
    LLMResumeGen --> LLMManager
    LLMCoverGen --> LLMManager
    LLMManager --> OpenAI
    LLMManager --> Ollama
    LLMManager --> Claude
    LLMManager --> Gemini
    JobManager --> ChromeUtils
    ResumeGen --> ResumeSchemas
    DataFolder --> Templates
    ConfigFile --> Main
    Secrets --> LLMManager
    WorkPrefs --> JobManager

    %% Click events for component mapping
    click LLMManager "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/src/libs/llm_manager.py"
    click ResumeGen "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/src/libs/resume_and_cover_builder/resume_generator.py"
    click ResumeFacade "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/src/libs/resume_and_cover_builder/resume_facade.py"
    click LLMResumeGen "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/src/libs/resume_and_cover_builder/llm/llm_generate_resume.py"
    click LLMCoverGen "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/src/libs/resume_and_cover_builder/llm/llm_generate_cover_letter_from_job.py"
    click JobManager "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/src/job.py"
    click JobContext "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/src/jobContext.py"
    click JobSaver "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/src/job_application_saver.py"
    click ResumeSchemas "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/tree/main/src/resume_schemas/"
    click DataFolder "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/tree/main/data_folder/"
    click ChromeUtils "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/src/utils/chrome_utils.py"
    click ConfigFile "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/config.py"
    click Secrets "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/data_folder/secrets.yaml"
    click WorkPrefs "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/data_folder/work_preferences.yaml"
    click StyleManager "https://github.com/AIHawk-FOSS/Auto_Jobs_Applier_AI_Agent/blob/main/src/libs/resume_and_cover_builder/style_manager.py"
```
