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

cartmate

v1.0.1

Published

Framework-agnostic conversational shopping assistant

Downloads

11

Readme

🛒 CartMate - Conversational Shopping Assistant

CartMate is a framework-agnostic, AI-powered shopping assistant widget that can be dropped into any e-commerce website (WordPress, Shopify, React, Vue, HTML). It helps users find products, get recommendations, and manage their cart through a natural chat interface.


🚀 Features at a Glance

  • Conversational Search: Users type "red sneakers under $50" -> CartMate filters and shows results.
  • Smart Recommendations: "What goes with this?" suggests related items based on cart contents.
  • Universal Compatibility: Built as a standard Web Component (<cart-mate>). Works everywhere.
  • Zero-Dependency: No React, Vue, or jQuery required on the host site.
  • Themable: customized via CSS variables to match your brand.

📦 Installation

Option 1: CDN (Easiest)

Add this to your HTML <body> or footer:

<!-- 1. Load the Widget -->
<script src="https://unpkg.com/@cartmate/widget@latest/dist/cartmate.umd.cjs"></script>

<!-- 2. Configure & Place -->
<script>
  window.__CARTMATE_CONFIG__ = {
    apiKey: "YOUR_API_KEY",
    greeting: "Hi! I'm your store assistant. 🛍️",
    endpoints: {
      search: "https://your-store.com/api/search",
      addToCart: "https://your-store.com/api/cart",
      recommendations: "https://your-store.com/api/recommendations",
    },
    theme: {
      primaryColor: "#6200ea",
    },
  };
</script>

<cart-mate></cart-mate>

Option 2: NPM (For Bundlers)

npm install @cartmate/widget

In your app entry point (e.g., main.js or App.jsx):

import "@cartmate/widget/dist/cartmate.js";
// The <cart-mate> element is now registered and ready to use!

⚙️ Configuration

The window.__CARTMATE_CONFIG__ object controls everything.

| Option | Type | Description | | :-------------------------- | :------- | :------------------------------------------------- | | endpoints | Object | Required. Links to your backend APIs. | | endpoints.search | String | URL for product search (POST request). | | endpoints.addToCart | String | URL to add items to cart (POST). | | endpoints.recommendations | String | URL for AI recommendations (POST). | | theme | Object | Custom colors and positioning. | | theme.primaryColor | String | Main brand color (hex code). | | theme.position | String | "bottom-right" (default) or "bottom-left". | | greeting | String | Initial message shown to users. | | quickActions | Array | Quick suggestion buttons (e.g., "On Sale", "New"). |

Backend API Requirements

Your endpoints should accept JSON and return results in a standard format. See Integration Guide for full API specs.


🛠️ Development & Simulation

Want to modify the widget source code?

  1. Clone & Install:

    git clone https://github.com/your-repo/cartmate.git
    cd cartmate
    npm install
  2. Run Dev Server:

    npm run dev

    Opens a demo page at http://localhost:5173.

  3. Build for Production:

    npm run build

    Creates optimized files in dist/.

  4. Simulate Production: A convenient simulation page exists to test the built widget against the local API:

    • Open simulation/index.html in your browser.
    • Ensure npm run dev is running (to serve the API).

📚 Documentation Links