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

innovatiq-chatbot

v1.0.6

Published

Reusable chatbot web component for Innovatiq projects

Downloads

606

Readme

innovatiq-chatbot

Reusable chatbot Web Component for all Innovatiq projects. Works with React, Angular, Vue, Plain HTML — any framework!


📦 Installation

npm install innovatiq-chatbot

⚡ Usage

React / Vite Project — index.html

<script type="module">
  import 'innovatiq-chatbot';
</script>
<innovatiq-chatbot
  email-to="[email protected]"
  api-url="https://YOUR_BACKEND_URL">
</innovatiq-chatbot>

Angular Project — src/index.html

Step 1 — Copy chatbot file to assets:

copy "node_modules\innovatiq-chatbot\dist\chatbot.mjs" "src\assets\chatbot.mjs"

Step 2 — Add to src/index.html before </body>:

<script type="module" src="/assets/chatbot.mjs"></script>
<innovatiq-chatbot
  email-to="[email protected]"
  api-url="https://YOUR_BACKEND_URL">
</innovatiq-chatbot>

Step 3 — Add schema in app.module.ts:

import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

@NgModule({
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})

⚙️ Props / Attributes

| Attribute | Default | Description | |-----------|---------|-------------| | email-to | [email protected] | Email address to receive inquiries | | api-url | http://localhost:5000 | Your backend server URL |


🖥️ Backend Setup (Node.js) — Required Once Per Project

Step 1 — Create the route file

Create src/routes/chatbot.js and add the following code:

const express = require("express");
const router = express.Router();
const nodemailer = require("nodemailer");

const transporter = nodemailer.createTransport({
  host: process.env.SMTP_HOST || "smtp.gmail.com",
  port: process.env.SMTP_PORT || 465,
  secure: true,
  auth: {
    user: process.env.SMTP_USER,
    pass: process.env.SMTP_PASS,
  },
});

router.post("/send-email", async (req, res) => {
  const { emailTo, interest, userType, name, email, phone, company, message, chatHistory, numUsers, numCustomers, enquiryType } = req.body;

  if (!name || !email || !message) {
    return res.status(400).json({ error: "Name, email and message are required." });
  }

  const htmlBody = `
    <div style="font-family: Segoe UI, sans-serif; max-width: 600px; margin: auto; border: 1px solid #eee; border-radius: 12px; overflow: hidden;">
      <div style="background: #E8174B; padding: 20px 24px;">
        <h2 style="color: white; margin: 0;">New Chatbot Inquiry</h2>
        <p style="color: rgba(255,255,255,0.8); margin: 4px 0 0;">Innovatiq Support Chatbot</p>
      </div>
      <div style="padding: 24px;">
        <table style="width: 100%; border-collapse: collapse;">
          <tr><td style="padding: 8px 0; color: #888; width: 120px;">Interest</td><td style="padding: 8px 0; color: #E8174B; font-weight: 600;">${interest || "N/A"}</td></tr>
          ${userType && userType !== "others" ? `<tr><td style="padding: 8px 0; color: #888;">Type</td><td style="padding: 8px 0; color: #E8174B; font-weight: 600;">${userType === "customer" ? "👤 Customer" : "🤝 Partner"}</td></tr>` : ""}
          ${userType === "customer" && numUsers ? `<tr><td style="padding: 8px 0; color: #888;">No. of Users</td><td style="padding: 8px 0;">${numUsers}</td></tr>` : ""}
          ${userType === "partner" && numCustomers ? `<tr><td style="padding: 8px 0; color: #888;">No. of Customers</td><td style="padding: 8px 0;">${numCustomers}</td></tr>` : ""}
          ${enquiryType ? `<tr><td style="padding: 8px 0; color: #888;">What to Discuss</td><td style="padding: 8px 0;">${enquiryType}</td></tr>` : ""}
          <tr><td style="padding: 8px 0; color: #888;">Name</td><td style="padding: 8px 0;">${name}</td></tr>
          <tr><td style="padding: 8px 0; color: #888;">Email</td><td style="padding: 8px 0;">${email}</td></tr>
          <tr><td style="padding: 8px 0; color: #888;">Phone</td><td style="padding: 8px 0;">${phone || "Not provided"}</td></tr>
          <tr><td style="padding: 8px 0; color: #888;">Company</td><td style="padding: 8px 0;">${company || "Not provided"}</td></tr>
          <tr><td style="padding: 8px 0; color: #888; vertical-align: top;">Message</td><td style="padding: 8px 0;">${message}</td></tr>
        </table>
        <hr style="margin: 20px 0;" />
        <h4>Chat History</h4>
        <pre style="background: #f9f9f9; padding: 14px; border-radius: 8px; font-size: 12px; white-space: pre-wrap;">${chatHistory}</pre>
      </div>
      <div style="background: #f9f9f9; padding: 14px 24px; text-align: center; font-size: 12px; color: #aaa;">
        Sent from Innovatiq Website Chatbot · ${new Date().toLocaleString()}
      </div>
    </div>
  `;

  try {
    await transporter.sendMail({
      from: `"Innovatiq Chatbot" <${process.env.SMTP_USER}>`,
      to: emailTo,
      replyTo: email,
      subject: `[Chatbot Inquiry] ${interest} - ${name}`,
      html: htmlBody,
    });
    res.json({ success: true });
  } catch (err) {
    console.error("Chatbot email error:", err);
    res.status(500).json({ error: "Failed to send email." });
  }
});

module.exports = router;

Step 2 — Register the route in server.js

const chatbotRoute = require("./routes/chatbot");
app.use("/api/chatbot", chatbotRoute);

Step 3 — Add SMTP credentials to .env

SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
[email protected]
SMTP_PASS=your_app_password

Step 4 — Install nodemailer (if not already installed)

npm install nodemailer

✅ Features

| Feature | Details | |---------|---------| | Auto popup | Opens automatically after 50 seconds | | Rotating messages | 10 messages, changes every 30 seconds | | Main menu | Products / Services / Careers / Others | | Services | 7 Innovatiq services listed | | Products | SKillEra, LearnPro, LMP, SecurOn | | Customer / Partner flow | After product selection, user chooses Customer or Partner | | Customer form | Includes "How many users?" field | | Partner form | Includes "How many customers?" field | | Others form | Includes "What would you like to discuss?" field | | Lead form | Name, Email, Phone, Company, Message | | Email notification | Chat summary with all details sent to email | | Reset button | Restart chat at any point | | Branding | Innovatiq Red theme + Logo |


🔄 How to Update

npm install innovatiq-chatbot@latest

Made with ❤️ by Innovatiq Dev Team