About

An AI lead qualification and ranking system that finds the best contacts at target companies against an ideal customer persona. Built as a technical challenge.

Contacts import from CSV, get qualified, then rank within their company. The ranking prompt optimises itself rather than being hand-tuned.

Key Features

  • Two-phase pipeline. Qualification runs first, then ranking, so cheap filtering happens before expensive comparison.
  • Automatic prompt optimisation. Beam search explores prompt variants instead of relying on hand-tuning.
  • Per-company ranking. Contacts rank within their own company rather than one global list, which keeps comparisons meaningful.
  • Background job abstraction. The same tasks run synchronously in development or through a queue in production.
  • Model flexibility. OpenRouter handles routing, so the model can change per task without touching code.
  • Safe defaults on AI failure. A model error degrades the result rather than breaking the pipeline.

Tech Stack

  • TypeScript
  • TanStack Start (SSR)
  • React 19
  • TanStack Router / Query / Table
  • ORPC
  • PostgreSQL
  • Drizzle ORM
  • OpenRouter
  • Trigger.dev
  • Jotai
  • shadcn/ui
  • Tailwind CSS 4
  • Turborepo + Bun workspaces

Video

Source Code

Screenshots