npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

recommend-series

v1.0.0-213c9e719211

Published

A TV series recommendation tool

Readme

recommend-series

A CLI tool for TV series recommendations.

Summary

Thank you Matthias for this challenge, it was fun and interesting to solve.

My project is an npm package that can be installed and used locally, given the user has credentials as explained below. I used TDD to let complexity grow gradually and in a controlled way, especially with the usage of AI-aided coding. This approach really helped me stay focused and build features incrementally - I wrote tests first for the LLM query transformation, TVDB API integration, and response formatting, which made the implementation much cleaner. There is a GitHub Actions CI/CD workflow to automatically host on npmjs on push to main.

I implemented input sanitization to prevent prompt injection attacks, XSS vulnerabilities, and DoS attempts through input length validation. This was important since the app uses LLM APIs that could be manipulated by malicious input - and have my google billing account connected :] .

I also put some effort into the user experience - things like loading indicators, proper error handling with friendly messages, and support for follow-up queries like "tell me more about the first series" by maintaining conversation history. I engineered the prompts to handle natural language queries and transform them into TVDB API parameters.

Some separation of concerns is applied, the RecommendationEngine handles the "business" logic, TVDBClient manages API communication, and input sanitization is isolated. I also added Docker support so users can run it without installing Node.js locally.

What can be improved - self assessment

The user's preferences are not extracted with granular details due to time constraints. Also, the app lacks persistent memory, so the user will start from scratch each time they open it. The app can be pulled from npmjs, but is not hosted anywhere live. This would need to be tackled if the project went to prod, including automated test and lint workflows for CI. I initially misunderstood the requirement "on a server" - I thought I had to build a backend as well and not have the CLI communicate directly with the TVDB API. That took a lot of time and I could have double-checked this before investing the time (Cloud Run service account setup for a dockerized NestJS etc. -> all not needed here).

Installation

npm install -g recommend-series

Usage

After installing globally, you need to set up your API credentials. You can either:

Option 1: Export environment variables

export LLM_API_KEY=your-api-key-here
export TVDB_API_KEY=your-tvdb-api-key-here
export TVDB_PIN=your-tvdb-pin-here

Option 2: Create a .env file in your current directory

LLM_API_KEY=your-api-key-here
TVDB_API_KEY=your-tvdb-api-key-here
TVDB_PIN=your-tvdb-pin-here

Then run the app:

recommend-series

Type your preferences and get recommendations. Type exit or quit to exit.

Development

With pnpm

pnpm install

pnpm dev

With Docker

First, build the image:

docker compose build

Then run interactively:

docker compose run --rm recommend-series

Or use Docker directly:

docker build -t recommend-series .
docker run -it --env-file .env recommend-series