Architecture
jobjob is a Python package providing a command-line interface and a local webapp,
plus a bundled dashboard frontend.
Package layout
Module |
Role |
|---|---|
|
Central |
|
Auth, prompt/content/reference loaders, and static-file location.
|
|
AI orchestration: |
|
Typed domain models (job description, highlight, skill, template, …). |
|
The application-generation workflow (CLI verb |
|
Assisted browser auto-fill of a job application (CLI verb |
|
LinkedIn-profile ingestion into the contacts Sheet. |
|
Google Drive/Docs/Sheets I/O. |
|
CLI dispatcher ( |
|
The |
Adding another AI provider is a single new adapter under jobjob/ailib/client/.
How a run works
Five sequential Claude calls per application share one cached context prefix (résumé, STAR examples, cover-letter examples, background):
JD parse — extract role level, domain, required skills, location, requirements.
Highlight selection — pick the most relevant credential blocks for the role.
Résumé update — swap the objective and adjust emphasis on the Google Doc template via section-aware edits.
Cover-letter generation — assemble from the selected blocks, mirror JD language.
Skills analysis — gap check; flag anything not met or not honestly claimable.
Caching
Anthropic prompt cache — stable context is sent as a cached system prefix and reused across all five calls (ephemeral, ~5 min, extended by hits). Keep stable content at the top; variable content (JD, company) at the end.
Local file cache — SHA256-keyed under
CACHE_DIR, scoped by model so the same prompt under a different model never collides; skips identical prompts on re-runs. Toggle withCLAUDE_CACHE_ENABLED.
Webapp
A local dashboard (FastAPI backend + React frontend) manages the queue, launches jobs,
edits profile content, and reviews results. It binds to 127.0.0.1 only and protects
state-changing endpoints with a CSRF double-submit cookie. Its HTTP surface is documented
in the REST API Reference.
Every launched job (build, autofill, enrich, batch, schedule) is a run: an
in-memory job table drives live progress, but each run is also persisted as a
JSON record plus a log file under <applications input dir>/runs/ (see
webapp/backend/services/run_history.py), so history — including failures —
survives a backend restart instead of living only in memory. Listing merges
the persisted records with the live job table; a persisted run still marked
running with no live counterpart is reported failed (“interrupted”).
Records are bounded (oldest pruned beyond a retention cap) and, once a
finished run’s application is known, carry that application’s entity_id.
Application identity: three tiers
Each processed application (or contact) folder is modeled as three tiers, held together by one on-disk folder:
Entity —
metadata.json: a stableentity_id(uuid4, minted once and reused across every re-build/rename), status, and the notes changelog.Source —
source.json: the posting itself (company, role, description, and a file/web/external reference), written once at first build; a re-build reads it back rather than overwriting it, so a user correction (via Edit source) survives. Re-parse is the sanctioned exception — it deliberately overwrites company/role/description.Execution — the artifacts of one build:
summary.jsonplus the generated documents. The current execution lives at the folder root; prior executions kept on a re-build move intoarchive/<timestamp>/(a self-contained snapshot), manageable per-execution (note, lock/unlock against purge, promote back to root, purge unlocked).
A folder with neither entity_id nor source.json is legacy: it joins by
folder name exactly as before, and gains an id lazily on its next natural
write — no backfill.
Duplicate applications (same normalized company + role) are flagged
advisory-only; resolving one either merges the loser’s current and
archived executions into the survivor’s archive/ and unions its notes, or
deletes the loser outright. Both actions are always explicit, never
automatic (webapp/backend/services/dedup_service.py).
Running from source
Prerequisites: Python ≥ 3.12 and uv (or plain pip):
uv sync # create the venv and install dependencies
uv run --group test pytest # run the test suite
uv run ruff check . # lint
uv run --group docs sphinx-build -b html docs docs/build # build these docs
Run the webapp dev servers (two terminals):
# backend
cd webapp/backend && uvicorn main:app --host 127.0.0.1 --port 8000 --reload
# frontend
cd webapp/frontend && npm install && npm run dev
See webapp/README.md for details.