Architecture overview¶
WFHeaven has four parts: profiles, job collection, matching, and delivery. A scheduled job runs collection, matching, and delivery once a day.
Each section says what's built today and what's still planned. Today's version serves the invite-only demo's testers, with CV upload and a database (Demo site plan). The maintainer is one of them.
What runs today¶
A GitHub Actions workflow runs once a day. A Cloudflare Cron Trigger starts it at 10:37 UTC, with GitHub's schedule as a fallback (Daily collection, Daily trigger):
flowchart LR
D[(D1: testers, keyed hashes of sent jobs)] -->|profiles and countries| C
F[Himalayas, Jobicy, Remote OK] -->|once a day| C[Collector + location labels]
C -->|job file, deleted after the run| R[Ranker, once per tester]
D -->|already sent| R
R -->|top 10, worth checking, near misses| E[Mailer: Resend]
E -->|one email each, with unsubscribe link| U[Each tester]
E -->|only after sending| D
No job data is kept after the run (ADR 0004), and the only thing remembered is a keyed hash of each job sent to a tester (ADR 0012, ADR 0013).
The demo site¶
Live: Phases 1 to 3
The invite-only demo, built in demo/, is live at wfheaven.app. All
three phases were deployed on 2026-12-05. See
Demo site.
Milestone 2 is an invite-only demo for 5 to 10 testers, hosted on
Cloudflare (ADR 0011).
A Worker at wfheaven.app serves the screens and the endpoints:
- Upload and feedback. The tester opens a personal invite link and uploads a CV, behind a bot check. The Worker sends it to Claude once, and shows the draft profile, remarks, and questions on a character sheet.
- Sign-up and daily picks. The tester chooses countries, AI-training gigs, and a minimum salary, and confirms an email address. Confirmed testers are stored in a D1 database in the EU. The daily GitHub Actions run collects once, ranks for each tester, and sends each one an email with an unsubscribe link (ADR 0013).
- The follow-up chat. Claude asks its questions one at a time, and each answer updates the profile. The conversation stays in the browser, and the CV is never sent again (ADR 0014).
The job data still never leaves the runner, and neither the CV nor the chat is stored (ADR 0012).
flowchart LR
T[Tester] -->|code, CV, chat, sign-up| W[Worker at wfheaven.app]
W -->|CV once, then chat messages| A[Claude API]
W <--> D[(D1, EU)]
F[Public job feeds] -->|daily| G[GitHub Actions: collect once, rank per tester]
D <-->|profiles, keyed hashes| G
G -->|one email per tester| R[Resend]
R --> T
See the Demo site plan for the endpoints, the limits, the email domain, and the phases.
Profiles¶
Built: profile file
Today the profile is a YAML file, profiles/gergely.yaml: target titles,
skills, languages, experience, minimum salary, excluded companies and
titles, and the countries you can work from (can_work_from). The
repository is public, so the file holds non-sensitive preferences only.
See Rank jobs.
Prototype: draft a profile from a CV
profiler/cv_to_profile.py runs on the maintainer's computer, not in
the daily workflow. It sends one CV from the git-ignored private/
folder to the Claude API once, and writes a draft profile, remarks, and
3 to 5 clarifying questions back to private/. It checks the draft with
the profile rules the ranker uses before saving it, and can compare it
with a hand-made profile. See
Draft a profile from a CV and
ADR 0010.
flowchart LR
CV[CV in private/] -->|once| A[Claude API: Sonnet 5.5]
A -->|draft, remarks, questions| V[Check with the profile rules]
V --> D[private/profile-draft.yaml]
D -->|the person reviews and edits| P[profiles/*.yaml]
Built: profiles from the demo site
A tester uploads a CV as PDF, Word, or text. The demo's Worker sends it to the Claude API, as the prototype does, and gets a structured profile: target roles, skills and tools, languages, words to avoid in job titles, and years of experience. The tester corrects it in the chat, then adds the countries they can work from, the AI-training choice, and a minimum salary at sign-up. The profile is stored in D1 in the same format as the profile file, and the daily run checks it with the same rules. See Demo site.
Planned
Editing the profile after sign-up. Today a tester unsubscribes and starts again with their CV.
Job collection¶
Built
The collector reads three sources: Himalayas, Jobicy, and Remote OK. From Himalayas it reads worldwide jobs and, with up to 10 more queries, jobs restricted to lists of countries that include the testers' countries (ADR 0008). See Run the collector. It runs once a day, together with the ranker, without keeping the jobs. See Daily collection.
Once a day, the collector reads new postings from job boards that publish feeds or APIs (see ADR 0002). For each posting it:
- Normalizes the fields: title, company, salary, posting date, link.
- Drops duplicates that appear on more than one board.
- Labels where the job can be done from (see ADR 0003).
Built: rule-based location labels
The collector combines each source's location field with the description.
It stores the scope (worldwide, restricted, or unclear), the allowed
countries and regions, any timezone requirement, and the sentence used as
evidence. A restriction in the description may narrow the source field.
When the rules can't read a location sentence safely, the job is
unclear, never a pass. No AI is used. An AI fallback for unclear jobs
is an open question, outside the daily run. See
How locations are labelled.
Matching¶
Built: rule-based ranking
The ranker scores jobs against one profile file with fixed rules and no AI, and keeps the best 10 with the reasons for each score. It runs in the daily workflow, which emails the picks. See Rank jobs and ADR 0005, which explains why ranking was built before location labelling.
The rule-based ranker works like this:
- Exclude. Removes jobs that were already picked, aren't open in every
country of the profile's
can_work_fromlist, come from excluded companies, have a senior or excluded title, ask for too many years of experience, pay too little, match no target title, or have an unclear location. - Score. Adds points for the best matching title, skills, languages, and level words, and takes points off when there's no salary.
- Keep the top 10, each with the keywords it matched, the experience it found, where it's open, and any timezone requirement as a Watch out line. Jobs that would be picks but have an unclear location go to a Worth checking list of up to three. Jobs with no target title but matching skills go to a list of up to five near misses.
The profile is a data file and ranking is a separate function, so supporting many users in Milestone 2 means loading many profiles, not rewriting the ranker.
Planned: may replace or add to the rules
Nothing below in this section is built.
The planned AI matching runs in two steps to keep costs low:
- Shortlist. A similarity search compares each user's profile with the day's postings and keeps about 50 per user. Jobs that break the user's location rule are removed here.
- Rank. An AI model reads the shortlist, picks the best 10, and writes one line on why each fits and one line on any catch.
Jobs a user has already received are never sent again.
Built: memory of picked jobs
The daily run remembers a keyed hash of every job it sends to a tester for 60 days and skips those jobs on later days. The hashes are in D1: no job data is stored, and a lost memory only causes a few repeats. See Remember picked jobs and ADR 0012.
Delivery¶
Built: one daily email per tester
The daily workflow emails each tester their picks, the jobs worth
checking, and the near misses with Resend's HTTP API, from
picks@wfheaven.app, with an "Unsubscribe and delete my data" link and
one-click unsubscribe headers. The memory is saved only after each email
is sent. A "test email" mode emails the maintainer from sample jobs. See
Daily email and
ADR 0007.
Stack¶
| Part | Today | Why |
|---|---|---|
| Code | Python: standard library, plus PyYAML for the profile | Small, no server to run |
| Daily job | GitHub Actions on a schedule | Free at this scale, same place as the code |
| Testers and memory of picks | Cloudflare D1 in the EU, read by the daily run over D1's HTTP API (ADR 0011) | The demo's database; keyed hashes only |
| Resend (ADR 0007) | Simple HTTP API, idempotency keys, ready for many users | |
| Docs | MkDocs Material on GitHub Pages | Docs-as-code, free hosting |
| CV to profile (local prototype) | Claude API, claude-sonnet-5-5, with Anthropic's Python SDK (ADR 0010) |
One call per CV; reads PDFs directly; structured output |
Demo stack¶
Built and live for the demo (ADR 0011):
| Part | Choice | Why |
|---|---|---|
| Site and server-side endpoints | Cloudflare Workers with static assets, in TypeScript | Free at this scale, keys stay server-side, and the domain is already at Cloudflare |
| Database | Cloudflare D1, EU jurisdiction | Free, encrypted at rest, reachable from GitHub Actions over HTTP |
| Bot check | Cloudflare Turnstile | Free, with unlimited checks |
Resend, from picks@wfheaven.app |
Already used; the domain is verified | |
| AI | Claude API: Sonnet 5.5 for the CV draft, Haiku 5.5 for the chat (ADR 0014) | A whole CV needs the stronger model; small profile edits don't |
| Daily job | GitHub Actions, Python | Unchanged; collects once and ranks per tester |