Back to Projects
Doorknock
In-progressNext.jsTypeScriptNode.js+12 more

Doorknock

Finds job posts that match a freelancer's CV, works out which company is hiring, drafts a WhatsApp opener and a cover letter, and sends only what the freelancer approves.

Timeline

Oct 2026 - Present

Role

Full Stack Developer

Status
In-progress

Technology Stack

Next.js
TypeScript
Node.js
PostgreSQL
Drizzle ORM
better-auth
Tailwind CSS
shadcn/ui
Claude
MCP
Baileys (WhatsApp)
Docker
Fly.io
Neon
Vercel

Key Challenges

  • Job sites block plain requests, so Upwork, LinkedIn and Indeed are read through the user’s own agent in their own browser over MCP
  • Keeping one long-lived WhatsApp session per user alive across redeploys without asking anyone to rescan a QR code
  • Making sure nothing is sent without approval, and that sends stay inside daily caps, gaps and a warm-up period
  • Keeping every tenant’s data apart, down to row-level security in Postgres

Key Learnings

  • Splitting a product into a serverless web app and an always-on worker that talk over HMAC-signed requests
  • Encrypting credentials at rest with AES-256-GCM and rotating the keys online
  • Metering a multi-stage pipeline against per-user quotas and a platform budget
  • Defaulting every paid provider to fixtures so development never spends real credits

Overview

Doorknock helps a freelancer reach the person who is hiring instead of joining a queue of proposals. The freelancer saves a few searches and uploads a CV. Doorknock finds matching job posts, works out which company is behind each one, finds a number for it, and drafts a short WhatsApp opener and a cover letter. Nothing is ever sent without a click.

How a job moves through it

  1. Find job posts. The user's own agent reads Upwork, LinkedIn and Indeed in their browser (over MCP). The worker reads Hacker News, Remote OK, We Work Remotely, Jobicy and Himalayas itself.
  2. Score against the CV. Claude scores each post with the reasons written out. Posts below the minimum are skipped.
  3. Name the company, from the post, the client's reviews, or a web search.
  4. Find a number. The company website first, then a lookup provider's main line.
  5. Check WhatsApp. Leads whose number is on WhatsApp go first in the review queue.
  6. Draft a short opener and a cover letter.
  7. You approve. Sends respect a daily cap, a minimum gap and a do-not-contact list.
  8. After the send, replies are recorded and a follow-up is drafted for approval.

Fresh posts get priority: the posted time is stored, jobs under two hours old are labelled New, and automatic runs can go every hour.

Architecture

A monorepo with a clear line between the web app and the long-running work:

  • Web (apps/web): Next.js with better-auth, shadcn/ui and Tailwind v4, deployed on Vercel
  • Worker (apps/worker): an always-on Node service on Fly.io that holds the WhatsApp sessions, runs the pipeline jobs and exposes an internal API
  • Database (packages/db): Drizzle schema and migrations on Postgres (Neon)
  • Core (packages/core): framework-free logic for crypto, worker auth, providers and pipeline stages

A run walks five stages: fetch, analyze, enrich, poll phones and draft. Each stage reserves units against the user's quotas and the platform budget, and a run that hits a ceiling ends as quota_exceeded and says which one.

WhatsApp

Users link their own number with a QR code or a pairing code, like WhatsApp Web. The worker holds one socket per user, and the credentials and Signal keys live encrypted in Postgres, so a redeploy reconnects without rescanning. Sends go out with a random delay, a daily cap (5 a day in the first week, then 15), a minimum gap between sends and a platform kill switch.

Security

  • Upwork tokens, WhatsApp credentials and Signal keys are encrypted at rest with AES-256-GCM, bound to their table, column and owner, and the keys rotate online
  • The web app talks to the worker only over HMAC-signed requests
  • Every tenant table carries a user_id, every query is scoped to the signed-in user, and row-level security policies back that up in Postgres
  • Every HTML response carries a per-request nonce Content-Security-Policy, plus HSTS, nosniff and a restrictive Permissions-Policy
  • The audit trail stores phone numbers as an HMAC plus the last four digits, and messages as a SHA-256 hash
  • Worker logs are redacted: tokens, phone numbers, QR and pairing codes

Data and retention

Raw Upwork text is purged 24 hours after fetch, rejected and no-contact posts after 30 days, and contacts never messaged after 90 days. Users can download everything the account holds and delete the account, which logs the WhatsApp device out on the phone first.

Testing

Unit tests cover crypto, key rotation, pipeline stages and scheduling, with a database integration test for row-level security. Playwright runs the whole flow against fixture providers: sign-up, verification, onboarding, a first run, a blocked send without WhatsApp, export, and zero CSP violations.