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

rawan-bee-bot

v1.2.8

Published

A flexible, AI-powered chatbot UI component for React, supporting multiple AI providers (OpenAI, Gemini, self-hosted LLMs).

Downloads

44

Readme

rawan-bee-bot

A flexible, AI-powered chatbot UI component for React, supporting multiple AI providers (OpenAI, Mistral, self-hosted LLMs).

📌 Features

  • Prebuilt Chat UI – Easily embed a chatbot into any React project.
  • Multi-AI Support – Supports OpenAI, Mistral (self-hosted via Ollama).
  • Theming & Customization – Modify UI colors, fonts, and styles.
  • Message Storage – Supports local storage & API-based message saving.
  • Responsive & Mobile-Friendly – Works across all screen sizes.

🚀 Installation

npm install rawan-bee-bot

or

yarn add rawan-bee-bot

🔧 Usage

Import and integrate the chatbot inside your React project:

import React from "react";
import ChatbotUI from "rawan-bee-bot";

const App = () => {
  const saveMessageToDatabase = async (message) => {
    await fetch("https://your-api.com/save-message", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify(message),
    });
  };

  return (
    <ChatbotUI
      aiProvider="selfhosted" // Use "openai" for OpenAI API
      apiKey="YOUR_OPENAI_API_KEY" // Required only for OpenAI
      backendUrl="http://localhost:11434/api/generate" // Required only for Mistral (Ollama)
      theme={{
        chatButtonBg: "#B20710",
        chatButtonTextColor: "#ffffff",
        headerBg: "#131834",
        headerTextColor: "#ffffff",
        closeButtonColor: "#ffffff",
        userMessageBg: "#B20710",
        userMessageText: "#ffffff",
        botMessageBg: "#43465e",
        botMessageText: "#ffffff",
        inputContainerBg: "#131834",
        inputFieldBg: "#43465e",
        inputFieldText: "#ffffff",
        sendButtonBg: "#B20710",
        sendButtonTextColor: "#fff",
        typingIndicatorColor: "#fff",
      }}
      onSaveMessage={saveMessageToDatabase}
    />
  );
};

export default App;

🌍 AI Providers

This chatbot supports multiple AI backends. Choose one of the following:

🔹 OpenAI API

  • Set aiProvider="openai" and provide an API key.
<ChatbotUI
  aiProvider="openai"
  apiKey="YOUR_OPENAI_API_KEY"
/>

🔹 Mistral (Self-hosted via Ollama)

  • Requires Ollama installed locally.
  • Runs a Mistral model on http://localhost:11434/api/generate.
<ChatbotUI
  aiProvider="selfhosted"
  backendUrl="http://localhost:11434/api/generate"
/>

🎨 Customization

You can fully customize the chatbot UI with the theme prop:

| Property | Description | Default | |----------|------------|---------| | chatButtonBg | Chat button background color | #0084ff | | chatButtonTextColor | Chat button text color | #fff | | headerBg | Header background color | #0084ff | | headerTextColor | Header text color | #fff | | closeButtonColor | Close button color | #fff | | userMessageBg | User message background | #0084ff | | userMessageText | User message text color | #fff | | botMessageBg | Bot message background | #e4e6eb | | botMessageText | Bot message text color | #000 | | inputContainerBg | Input container background | #f1f1f1 | | inputFieldBg | Input field background | #fff | | inputFieldText | Input field text color | #000 | | sendButtonBg | Send button background | #0084ff | | sendButtonTextColor | Send button text color | #fff | | typingIndicatorColor | Typing indicator color | #666 |


💾 Saving Messages

You can store chat messages locally or send them to a database.

1⃣ Local Storage (Default)

The chatbot automatically saves messages in the browser's localStorage.

2⃣ Save to Database

Pass a function to onSaveMessage to send messages to an API:

const saveMessageToDatabase = async (message) => {
  await fetch("https://your-api.com/save-message", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(message),
  });
};

<ChatbotUI onSaveMessage={saveMessageToDatabase} />;

💻 Development

1️⃣ Clone the Repository

git clone https://github.com/RawanBee/rawan-bee-bot.git
cd rawan-bee-bot
npm install

2️⃣ Build the Project

npm run build

4️⃣ Publish to NPM

npm publish

Screenshot

Here is a preview of the chatbot UI:

Chatbot UI


📝 License

This project is licensed under the MIT License. Feel free to use and modify it.


📞 Support

For questions and issues, open an issue on GitHub.


🚀 Happy Coding! 🎉