CandidLens

Docs · Get started

Quickstart

Clean machine → first scored candidate. Every command below was run and verified on Windows 11 and macOS with Node 22 / pnpm 11.

0. Prerequisites

ToolVersionCheck with
Node.js20+ (CI runs 22)node --version
pnpm11.xpnpm --version
Docker Desktoprecentdocker --version
Gitrecent—
A model API key or OllamaOptional: needed only for scoring, rubric drafting and Ask—

Enable pnpm via corepack (ships with Node): corepack enable. Nothing installs globally — every dependency lives in per-project node_modules, resolved from the committed lockfile.

1. Clone and install

git clone https://github.com/abhay-yemekar/candidlens.git
cd candidlens
pnpm install

Ends with Done in a few minutes (~1 GB of packages on first run). If pnpm asks to approve build scripts, run pnpm approve-builds, select the listed packages, and re-run pnpm install.

2. Start the database

cp .env.example .env
docker compose up -d postgres
docker compose ps

Starts only hirelens-postgres — Postgres 16 with pgvector, on port 5433 (deliberately offset from any local 5432). Status shows Up (healthy) after ~10 s.

Compose reads the root .env and refuses to start anything while BETTER_AUTH_SECRET is empty, even when you start only Postgres. The example value is enough for now. A bare docker compose up -d also starts the API and web containers.

3. Configure the environment

cp packages/db/.env.example packages/db/.env

Local-dev defaults work as-is. The BETTER_AUTH_SECRET in the example file is dev-only — generate a real one with openssl rand -base64 32 for anything beyond local experimentation. OAuth variables are optional; empty means disabled.

4. Configure a model (optional)

cp apps/api/.env.example apps/api/.env

The API dev server runs from apps/api and loads this file when it starts. Uncomment and set:

  • CANDIDLENS_LLM_PROVIDER: google, anthropic, groq, openrouter, mistral, cerebras or ollama.
  • CANDIDLENS_LLM_MODEL: a model id your provider serves, e.g. gemini-3.5-flash-lite for google.
  • CANDIDLENS_LLM_API_KEY: your provider's key. Every provider except Ollama needs one.
  • CANDIDLENS_LLM_BASE_URL: required for Ollama, e.g. http://localhost:11434/v1.

The API checks these when it starts. It stops with an error if the provider and model aren't set together, a hosted provider has no key, or Ollama has no base URL. For the Docker stack in step 7, put the same lines in the root .env. Failover and the retry budget are in Configuration.

5. Migrate

pnpm --filter @candidlens/db db:migrate

Prints Migrations applied. and creates all tables: identity and organizations, jobs, rubrics, candidates, documents, scoring runs, scores, evidence, audit log.

6. Verify your setup

pnpm typecheck   # strict TypeScript across every package
pnpm test        # full suite, including DB-backed integration tests

The api and orchestrator integration tests need the database from step 2 — they create orgs, jobs and candidates, run real scoring batches through the mock model, and recompute the hash-chained audit log from stored rows.

7. Run the apps

The fastest path is the one-command stack. First replace BETTER_AUTH_SECRET in the root .env with a real secret: the API container runs in production mode and refuses the example value.

openssl rand -base64 32   # paste the output into .env as BETTER_AUTH_SECRET
docker compose up --build -d
# web :3000 · api :4000 · postgres :5433

Migrations apply automatically on API boot. For daily development instead:

pnpm --filter @candidlens/api dev    # API on :4000
pnpm --filter @candidlens/web dev    # product UI on :3000

Then: sign in / sign up → create an organization → create a job → upload resumes → score → review with evidence.

Without a model, rubric drafting, scoring and Ask answer 503 llm_not_configured. Uploading resumes, review, decisions and audits still work. To run the same steps from a terminal, use the CLI.

What “everything works” looks like

  • docker compose ps → postgres Up (healthy)
  • pnpm test → all packages green, including the 3 integration tests
  • curl localhost:4000/api/health → {"ok":true}

Stuck? Every error we hit during development — and its fix — is in Troubleshooting.