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 🙏

© 2025 – Pkg Stats / Ryan Hefner

chatbotify

v0.1.0

Published

A starter kit to build and embed themeable, multi-provider chatbots into any website or app.

Readme

🤖 Chatbotify SDK

Framework-agnostic starter kit to embed multi-provider AI chatbots with real-time streaming, secure API key handling, and a beautiful customizable UI.

NPM Version License Node Version


🚀 Features

  • Multi-Provider Support – OpenAI (GPT), Google (Gemini), Anthropic (Claude)
  • 🔄 Real-time Streaming – Token-by-token response delivery with native ReadableStream
  • 🔐 Secure by Design – Production-ready Express.js proxy to protect API keys
  • 🎨 Customizable UI – Theme with CSS variables for colors, fonts, border-radius, and more
  • ⚛️ Framework Adapters – Works in plain HTML/JS or React applications
  • 🧩 Extensible Plugin System – Add custom message logic, analytics, or token hooks

📆 Installation

# Using npm
npm install chatbotify react

# Using yarn
yarn add chatbotify react

🔧 Usage

Plain JavaScript

<!DOCTYPE html>
<html>
<head>
  <title>Chatbot Test</title>
  <link rel="stylesheet" href="node_modules/chatbotify/dist/styles.css">
</head>
<body>
  <div id="chat-container" style="width: 400px; height: 600px; border: 1px solid #ccc;"></div>

  <script type="module">
    import { ChatUI, GoogleProvider } from 'chatbotify';

    const googleProvider = new GoogleProvider({ model: 'gemini-2.5-flash' });

    const chatUI = new ChatUI({
      target: document.getElementById('chat-container'),
      provider: googleProvider,
      proxyUrl: 'http://localhost:3001/proxy/google',
    });
  </script>
</body>
</html>

React

import React, { useMemo } from 'react';
import { ChatWidget } from 'chatbotify/react';
import { OpenAIProvider } from 'chatbotify';
import 'chatbotify/dist/styles.css';

function App() {
  const openAIProvider = useMemo(
    () => new OpenAIProvider({ model: 'gpt-4-turbo' }),
    []
  );

  return (
    <div style={{ width: '400px', height: '600px', margin: 'auto' }}>
      <ChatWidget
        provider={openAIProvider}
        proxyUrl="http://localhost:3001/proxy/openai"
      />
    </div>
  );
}

export default App;

🔐 How It Works

  1. Secure Proxy – Protects API keys on the backend using Express.js
  2. Provider – Streams responses from OpenAI, Google, or Anthropic models
  3. Chatbot Instance – Handles real-time streaming, token hooks, and plugins
  4. UI Component – Displays the chat widget and manages user interaction

⚙️ Environment Setup

Create a .env file in your project root:

# Google API
GOOGLE_API_KEY="your-google-api-key"

# OpenAI API
OPENAI_API_KEY="your-openai-api-key"
OPENAI_PROJECT_ID="your-openai-project-id"

# Anthropic API
CLAUDE_API_KEY="your-claude-api-key"

⚠️ Never expose your API keys in client-side code or version control.


🧪 Plugins

Extend Chatbotify with custom hooks:

import { ChatUI, GoogleProvider } from 'chatbotify';

const loggingPlugin = {
  name: 'ConsoleLogger',
  onBeforeSend: (message) => {
    console.log('Sending to AI:', message.content);
    return message;
  },
  onToken: (token) => {
    console.log('Received token:', token);
    return token;
  },
};

const chatUI = new ChatUI({
  target: document.getElementById('chat-container'),
  provider: new GoogleProvider(),
  proxyUrl: 'http://localhost:3001/proxy/google',
  plugins: [loggingPlugin],
});

🎨 Theming

Customize the chat widget with CSS variables:

:root {
  --chatbot-font-family: 'Georgia', serif;
  --chatbot-primary-color: #2c3e50;
  --chatbot-background-color: #ecf0f1;
  --chatbot-user-message-bg: #3498db;
  --chatbot-bot-message-bg: #ffffff;
  --chatbot-border-radius: 8px;
}

📄 License

MIT © Akash Dubey