How satvik8954/job-pilot works
Purpose and entry points
JobPilot is a local, automated job-application pipeline: collect listings, evaluate them against a candidate resume, generate per-job application PDFs, and record/notify on strong matches. Primary execution paths are CLI stage runners, scheduled execution, FastAPI triggers, and a Streamlit dashboard: scraper/run.py, run_matcher.py, run_tailor.py, scheduler/daily_runner.py, api/main.py, dashboard/app.py.
1. Job ingestion and persistence
The scraper searches LinkedIn Jobs and Wellfound using Playwright, with Firecrawl described as fallback. Listings are modeled as typed job records, deduplicated by URL hash, and persisted to PostgreSQL. The database helper is shared across pipeline stages, making Postgres the durable boundary between independently runnable stages.
Paths: scraper/playwright_scraper.py, scraper/models.py, scraper/db.py, schema.sql.
2. Matching graph: resume-to-job assessment
The matcher converts the source resume into structured profile data, embeds both resume/job-description text using all-MiniLM-L6-v2, and applies cosine-similarity prefiltering before LLM scoring. Eligible listings are scored by Anthropic Claude with match reasons and skill-gap output; score/status results return to Postgres. LangGraph defines the stage’s stateful node flow.
Paths: matcher/resume_parser.py, matcher/embedder.py, matcher/llm_scorer.py, matcher/graph.py.
3. Tailoring graph and artifact generation
The tailoring stage selects highly scored jobs, invokes Claude to rewrite resume content and create a three-paragraph cover letter, then renders HTML templates to PDFs. It has its own LangGraph workflow, supporting stage-level state/resume behavior. Generated artifacts are filesystem outputs, while the underlying application/job state remains database-backed.
Paths: tailor/graph.py, tailor/resume_tailor.py, tailor/cover_letter.py, tailor/pdf_exporter.py, tailor/templates/resume_template.html.
4. Application tracking and notifications
After strong matches are tailored, the tracker writes application records to Google Sheets through gspread and sends Telegram notifications. These are outward-facing side effects and should occur after successful matching/tailoring persistence rather than serving as pipeline state.
Paths: tracker/sheets_tracker.py, tracker/telegram_bot.py.
5. Orchestration and scheduling
Stages are intentionally runnable separately as well as in daily sequence. The scheduler uses APScheduler to execute the full scrape → match → tailor → track path daily. LangGraph governs matcher/tailor internals; the scheduler is the top-level recurring control plane.
Paths: scheduler/daily_runner.py, matcher/graph.py, tailor/graph.py.
6. Operational interfaces
FastAPI exposes job/status retrieval plus background triggers for scrape, match, and tailor operations. Streamlit provides an operator-facing dashboard over the same persisted job state. These interfaces should orchestrate existing stage runners rather than duplicate agent logic.
Paths: api/main.py, dashboard/app.py.
Runtime and integration boundaries
The core runtime is Python 3.11+ with PostgreSQL, Playwright/Chromium, LangGraph, sentence-transformers, ChromaDB, Anthropic Claude, and pdfkit backed by the external wkhtmltopdf binary. Optional external integrations are Google Sheets/Drive service-account APIs and Telegram Bot API. Docker Compose exists for local infrastructure support.
Paths: requirements.txt, docker-compose.yml, .env.example.
Main entry points: schema.sql PostgreSQL · tailor/graph.py Tailoring graph · matcher/graph.py Matching graph · daily_runner.py Daily scheduler
Components 22
Control surfaces
- Daily scheduler · Runs the full daily pipeline.
scheduler/daily_runner.py - FastAPI triggers · Starts stages in background and exposes job status.
api/main.py - Streamlit dashboard
dashboard/app.py
Ingestion
- Scrape runner
scraper/run.py - Job scraper · Searches LinkedIn Jobs and Wellfound, with Firecrawl fallback.
scraper/playwright_scraper.py - Typed job records · Deduplicates listings by URL hash.
scraper/models.py
Matching
- Matcher runner
run_matcher.py - Resume parser · Converts the source resume into structured candidate data.
matcher/resume_parser.py - Embedding prefilter · Embeds resume and job text, then applies cosine similarity.
matcher/embedder.py - ChromaDB
- Matching graph · Coordinates stateful assessment nodes.
matcher/graph.py - Claude match scorer · Produces match score, reasons, and skill gaps.
matcher/llm_scorer.py
Tailoring
- Tailor runner
run_tailor.py - Tailoring graph · Selects high-scoring jobs and supports resumable stage state.
tailor/graph.py - Resume rewrite
tailor/resume_tailor.py - Cover letter generator · Creates a three-paragraph cover letter.
tailor/cover_letter.py - PDF exporter · Renders templates through pdfkit and wkhtmltopdf.
tailor/pdf_exporter.py - Application PDFs
Tracking
- Application tracker · Runs after tailored application state is persisted.
tracker/sheets_tracker.py - Google Sheets
- Telegram Bot API
tracker/telegram_bot.py
Other components
- PostgreSQL · Shared boundary between independently runnable stages.
schema.sql
Connections 29
- Daily scheduler → Scrape runner: daily start
- Daily scheduler → Matcher runner: daily sequence
- Daily scheduler → Tailor runner: daily sequence
- Daily scheduler → Application tracker: daily sequence
- FastAPI triggers → Scrape runner: trigger
- FastAPI triggers → Matcher runner: trigger
- FastAPI triggers → Tailor runner: trigger
- Streamlit dashboard → PostgreSQL: job state
- Scrape runner → Job scraper: runs
- Job scraper → Typed job records: listings
- Typed job records → PostgreSQL: deduplicated jobs
- Matcher runner → Matching graph: runs
- PostgreSQL → Matching graph: jobs and status
- Resume parser → Matching graph: candidate profile
- Embedding prefilter → Matching graph: eligible matches
- Embedding prefilter → ChromaDB: vectors
- Matching graph → Claude match scorer: score eligible jobs
- Claude match scorer → PostgreSQL: scores and gaps
- Tailor runner → Tailoring graph: runs
- PostgreSQL → Tailoring graph: high-scoring jobs
- Tailoring graph → Resume rewrite: tailored resume
- Tailoring graph → Cover letter generator: cover letter
- Resume rewrite → PDF exporter: resume HTML
- Cover letter generator → PDF exporter: letter HTML
- PDF exporter → Application PDFs: PDF files
- Tailoring graph → PostgreSQL: application state
- PostgreSQL → Application tracker: tailored applications
- Application tracker → Google Sheets: application records
- Application tracker → Telegram Bot API: strong-match alerts