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

supportkit-sdk

v1.2.0

Published

Developer-first customer support chat SDK - Add beautiful, real-time chat widgets to your website in minutes

Readme

💬 SupportKit SDK

Developer-first customer support chat widget built with Lit web components

npm version License: MIT

✨ Features

  • 🚀 Lightweight - Only ~60KB gzipped
  • Real-time - WebSocket powered instant messaging
  • 🎨 Customizable - Full theme and positioning control
  • 📱 Responsive - Works on desktop, tablet, and mobile
  • 🌍 i18n Ready - Multi-language support
  • 🔒 Secure - API key authentication
  • 💾 Offline Support - Message queuing when offline
  • 🎯 Framework Agnostic - Works with React, Vue, Angular, or vanilla JS

📦 Installation

Via NPM

npm install supportkit-sdk

Via CDN

<script src="https://cdn.jsdelivr.net/npm/supportkit-sdk@latest/dist/supportkit.umd.js"></script>

🚀 Quick Start

Basic Usage

import { SupportKit } from 'supportkit-sdk';

SupportKit.init({
  apiKey: 'sk_your_api_key_here',
  position: 'bottom-right',
  user: {
    id: 'user_123',
    name: 'John Doe',
    email: '[email protected]',
  },
});

CDN Usage

<!DOCTYPE html>
<html>
<head>
  <title>My Website</title>
</head>
<body>
  <h1>Welcome!</h1>

  <!-- SupportKit will appear in bottom-right corner -->
  
  <script src="https://cdn.jsdelivr.net/npm/supportkit-sdk@latest/dist/supportkit.umd.js"></script>
  <script>
    SupportKit.init({
      apiKey: 'sk_your_api_key_here',
    });
  </script>
</body>
</html>

⚙️ Configuration

All Options

SupportKit.init({
  // Required
  apiKey: string,                    // Your API key from dashboard

  // Optional
  position?: 'bottom-right'          // Widget position
    | 'bottom-left' 
    | 'top-right' 
    | 'top-left',
  
  theme?: {
    primaryColor?: string,           // Default: '#3B82F6'
    backgroundColor?: string,        // Default: '#FFFFFF'
    textColor?: string,              // Default: '#1F2937'
    fontFamily?: string,             // Default: system-ui
    borderRadius?: string,           // Default: '12px'
    zIndex?: number,                 // Default: 9999
  },
  
  locale?: string,                   // Default: 'en'
  
  user?: {
    id?: string,                     // User identifier
    name?: string,                   // User display name
    email?: string,                  // User email
    avatar?: string,                 // User avatar URL
  },
});

Theme Customization

SupportKit.init({
  apiKey: 'sk_your_key',
  theme: {
    primaryColor: '#10B981',        // Green
    backgroundColor: '#F9FAFB',     // Light gray
    textColor: '#111827',           // Dark gray
    fontFamily: 'Inter, sans-serif',
    borderRadius: '16px',
    zIndex: 10000,
  },
});

🎮 API Methods

Open Chat

const sdk = SupportKit.getInstance();
sdk.open();

Close Chat

sdk.close();

Update User

sdk.updateUser({
  id: 'user_456',
  name: 'Jane Smith',
  email: '[email protected]',
});

Destroy Widget

sdk.destroy();

Get Configuration

const config = sdk.getConfig();
console.log(config);

🌍 Internationalization

SupportKit.init({
  apiKey: 'sk_your_key',
  locale: 'es', // Spanish
});

Supported locales:

  • en - English (default)
  • es - Spanish
  • fr - French
  • de - German
  • pt - Portuguese
  • ja - Japanese
  • zh - Chinese

🔌 Framework Integration

React

import { useEffect } from 'react';
import { SupportKit } from 'supportkit-sdk';

function App() {
  useEffect(() => {
    const sdk = SupportKit.init({
      apiKey: process.env.REACT_APP_SUPPORTKIT_API_KEY,
      user: {
        id: currentUser.id,
        name: currentUser.name,
        email: currentUser.email,
      },
    });

    return () => sdk.destroy();
  }, []);

  return <div>Your App</div>;
}

Vue

<script setup>
import { onMounted, onUnmounted } from 'vue';
import { SupportKit } from 'supportkit-sdk';

let sdk;

onMounted(() => {
  sdk = SupportKit.init({
    apiKey: import.meta.env.VITE_SUPPORTKIT_API_KEY,
  });
});

onUnmounted(() => {
  sdk?.destroy();
});
</script>

<template>
  <div>Your App</div>
</template>

Next.js

'use client';

import { useEffect } from 'react';

export default function SupportKitProvider() {
  useEffect(() => {
    // Dynamic import to avoid SSR issues
    import('supportkit-sdk').then(({ SupportKit }) => {
      SupportKit.init({
        apiKey: process.env.NEXT_PUBLIC_SUPPORTKIT_API_KEY,
      });
    });
  }, []);

  return null;
}

🛠️ Development

Setup

# Install dependencies
pnpm install

# Start dev server
pnpm dev

# Build for production
pnpm build

# Type check
pnpm type-check

Build Output

dist/
├── supportkit.es.js      # ES module
├── supportkit.umd.js     # UMD bundle
└── index.d.ts            # TypeScript definitions

📝 Events

Listen to SDK events:

const sdk = SupportKit.getInstance();

// Get the widget element
const widget = document.querySelector('supportkit-chat-widget');

// Listen to custom events
widget.addEventListener('message-sent', (e) => {
  console.log('Message sent:', e.detail);
});

widget.addEventListener('message-received', (e) => {
  console.log('Message received:', e.detail);
});

🔒 Security

  • API keys are validated on initialization
  • All communication is encrypted (HTTPS/WSS)
  • Messages are stored securely in PostgreSQL
  • No sensitive data in localStorage
  • CORS protection on API endpoints

🐛 Troubleshooting

Widget not showing

// Check if SDK initialized
const sdk = SupportKit.getInstance();
console.log(sdk ? 'Initialized' : 'Not initialized');

// Check browser console for errors
// Verify API key is correct

WebSocket connection issues

// The SDK automatically falls back to polling
// Check dashboard WebSocket server is running
// Verify CORS settings allow your domain

📄 License

🎯 Roadmap

  • [ ] File upload support
  • [ ] Voice messages
  • [ ] Video chat
  • [ ] Screen sharing
  • [ ] Emoji picker
  • [ ] Message reactions
  • [ ] Rich text formatting
  • [ ] Custom branding
  • [ ] Analytics dashboard
  • [ ] AI-powered responses

Made with ❤️ by the SupportKit team