# kalpthakkar/jobpilot-ai architecture

> Architecture diagram of the GitHub repository kalpthakkar/jobpilot-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kalpthakkar/jobpilot-ai
- Repository: https://github.com/kalpthakkar/jobpilot-ai

## Overview

JobPilot AI automates job applications: a scheduler obtains queued URLs, drives a browser through page parsing and form completion, then reports success or failure. A separate startup path embeds user-profile data for semantic context used by prompt-based answers. The API and Gmail integration are documented capabilities; their internals were not sampled, so their connections are limited to documented or indexed evidence. Analytics are described in the README, but no analytics implementation path appears in the tree.

Main entry points: [`modules/core/form_filler.py`](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/form_filler.py) (Form completion), [`modules/core/job_manager.py`](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/job_manager.py) (Job scheduler), [`modules/job_server/job_api.py`](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/job_server/job_api.py) (Job API), [`main.py`](https://github.com/kalpthakkar/jobpilot-ai/blob/main/main.py) (Application startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Job orchestration"]
  node_main["Application startup<br/>[main.py]"]
  node_scheduler["Job scheduler<br/>[job_manager.py]"]
  node_env_config["Runtime configuration<br/>[env_config.py]"]
end

subgraph group_automation["Application automation"]
  node_web_engine["Application runner<br/>[web_engine.py]"]
  node_browser["Browser control<br/>[browser.py]"]
  node_interactor["Page interaction<br/>[web_interactor.py]"]
  node_parser["Page parsing<br/>[web_parser.py]"]
  node_form_filler["Form completion<br/>[form_filler.py]"]
  node_uploads["Document uploads<br/>[upload_manager.py]"]
  node_system_rules["Form rules<br/>[system_config.py]"]
  node_blacklists["Parsing filters<br/>[blacklist.py]"]
end

subgraph group_intelligence["AI and user context"]
  node_user_config["User profile"]
  node_embedding_pipeline["Profile embeddings<br/>[main.py]"]
  node_embedder["Document conversion<br/>[embedder.py]"]
  node_vectorstore_code["Vector operations<br/>[vectorstore.py]"]
  node_prompt_agent["Prompt answering<br/>[main.py]"]
  node_prompt_templates["Prompt templates"]
end

subgraph group_integrations["External integrations"]
  node_vector_db[("Profile vector store")]
  node_llm{{"Language model"}}
  node_gmail_fetcher["Email and OTP<br/>[otp_fetcher.py]"]
  node_gmail_service["Gmail service<br/>[gmail_service.py]"]
  node_gmail{{"Gmail API"}}
end

subgraph group_platform["Job management"]
  node_job_api["Job API<br/>[job_api.py]"]
  node_job_store[("Job queue and results<br/>[job_store.db]")]
end

node_job_seeker(("Job seeker"))

node_job_seeker -.->|"submits jobs"| node_job_api
node_job_api -.->|"tracks jobs"| node_job_store
node_main -->|"starts embedding"| node_embedding_pipeline
node_main -->|"starts scheduler"| node_scheduler
node_main -->|"excludes profile keys"| node_blacklists
node_scheduler -->|"requests next job"| node_job_api
node_scheduler -->|"reports outcome"| node_job_api
node_job_api -->|"returns job URL"| node_scheduler
node_scheduler -->|"runs application"| node_web_engine
node_web_engine -->|"opens page"| node_browser
node_web_engine -->|"drives page"| node_interactor
node_interactor -->|"parses page"| node_parser
node_interactor -->|"resolves fields"| node_form_filler
node_form_filler -->|"delegates uploads"| node_uploads
node_parser -->|"uses identifiers"| node_system_rules
node_parser -->|"filters elements"| node_blacklists
node_form_filler -->|"uses form rules"| node_system_rules
node_form_filler -->|"filters fields"| node_blacklists
node_form_filler -->|"requests answers"| node_prompt_agent
node_main -->|"reads settings"| node_env_config
node_embedding_pipeline -->|"converts profile"| node_embedder
node_embedding_pipeline -->|"stores embeddings"| node_vectorstore_code
node_vectorstore_code -->|"writes vectors"| node_vector_db
node_prompt_agent -->|"retrieves context"| node_vector_db
node_prompt_agent -->|"builds prompt"| node_prompt_templates
node_prompt_agent -->|"invokes model"| node_llm
node_env_config -->|"configures fetcher"| node_gmail_fetcher
node_gmail_fetcher -->|"uses service"| node_gmail_service
node_gmail_service -.->|"accesses messages"| node_gmail

click node_main "https://github.com/kalpthakkar/jobpilot-ai/blob/main/main.py"
click node_scheduler "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/job_manager.py"
click node_web_engine "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/web_engine.py"
click node_browser "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/browser.py"
click node_interactor "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/web_interactor.py"
click node_parser "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/web_parser.py"
click node_form_filler "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/form_filler.py"
click node_uploads "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/upload_manager.py"
click node_system_rules "https://github.com/kalpthakkar/jobpilot-ai/blob/main/config/system_config.py"
click node_blacklists "https://github.com/kalpthakkar/jobpilot-ai/blob/main/config/blacklist.py"
click node_user_config "https://github.com/kalpthakkar/jobpilot-ai/blob/main/config/user_data_config.py"
click node_embedding_pipeline "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/embeddings/main.py"
click node_embedder "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/embeddings/embedder.py"
click node_vectorstore_code "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/embeddings/vectorstore.py"
click node_prompt_agent "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/prompt_engine/main.py"
click node_prompt_templates "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/prompt_engine/prompt_templates.py"
click node_job_api "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/job_server/job_api.py"
click node_job_store "https://github.com/kalpthakkar/jobpilot-ai/blob/main/job_store.db"
click node_gmail_fetcher "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/gmail_reader/otp_fetcher.py"
click node_gmail_service "https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/gmail_reader/gmail_service.py"
click node_env_config "https://github.com/kalpthakkar/jobpilot-ai/blob/main/config/env_config.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_scheduler,node_env_config toneBlue
class node_web_engine,node_browser,node_interactor,node_parser,node_form_filler,node_uploads,node_system_rules,node_blacklists toneAmber
class node_user_config,node_embedding_pipeline,node_embedder,node_vectorstore_code,node_prompt_agent,node_prompt_templates toneMint
class node_vector_db,node_llm,node_gmail_fetcher,node_gmail_service,node_gmail toneRose
class node_job_api,node_job_store,node_job_seeker toneIndigo
```

## Components

### Job orchestration

- [Application startup](https://github.com/kalpthakkar/jobpilot-ai/blob/main/main.py): `main.py`
- [Job scheduler](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/job_manager.py): `modules/core/job_manager.py`
- [Runtime configuration](https://github.com/kalpthakkar/jobpilot-ai/blob/main/config/env_config.py): `config/env_config.py`

### Application automation

- [Application runner](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/web_engine.py): `modules/core/web_engine.py`
- [Browser control](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/browser.py): `modules/core/browser.py`
- [Page interaction](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/web_interactor.py): `modules/core/web_interactor.py`
- [Page parsing](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/web_parser.py): `modules/core/web_parser.py`
- [Form completion](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/form_filler.py): `modules/core/form_filler.py`
- [Document uploads](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/core/upload_manager.py): `modules/core/upload_manager.py`
- [Form rules](https://github.com/kalpthakkar/jobpilot-ai/blob/main/config/system_config.py): `config/system_config.py`
- [Parsing filters](https://github.com/kalpthakkar/jobpilot-ai/blob/main/config/blacklist.py): `config/blacklist.py`

### AI and user context

- [User profile](https://github.com/kalpthakkar/jobpilot-ai/blob/main/config/user_data_config.py): `config/user_data_config.py`
- [Profile embeddings](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/embeddings/main.py): `modules/embeddings/main.py`
- [Document conversion](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/embeddings/embedder.py): `modules/embeddings/embedder.py`
- [Vector operations](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/embeddings/vectorstore.py): `modules/embeddings/vectorstore.py`
- [Prompt answering](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/prompt_engine/main.py): `modules/prompt_engine/main.py`
- [Prompt templates](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/prompt_engine/prompt_templates.py): `modules/prompt_engine/prompt_templates.py`

### External integrations

- **Profile vector store**
- **Language model**
- [Email and OTP](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/gmail_reader/otp_fetcher.py): `modules/gmail_reader/otp_fetcher.py`
- [Gmail service](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/gmail_reader/gmail_service.py): `modules/gmail_reader/gmail_service.py`
- **Gmail API**

### Job management

- [Job API](https://github.com/kalpthakkar/jobpilot-ai/blob/main/modules/job_server/job_api.py): `modules/job_server/job_api.py`
- [Job queue and results](https://github.com/kalpthakkar/jobpilot-ai/blob/main/job_store.db): `job_store.db`

### Other components

- **Job seeker**

## Connections

- Job seeker → Job API: submits jobs (evidence: `README.md`)
- Job API → Job queue and results: tracks jobs (evidence: `README.md`)
- Application startup → Profile embeddings: starts embedding (evidence: `main.py`)
- Application startup → Job scheduler: starts scheduler (evidence: `main.py`)
- Application startup → Parsing filters: excludes profile keys (evidence: `main.py`)
- Job scheduler → Job API: requests next job (evidence: `modules/core/job_manager.py`)
- Job scheduler → Job API: reports outcome (evidence: `modules/core/job_manager.py`)
- Job API → Job scheduler: returns job URL (evidence: `modules/core/job_manager.py`)
- Job scheduler → Application runner: runs application (evidence: `modules/core/job_manager.py`)
- Application runner → Browser control: opens page (evidence: `modules/core/web_engine.py`)
- Application runner → Page interaction: drives page (evidence: `modules/core/web_engine.py`)
- Page interaction → Page parsing: parses page (evidence: `modules/core/web_interactor.py`)
- Page interaction → Form completion: resolves fields (evidence: `modules/core/web_interactor.py`)
- Form completion → Document uploads: delegates uploads (evidence: `modules/core/form_filler.py`)
- Page parsing → Form rules: uses identifiers (evidence: `modules/core/web_parser.py`)
- Page parsing → Parsing filters: filters elements (evidence: `modules/core/web_parser.py`)
- Form completion → Form rules: uses form rules (evidence: `modules/core/form_filler.py`)
- Form completion → Parsing filters: filters fields (evidence: `modules/core/form_filler.py`)
- Form completion → Prompt answering: requests answers (evidence: `modules/core/form_filler.py`)
- Application startup → Runtime configuration: reads settings (evidence: `main.py`)
- Profile embeddings → Document conversion: converts profile (evidence: `modules/embeddings/main.py`)
- Profile embeddings → Vector operations: stores embeddings (evidence: `modules/embeddings/main.py`)
- Vector operations → Profile vector store: writes vectors (evidence: `modules/embeddings/vectorstore.py`)
- Prompt answering → Profile vector store: retrieves context (evidence: `modules/prompt_engine/main.py`)
- Prompt answering → Prompt templates: builds prompt (evidence: `modules/prompt_engine/main.py`)
- Prompt answering → Language model: invokes model (evidence: `modules/prompt_engine/main.py`)
- Runtime configuration → Email and OTP: configures fetcher (evidence: `config/env_config.py`)
- Email and OTP → Gmail service: uses service (evidence: `modules/gmail_reader/otp_fetcher.py`)
- Gmail service → Gmail API: accesses messages (evidence: `README.md`)
