# surapuramakhil-org/job_search_assistant architecture

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

- Interactive diagram: https://gitdiagram.com/surapuramakhil-org/job_search_assistant
- Repository: https://github.com/surapuramakhil-org/job_search_assistant

## Overview

##### Main Components
- Core Application (src/main.py): This is the entry point that orchestrates the overall workflow.
- Job Management & Automation: Modules such as src/job.py, src/job_manager.py, src/job_application.py, and src/job_applier.py handle job processing, application flow control, and data management.
- Portal-Specific Logic: Under src/job_portals (with submodules for general handling and specific implementations such as the lever folder), the code encapsulates interactions with different job portals—for instance, filling forms and navigating authenticators.
- AI and LLM Integration: The src/llm folder (with files like llm_manager.py and prompts.py) manages AI-powered responses and dynamic resume generation.
- Service Layer: src/services (including the web_search_engine) interacts with external APIs (e.g., Google Custom Search as seen in api_playground) and gathers additional data.
- Utilities and Helpers: Various utility modules (e.g., time_utils, string_utils) support operations like browser interactions (chrome_utils, browser_utils) and text processing.
- Configuration & Security: Files in the data_folder (YAML files for configuration such as plain_text_resume.yaml, secrets.yaml, and work_preferences.yaml) provide secured runtime configuration and personal data. The project also includes config.py and custom_exception handling.
- Logging & Error Handling: Modules like src/logger.py and src/custom_exception.py indicate that logging and rigorous error capture are integral to the design.
- Testing and Continuous Integration: The tests directory with both unit and integration tests, along with the GitHub workflows, reveals that automated testing and CI/CD are essential parts of the project lifecycle.

##### Relationships and Data Flow
- Start at the Main Application (src/main.py) which initializes configuration from YAML files (data_folder) and sets up logging.
- The Bot Facade (src/bot_facade.py) acts as an orchestrator between job management, portal interactions, and LLM services.
- Job Management Modules communicate with each other: a job manager schedules applications, while job application processing passes data onto individual portal handlers (located in src/job_portals).
- LLM Modules are responsible for dynamic text generation, resumes, and personalized recommendation. These components likely interact with external AI systems (as suggested by references in the README).
- The service layer and web search engine under src/services interact directly with external APIs (as configurable via the .env file) and support data enrichment.
- Utility layers are present for browser automation, indicating that tools like Google Chrome are external dependencies managed by the application.

##### Architectural Patterns and Design Principles
- Modularity: The code is well compartmentalized. Separate modules handle core logic (job management), portal-specific automation, AI interactions (LLM management), and utility functions.
- Separation of Concerns: Distinct directories for tests, documentation, configuration, and source code suggest the clean separation of responsibilities.
- Abstraction: Usage of a bot façade layer and service interfaces (for web search engines and job portals) shows the effort to abstract and decouple service-specific implementations.
- Automated Workflows: With CI/CD configurations and integrated test suites, the design encourages continuous testing and deployment practices.

## Diagram (Mermaid)

```mermaid
flowchart TD
    M["Testing & CI/CD"]:::testing
    A["Main Application"]:::core
    B["Config & Security"]:::config
    C["Logging & Error Handling"]:::config
    D["Bot Facade"]:::core

    subgraph "Job Management & Automation"
        E["Job Processing & Scheduling"]:::core
        F["Job Application Handling"]:::core
    end

    subgraph "Portal-Specific Logic"
        G["General Portal Framework"]:::core
        H["Lever Implementation"]:::core
    end

    I["LLM Integration"]:::core

    subgraph "Service Layer"
        J["Web Search Engine"]:::external
        K["API Playground"]:::external
    end

    L["Utilities & Helpers"]:::utility

    %% Data Flow
    M -.-> A
    A --> B
    A --> C
    B --> D
    C --> D
    D --> E
    D --> F
    F --> G
    F --> H
    D --> I
    D --> J
    D --> K
    L --> E
    L --> G

    %% Click Events
    click A "https://github.com/surapuramakhil-org/job_search_assistant/blob/main/src/main.py"
    click E "https://github.com/surapuramakhil-org/job_search_assistant/blob/main/src/job.py"
    click F "https://github.com/surapuramakhil-org/job_search_assistant/blob/main/src/job_application.py"
    click G "https://github.com/surapuramakhil-org/job_search_assistant/tree/main/src/job_portals"
    click H "https://github.com/surapuramakhil-org/job_search_assistant/tree/main/src/job_portals/lever"
    click I "https://github.com/surapuramakhil-org/job_search_assistant/tree/main/src/llm"
    click J "https://github.com/surapuramakhil-org/job_search_assistant/blob/main/src/services/web_search_engine.py"
    click K "https://github.com/surapuramakhil-org/job_search_assistant/tree/main/api_playground"
    click L "https://github.com/surapuramakhil-org/job_search_assistant/tree/main/src/utils"
    click B "https://github.com/surapuramakhil-org/job_search_assistant/tree/main/data_folder"
    click C "https://github.com/surapuramakhil-org/job_search_assistant/blob/main/src/logger.py"
    click M "https://github.com/surapuramakhil-org/job_search_assistant/tree/main/.github/workflows"

    %% Styles
    classDef core fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef external fill:#FFD580,stroke:#000,stroke-width:2px;
    classDef utility fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef config fill:#D8BFD8,stroke:#000,stroke-width:2px;
    classDef testing fill:#FFB6C1,stroke:#000,stroke-width:2px;
```
