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

@mlhkinfotech/plugin-catalog

v1.0.3

Published

Universal Business & Product Catalog Plugin for MLHK WhatsApp AI Ecosystem

Readme

@mlhkinfotech/plugin-catalog

npm version License: MIT

Universal Business & Product Catalog Plugin for the MLHK WhatsApp AI Ecosystem. Enables dynamic product discovery, beautiful WhatsApp card formatting, and interactive conversational order capture for any business (retail, restaurant, clinic, service agency, wholesale).


🚀 Features

  • Store-Agnostic Architecture: Works for any business model — not hardcoded to a single POS.
  • Pluggable Adapters: Comes with MemoryCatalogAdapter (in-memory / JSON) and easily extensible to SQL, MongoDB, Shopify, WooCommerce, or UltimatePOS.
  • WhatsApp Card Formatter: Formats product descriptions into WhatsApp-friendly text blocks with emojis, pricing, stock indicators, and SKU details.
  • Interactive Order & Lead State Machine (OrderWorkflowManager): Handles multi-step conversational ordering (item selection → quantity → customer address → confirmation).
  • Native AI Tool Provider: Generates ready-to-use search and catalog tools for @mlhkinfotech/ai-agent.

📦 Installation

npm install @mlhkinfotech/plugin-catalog

💻 Quick Start

1. Setup Business Catalog with In-Memory Adapter

import { MemoryCatalogAdapter, CatalogPlugin } from '@mlhkinfotech/plugin-catalog';

const adapter = new MemoryCatalogAdapter({
  id: 'store_101',
  name: 'Balaji Hardware & Electricals',
  currency: 'INR',
  products: [
    {
      id: 'p1',
      name: 'Havells 10W LED Bulb (Cool White)',
      description: 'Energy saving B22 base LED bulb',
      price: 120,
      category: 'Lighting',
      inStock: true,
      stockQuantity: 50,
      tags: ['bulb', 'led', 'havells']
    },
    {
      id: 'p2',
      name: 'Polycab 2.5 sq mm Wire (90m Roll)',
      description: 'FR PVC insulated copper wire',
      price: 2450,
      category: 'Wiring',
      inStock: true,
      stockQuantity: 15,
      tags: ['wire', 'polycab', 'cable']
    }
  ]
});

const plugin = new CatalogPlugin(adapter);

2. Format Products for WhatsApp

import { ProductFormatter } from '@mlhkinfotech/plugin-catalog';

const products = await adapter.searchProducts('bulb');
const whatsappMessage = ProductFormatter.formatProductList(products, 'INR');

console.log(whatsappMessage);
/*
Output:
🛍️ *Our Available Products:*

1️⃣ *Havells 10W LED Bulb (Cool White)*
   💵 Price: ₹120
   📦 Status: In Stock (50 available)
   📝 Energy saving B22 base LED bulb

Reply with product name or number to order!
*/

3. Connect to @mlhkinfotech/ai-agent

import { AIAgent } from '@mlhkinfotech/ai-agent';

const agent = new AIAgent({
  provider: 'gemini',
  apiKey: process.env.GEMINI_API_KEY!
});

// Register catalog search tool with the AI
agent.registerTool(plugin.getSearchTool());
agent.registerTool(plugin.getProductDetailsTool());

// The AI now has direct access to look up products, check stock, and quote prices!

4. Interactive Order & Lead Capture State Machine

import { OrderWorkflowManager } from '@mlhkinfotech/plugin-catalog';

const orderManager = new OrderWorkflowManager();

// Customer wants to order
const state = orderManager.startOrder('919876543210', {
  productId: 'p1',
  productName: 'Havells 10W LED Bulb',
  unitPrice: 120,
  quantity: 5
});

console.log(state.step); // 'WAITING_FOR_ADDRESS'
// Prompt customer: "Please share your delivery address & contact number"

📄 License

MIT © MLHK Infotech