How ynkcc/auto_get_jobs works
Main Components
• Configuration Management: This covers the configuration files stored in the config directory (with YAML and JSON samples) and the ConfigManager module (src/utils/config_manager.py) that loads and manages these settings.
• Job Handling/Core Logic: The heart of the application revolves around job handling. This is implemented in src/job_handler.py and triggered from src/main.py. This component manages job search parameters, filtering out duplicate submissions, and managing application logic.
• AI Analysis: The AI component is responsible for generating greeting messages and assessing job-candidate compatibility. This can be found in src/utils/ai_analyzer.py.
• Session and Database Management: Managed by modules like SessionManager (src/utils/session_manager.py) and db_utils (src/utils/db_utils.py). These handle session persistence (cookie management and API sessions) and data storage/lookup using SQLite.
• MQTT/WS Client: The ws_client folder in src contains modules (like mqtt_websocket_mitmproxy.py and ws_client.py) for handling MQTT and WebSocket communications, which enables real-time messaging (e.g., heartbeats, external triggers, or further enhancements like handling resume image submissions).
• Utility Functions: General supportive functions are organized under src/utils/general.py, providing common operations.
• Testing Suite: The tests folder includes unit and integration tests that mimic various workflows (such as job detail retrieval, playwright demos, database tests, and even token bucket demos).
Relationships and Interactions
• The Configuration Manager initializes settings from the config files (copied from config_sample.yaml) and feeds relevant data (job parameters, API keys, etc.) to other modules.
• The Job Handler module uses these settings to construct queries, filter jobs based on search parameters (from both job_handler.py and tests), and call session utilities.
• The Session Manager and Database Utilities work together to manage network session reuse (via cookies or API sessions) and persist job data in SQLite. Note that the README even recommends a plugin (SQLite Viewer) for viewing the database.
• The AI Analyzer is invoked during the application process to generate or customize greeting messages based on job data.
• The MQTT Client (together with WebSocket patches) sends/receives external messages, integrates with the rest of the system, and in the future, is intended for functionalities beyond greeting and image resume sending.
• Testing is deeply integrated; tests simulate multiple workflows (playwright demos, async operations, parsing databases, etc.) to ensure all components interoperate correctly.
Architectural Patterns and Design Principles
• Modular Separation: The project is organized into clear modules for configuration, business logic (job searching and applying), utility functions, and external communication (MQTT/websockets). This separation supports maintainability and extensibility.
• Integration of External Libraries: Emphasize the use of third-party frameworks such as playwright (replacing selenium) for browser automation, SQLite for storage, and possibly Azure SDK or OpenAI’s API for AI functionalities.
Essential Elements
• Integration points: Lines showing how automated browser control (playwright) interacts with the main job application flow.