# feder-cr/jobs_applier_ai_agent_aihawk architecture

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

- Interactive diagram: https://gitdiagram.com/feder-cr/jobs_applier_ai_agent_aihawk
- Repository: https://github.com/feder-cr/jobs_applier_ai_agent_aihawk

## Overview

Based on our analysis of the file tree and README, the project is an AI-driven automated job application tool (Jobs_Applier_AIHawk) meant to help candidates generate tailored resumes and cover letters and submit job applications. The system revolves around orchestrating several distinct modules: configuration and data management, job processing, LLM-based document generation, and integration with external tools (such as web browsers like Chrome for interacting with application sites).

##### Project Type and Purpose
- The project is a full-stack automation tool for job applications that leverages AI and LLMs to generate resumes, cover letters, and parse job descriptions.
- According to the README, it is focused on automating aspects of the job-hunting process (e.g., resume/form filling) and interfacing with external APIs (OpenAI, Ollama, Gemini, etc.).
- Automation details include handling configuration through YAML files, managing secrets, and employing a dedicated folder structure for resume styles and templates.

##### Analyzing the File Structure
- Top-Level Structure: Notice the existence of configuration files (config.py, requirements.txt), main entry (main.py), example data (data_folder and data_folder_example), and comprehensive source code in the src folder.
- The “src” directory hosts core modules:
- Business logic files like job.py, jobContext.py, and job_application_saver.py.
- Libraries in src/libs/ which include the “llm_manager.py” and a full hierarchy of modules in resume_and_cover_builder, responsible for generating/resume parsing, cover letter generation, prompt management, style management, and utility functions.
- Logging and schema modules in src/resume_schemas.
- Utility files in src/utils that likely contain helper functions (e.g., chrome_utils, constants).

##### Architecture and Component Identification
- Main Components:
- Entry Point: main.py where the overall workflow initiates.
- Data and Configuration Management: config.py along with YAML configuration files (data_folder/plain_text_resume.yaml, data_folder/secrets.yaml, and work_preferences).
- Job Management: Modules like job.py, jobContext.py, and job_application_saver.py that control the job applications.
- LLM Management & Resume/Letter Generation: The “llm_manager” and modules within resume_and_cover_builder (including templating, prompt handling, and style management).
- Logging and Utilities: Organized in src/logging.py, src/utils, and resume_schemas to standardize processes and track activity.
- External Dependencies: Integration with external APIs (OpenAI, Ollama, etc.) and Chrome browser automation for interacting with job boards.

- Relationships and Interactions:
- main.py is the central orchestrator that loads configurations, reads input data from YAML files, and calls the relevant job and document generation modules.
- The “job” and “job_application” modules interact with user-provided data (resume YAML, secrets) and use LLM calls via the llm_manager and the resume_and_cover_builder components.
- The resume_and_cover_builder acts as a facade, calling specific submodules to generate resumes, cover letters, and process job description prompts.
- Configuration (config.py) determines the LLM endpoints and model types; it influences the behavior of the LLM modules.
- The README also mentions troubleshooting, which implies robust error handling and logging via the logging modules.

##### Notable Design Patterns and Technologies
- Facade Pattern: The resume_and_cover_builder directory effectively hides the internal complexity of resume generation behind a simpler API.
- Modular/Layered Architecture: There is clear separation among job processing, AI content generation, configuration management, and utility functions.
- Dependency Injection: Configurations are injected (via config.py and YAML files) into the LLM and job modules.
- External API Integration: The system’s design emphasizes communication with external services (LLM providers, Chrome for automation) using REST endpoints.
- Technologies: Python (for scripting and orchestration), YAML (for configuration), and various web-based tools mentioned in the README (such as Google Chrome and possibly APIs for LinkedIn alternatives).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Main Orchestration
    A["main.py (Orchestrator)"]:::entry

    %% Configuration & Data Management
    subgraph "Configuration & Data Management"
        B["config.py"]:::config
        C["data_folder (YAML Configs)"]:::config
    end

    %% Job Management
    subgraph "Job Management"
        D["job.py"]:::job
        E["jobContext.py"]:::job
        F["job_application_saver.py"]:::job
    end

    %% LLM & Document Generation
    subgraph "LLM & Document Generation"
        G["llm_manager.py"]:::llm
        H["resume_and_cover_builder"]:::llm
    end

    %% Logging & Utilities
    subgraph "Logging & Utilities"
        I["logging.py"]:::logging
        J["chrome_utils.py"]:::logging
    end

    %% External Services
    subgraph "External Services"
        K["LLM_API_Providers"]:::external
        L["Chrome_Browser"]:::external
    end

    %% Connections
    A -->|"loads"| B
    A -->|"loads"| C
    A -->|"triggers"| D
    A -->|"triggers"| E
    A -->|"triggers"| F
    A -->|"logs_to"| I

    D -->|"processes"| G
    E -->|"manages"| G
    F -->|"saves"| G

    G -->|"calls"| K
    H -->|"generates"| K

    D -->|"logs"| I
    E -->|"logs"| I
    F -->|"logs"| I

    J -->|"automates"| L

    %% Click Events
    click A "https://github.com/feder-cr/jobs_applier_ai_agent_aihawk/blob/main/main.py"
    click B "https://github.com/feder-cr/jobs_applier_ai_agent_aihawk/blob/main/config.py"
    click C "https://github.com/feder-cr/jobs_applier_ai_agent_aihawk/tree/main/data_folder"
    click D "https://github.com/feder-cr/jobs_applier_ai_agent_aihawk/blob/main/src/job.py"
    click E "https://github.com/feder-cr/jobs_applier_ai_agent_aihawk/blob/main/src/jobContext.py"
    click F "https://github.com/feder-cr/jobs_applier_ai_agent_aihawk/blob/main/src/job_application_saver.py"
    click G "https://github.com/feder-cr/jobs_applier_ai_agent_aihawk/blob/main/src/libs/llm_manager.py"
    click H "https://github.com/feder-cr/jobs_applier_ai_agent_aihawk/tree/main/src/libs/resume_and_cover_builder"
    click I "https://github.com/feder-cr/jobs_applier_ai_agent_aihawk/blob/main/src/logging.py"
    click J "https://github.com/feder-cr/jobs_applier_ai_agent_aihawk/blob/main/src/utils/chrome_utils.py"

    %% Styles
    classDef entry fill:#AEDFF7,stroke:#035388,stroke-width:2px;
    classDef config fill:#FFF79A,stroke:#B58600,stroke-width:2px;
    classDef job fill:#C1F7C5,stroke:#2D862D,stroke-width:2px;
    classDef llm fill:#FFD5A6,stroke:#FF8C00,stroke-width:2px;
    classDef logging fill:#D4A5A5,stroke:#A83232,stroke-width:2px;
    classDef external fill:#FAC9C9,stroke:#D03131,stroke-width:2px;
```
