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

pcpartspicker

v1.0.0

Published

AI-powered PC parts configuration generator using OpenAI's GPT model

Readme

PCPartsPickerAI

An intelligent Express middleware that generates optimized PC configurations based on budget, purpose, and preferences using OpenAI's GPT model. Provided by PCPartsPicker.

Features

  • Generate complete PC builds within specified budget
  • Optimize builds for different purposes (gaming, productivity, content creation, etc.)
  • Consider user preferences for specific brands or components
  • Include detailed specifications and reasoning for each component
  • Caching system to reduce API calls
  • Built-in budget validation
  • Component categories reference

Installation

npm install pcpartspicker

Usage

const express = require('express');
const createPCPartsGenerator = require('pcpartspicker');

const app = express();
const OPENAI_API_KEY = 'your-api-key-here';

app.use('/pcbuild', createPCPartsGenerator(OPENAI_API_KEY));

app.listen(3000, () => {
  console.log('Server is running on port 3000');
});

Generate PC Build

Send a POST request to /pcbuild with the following body:

{
  "budget": 2000,
  "purpose": "gaming",
  "preferences": {
    "cpu_brand": "AMD",
    "gpu_brand": "NVIDIA",
    "case_size": "mid-tower"
  },
  "token": "unique-user-token"
}

Response Example

{
  "configuration": {
    "cpu": {
      "name": "AMD Ryzen 7 5800X",
      "price": 449.99,
      "specs": "8 cores, 16 threads, 3.8GHz base, 4.7GHz boost",
      "reason": "Excellent gaming performance and multi-tasking capabilities"
    },
    "motherboard": {
      "name": "MSI MPG B550 GAMING EDGE WIFI",
      "price": 179.99,
      "specs": "AM4 socket, WiFi 6, PCIe 4.0",
      "reason": "Great features for the price, good VRM for 5800X"
    },
    // ... other components
  },
  "metadata": {
    "budget": 2000,
    "purpose": "gaming",
    "preferences": {
      "cpu_brand": "AMD",
      "gpu_brand": "NVIDIA",
      "case_size": "mid-tower"
    },
    "timestamp": "2024-10-23T12:00:00Z"
  }
}

Get Component Categories

Send a GET request to /pcbuild/categories

Validate Budget

Send a GET request to /pcbuild/validate-budget/2000

API Endpoints

  • POST /pcbuild - Generate PC configuration
  • GET /pcbuild/categories - Get list of component categories
  • GET /pcbuild/validate-budget/:amount - Validate budget amount

Configuration Options

Budget

  • Minimum: $500
  • Maximum: $10,000 (with warning for very high budgets)

Purposes

  • Gaming
  • Content Creation
  • Office/Productivity
  • Software Development
  • 3D Rendering
  • Streaming
  • General Use

Preferences

  • CPU brand (AMD/Intel)
  • GPU brand (NVIDIA/AMD)
  • Case size (small/mid/full tower)
  • Color scheme
  • RGB preferences
  • Specific brand preferences
  • Cooling preferences (air/liquid)

Caching

Results are cached for 1 hour to reduce API calls and improve response times.

Error Handling

The middleware includes comprehensive error handling for:

  • Invalid budgets
  • Missing required fields
  • API failures
  • Invalid JSON responses

Note

This package requires a valid OpenAI API key. Keep your API key secure and never expose it in your code.