Docs · Get started
Self-hosting
One command stands up the full stack — web, API, and Postgres with migrations applied on boot. Point the LLM at Ollama and your candidate data never touches a third party.
The 60-second version
git clone https://github.com/abhay-yemekar/hirelens.git && cd hirelens
cp .env.example .env # set BETTER_AUTH_SECRET (openssl rand -base64 32)
docker compose up --build -dweb → localhost:3000 · API health → localhost:4000/api/health · Postgres → localhost:5433. Images build from apps/api/Dockerfile and apps/web/Dockerfile; rebuilds happen only when sources change.
What's in the stack
| Container | Image | Notes |
|---|---|---|
| hirelens-postgres | pgvector/pgvector:pg16 | Vector extension baked in; data in the hirelens_pgdata volume |
| hirelens-api | built from source | Hono server; applies migrations on boot |
| hirelens-web | built from source | Next.js standalone output |
Environment variables
| Variable | Required | Purpose |
|---|---|---|
BETTER_AUTH_SECRET | yes | Auth signing secret — openssl rand -base64 32 |
BETTER_AUTH_URL | yes | Web origin (default http://localhost:3000) |
DATABASE_URL | yes | Postgres connection string |
CORS_ORIGINS | no | Allowed web origins (default covers :3000) |
HIRELENS_LLM_PROVIDER / _MODEL / _API_KEY | no | Enables real scoring; without them derive/score return 503 llm_not_configured |
HIRELENS_LLM_FALLBACKS (+ per-provider HIRELENS_LLM_<ID>_MODEL, _API_KEY) | no | Failover chain for overloaded moments. Every fallback needs its own _MODEL (a provider never inherits another provider's model id — validation fails at boot otherwise), e.g. openai/gpt-oss-120b for Groq. |
HIRELENS_LLM_DEADLINE_MS | no | Overall retry/failover deadline in ms (default 120000). Keeps the retry ladder inside serverless function limits. |
SENTRY_DSN, LANGFUSE_*, NEXT_PUBLIC_POSTHOG_KEY | no | Observability — strict no-ops until set |
Local LLM mode (resumes never leave)
Install Ollama, pull a model, and point the API at it:
HIRELENS_LLM_PROVIDER=ollama
HIRELENS_LLM_MODEL=llama3.1
HIRELENS_LLM_BASE_URL=http://host.docker.internal:11434With this configuration the entire pipeline — parsing, rubric derivation, scoring, evidence extraction — runs inside your network.
Backups
The entire state of an instance is one Postgres database:
docker exec hirelens-postgres pg_dump -U postgres hirelens > backup.sql
# restore:
cat backup.sql | docker exec -i hirelens-postgres psql -U postgres hirelensUpgrades
git pull
docker compose up --build -dMigrations run automatically on API boot. Down-time is one container restart. To wipe everything for a clean test: docker compose down -v — ⚠️ this deletes the data volume.