02 · Developer tool · AI
Dependency Doctor
Paste a package.json and get dependency guidance grounded in real registry and vulnerability data, with an LLM used only to explain and prioritise.
Problem
Generic advice about outdated packages is easy to generate and hard to trust. I wanted to see how AI can fit into an engineering workflow without being asked to invent facts.
What I built
- Next.js and TypeScript app with a package.json parser and input validation.
- Resolves each requested version range against live npm registry metadata.
- Looks up known vulnerabilities for the resolved versions through the OSV database.
- Detects peer-dependency conflicts using registry data and semver range intersection.
- Sends the collected facts to an LLM, which returns a structured, prioritised report.
Architecture
package.json
Parse + validate
Zod
npm registry
versions, peers
OSV
vulnerabilities
LLM
structured JSON
Report
Engineering decisions
- Facts first, model second
- Versions, deprecations, vulnerabilities and peer conflicts are computed deterministically. The model never decides what is true; it only explains and ranks what the pipeline already found.
- Structured output, validated twice
- The model is asked for strict JSON-schema output, and the response is parsed again with Zod. A malformed answer fails loudly instead of rendering something misleading.
- Swappable provider
- Analysis sits behind a small interface, so the AI provider and the package registry are replaceable without touching the rest of the pipeline.
- Bounded external calls
- Registry and OSV requests run with timeouts and limited concurrency, so one slow package cannot hang the whole analysis.
Technology
- Next.js
- React
- TypeScript
- Node.js
- Zod
- semver
- OSV API
- LLM APIs
- Docker
Result
Live at dependencydoctor.in, a working example of AI integrated into a developer workflow as one step in a pipeline, not the whole product.