How filmozolevskiy/justapply works
Purpose and Entry Points
JustApply is a local, AI-assisted job-search system: scrape roles, persist and evaluate them against resume profiles, enrich viable leads with contacts, and manage applications on a Kanban dashboard. Primary entry points are the CLI (src/cli/__main__.py, src/cli/cli.py), FastAPI dashboard backend (src/web/run_dashboard.py, src/web/server.py), and orchestration layer (src/pipelines.py, src/service/just_apply.py).
Persistence and Safety Boundary
SQLite is the system of record, normally at data/just_apply.db. Database access, job lifecycle operations, migrations, caches, batch records, and user settings are separated under src/db/connection.py, src/db/jobs.py, src/db/job_model.py, and src/db/migrations.py. Destructive database operations pass through a safety gate and snapshots in src/safety/gate.py and src/safety/snapshot.py; this is an explicit protection boundary rather than a UI-only confirmation.
Search and Collection Pipeline
Search orchestration coordinates query/profile inputs, scraping, normalization, deduplication, storage, and later evaluation through src/pipelines.py and src/service/just_apply.py. Standard job acquisition uses Bright Data via src/core/scraper.py; LinkedIn/Apify-oriented source handling is represented by src/core/apify_linkedin_scraper.py and src/core/source_platform.py. Region and source-platform rules constrain collection through src/core/regions.py.
AI Evaluation and Admission Gates
Gemini evaluates job descriptions against resume data, producing match scores and summaries. Interactive matching is centered in src/core/matcher.py and src/core/gemini_client.py; bulk rounds submit and reconcile Gemini Batch API work via src/core/batch_evaluation.py, src/core/batch_poller.py, and persistent batch state in src/db/batch_jobs.py. src/core/evaluation_lock.py prevents overlapping evaluation rounds. Before jobs advance, deterministic and LLM-derived filters enforce attributes such as remote type, employment type, and annual salary through src/core/pre_evaluation/remote_type.py, src/core/attribute_gating.py, and src/core/annual_posted_salary.py.
Contact Enrichment and Outreach
Accepted or targeted jobs enter an enrichment workflow coordinated by src/core/enrichment/coordinator.py. It obtains and caches contact samples, classifies people (such as recruiter versus hiring contact), and generates connection/outreach material through src/core/enrichment/contact_sample.py, src/core/enrichment/classifier.py, and src/core/enrichment/connection_note.py. Apify is the paid external contact-discovery service; cost/spend confirmation and cached contacts limit unnecessary calls. Company research is a parallel enrichment capability, including Glassdoor intelligence, in src/core/company_research/preflight.py and src/core/company_research/glassdoor_intel.py.
Dashboard and User-Controlled Workflow
FastAPI exposes the local API and serves the single-page dashboard from src/web/server.py and src/web/dashboard.html. Browser-side modules maintain job state, render and manipulate Kanban lanes, and drive drawer/search/spend-confirmation interactions in src/web/static/js/jobStore.js, src/web/static/js/boardRenderer.js, and src/web/static/js/dashboardApp.js. The dashboard is a control surface over persisted jobs and pipeline actions, including archives, status movement, evaluation visibility, enrichment, and task-log refreshes.
Runtime and External Dependencies
The application runs locally as Python/FastAPI plus browser JavaScript, with SQLite for persistence. Material external boundaries are Gemini (matching, classification, batch evaluation, outreach text), Bright Data (job scraping), Apify (contact enrichment), and Glassdoor-oriented company research. Configuration comes from environment variables documented by .env.example; API credentials should remain outside the database and source tree.
Main entry points: pipelines.py Workflow orchestration · scraper.py Job collection · connection.py SQLite system of record · server.py Dashboard API
Components 19
Local entry points
- CLI · Runs local search and workflow commands.
src/cli/cli.py - Dashboard API · Serves the local API and dashboard.
src/web/server.py - Kanban dashboard · Controls jobs, pipeline actions, and task refreshes.
src/web/static/js/dashboardApp.js
Search and evaluation
- Workflow orchestration · Coordinates search, storage, evaluation, and lifecycle actions.
src/pipelines.py - Job collection · Applies region and source-platform rules before normalization.
src/core/scraper.py - Admission gates · Enforces remote, employment, and salary requirements.
src/core/attribute_gating.py - Interactive matching · Scores and summarizes jobs against resume profiles.
src/core/matcher.py - Batch evaluation · Submits and reconciles bulk Gemini evaluation rounds.
src/core/batch_evaluation.py - Evaluation lock · Prevents overlapping evaluation rounds.
src/core/evaluation_lock.py
Persistence and safety
- SQLite system of record · Stores jobs, lifecycle state, settings, caches, and batch records.
src/db/connection.py - Job lifecycle repository · Persists job states and workflow operations.
src/db/jobs.py - Migrations
src/db/migrations.py - Destructive-operation safety · Gates destructive database actions and creates snapshots.
src/safety/gate.py
Enrichment
- Contact enrichment · Caches contacts, classifies people, and drafts outreach.
src/core/enrichment/coordinator.py - Company research · Runs preflight and Glassdoor-oriented intelligence.
src/core/company_research/preflight.py
External services
- Gemini · Provides matching, classification, batch evaluation, and writing.
src/core/gemini_client.py - Bright Data
- Apify · Paid discovery is limited by spend confirmation and caches.
src/core/apify_linkedin_scraper.py - Glassdoor intelligence
src/core/company_research/glassdoor_intel.py
Connections 23
- CLI → Workflow orchestration: runs workflows
- Dashboard API → Workflow orchestration: triggers actions
- Kanban dashboard → Dashboard API: local API
- Workflow orchestration → Job collection: searches
- Job collection → Bright Data: scrapes roles
- Job collection → Apify: LinkedIn source
- Job collection → Job lifecycle repository: normalizes and stores
- Job lifecycle repository → SQLite system of record: reads and writes
- Migrations → SQLite system of record: updates schema
- Workflow orchestration → Admission gates: filters candidates
- Admission gates → Interactive matching: admits jobs
- Workflow orchestration → Evaluation lock: acquires round lock
- Evaluation lock → Batch evaluation: permits bulk round
- Batch evaluation → SQLite system of record: persists batch state
- Interactive matching → Gemini: evaluates jobs
- Batch evaluation → Gemini: submits and polls batches
- Workflow orchestration → Contact enrichment: enriches targeted jobs
- Contact enrichment → Apify: discovers contacts
- Contact enrichment → Gemini: classifies and drafts
- Workflow orchestration → Company research: researches companies
- Company research → Glassdoor intelligence: gathers intelligence
- Destructive-operation safety → SQLite system of record: protects destructive actions
- Dashboard API → Destructive-operation safety: routes destructive operations