New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cartmate

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cartmate

Framework-agnostic conversational shopping assistant

latest
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

🛒 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.

OptionTypeDescription
endpointsObjectRequired. Links to your backend APIs.
endpoints.searchStringURL for product search (POST request).
endpoints.addToCartStringURL to add items to cart (POST).
endpoints.recommendationsStringURL for AI recommendations (POST).
themeObjectCustom colors and positioning.
theme.primaryColorStringMain brand color (hex code).
theme.positionString"bottom-right" (default) or "bottom-left".
greetingStringInitial message shown to users.
quickActionsArrayQuick 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?

  • Clone & Install:

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

    npm run dev
    

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

  • Build for Production:

    npm run build
    

    Creates optimized files in dist/.

  • 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).

Keywords

ecommerce

FAQs

Package last updated on 16 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts