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

helpdock

v0.1.3

Published

*A drop-in help desk widget. Bring your own backend.*

Readme

HelpDock

A drop-in help desk widget. Bring your own backend.

HelpDock is a lightweight, self-hosted help desk widget built as a TypeScript library. It provides an embeddable knowledge base and contact form that sits in the corner of any web page. Uses native Web Components with no React/Vue/Angular dependencies.

Features

  • Knowledge Base: Searchable articles with categories and tags
  • Contact Form: Configurable support ticket submission with file attachments
  • Mobile Responsive: Adapts to desktop floating panel or mobile full-screen overlay
  • Self-Hosted: Bring your own backend and datastore
  • TypeScript Support: Full type definitions included
  • Analytics: Track user interactions and events

Installation

npm install helpdock

Quick Start

import { HelpDock, type AnalyticsEvent } from 'helpdock';

HelpDock.init({
  articles: {
    type: "function",
    fetch: async () => ({
      articles: [
        {
          id: "getting-started",
          title: "Getting Started",
          description: "Learn how to use HelpDock and integrate it into your application",
          content: "# Getting Started\n\nWelcome to HelpDock! This guide will help you get up and running quickly.\n\n## Installation\n\n```bash\nnpm install helpdock\n```\n\n## Basic Setup\n\nImport and initialize the widget with your configuration.",
          contentType: "markdown",
          category: "Guide",
          tags: ["introduction", "setup"],
        },
        {
          id: "api-reference",
          title: "API Reference",
          description: "Complete API documentation for HelpDock configuration options",
          content: "# API Reference\n\n## Configuration Options\n\n- `position`: Widget position ('topLeft', 'topRight', 'bottomLeft', 'bottomRight')\n- `closeOnEscape`: Close widget when Escape key is pressed\n- `analytics`: Track user interactions",
          contentType: "markdown",
          category: "Documentation",
          tags: ["api", "reference"],
        },
      ],
    }),
  },

  contact: {
    title: "How can we help?",
    subtitle: "We usually respond in a few hours",
    fields: [
      {
        type: "text",
        name: "name",
        label: "Name",
        required: true,
        placeholder: "Enter your name",
      },
      {
        type: "email",
        name: "email",
        label: "Email",
        required: true,
        placeholder: "[email protected]",
      },
      {
        type: "select",
        name: "topic",
        label: "Topic",
        required: true,
        options: [
          { value: "bug", label: "Bug Report" },
          { value: "feature", label: "Feature Request" },
          { value: "question", label: "Question" },
          { value: "other", label: "Other" },
        ],
      },
      {
        type: "textarea",
        name: "message",
        label: "Message",
        required: true,
        placeholder: "How can we help you?",
        rows: 5,
      },
    ],

    attachments: {
      mode: "inline",
      maxFiles: 3,
      maxSizeMB: 5,
      accept: "image/*,.pdf,.doc,.docx",
    },

    submit: {
      type: "function",
      handler: async ({ fields, attachments }) => {
        // Send to your backend
        const response = await fetch('/api/contact', {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify({ fields, attachments }),
        });

        if (!response.ok) {
          return {
            success: false,
            message: "Failed to send message. Please try again.",
          };
        }

        return {
          success: true,
          message: "Thank you for contacting us!",
        };
      },
    },
    submitButtonText: "Send message",
  },

  analytics: {
    enabled: true,
    onEvent: (event: AnalyticsEvent) => {
      console.log("[HelpDock Analytics]", event.type, event);

      // Send to your analytics service
      // analytics.track(event.type, event);
    },
  },

  closeOnEscape: true,
  position: "bottomRight",
});

Script Tag Usage

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My App</title>

  <!-- Configure HelpDock before loading the script -->
  <script>
    window.HelpDockConfig = {
      articles: {
        type: "function",
        fetch: async () => ({
          articles: [
            {
              id: "getting-started",
              title: "Getting Started",
              description: "Learn how to use HelpDock and integrate it into your application",
              content: "# Getting Started\n\nWelcome to HelpDock! This guide will help you get up and running quickly.\n\n## Installation\n\nInclude the script tag and configure the widget.",
              contentType: "markdown",
              category: "Guide",
              tags: ["introduction", "setup"],
            },
            {
              id: "troubleshooting",
              title: "Troubleshooting",
              description: "Common issues and how to resolve them",
              content: "# Troubleshooting\n\n## Common Issues\n\n- **Widget not appearing**: Check that the script loaded successfully\n- **Articles not loading**: Verify your article data format\n- **Contact form errors**: Check your submit handler",
              contentType: "markdown",
              category: "Support",
              tags: ["troubleshooting", "support"],
            },
          ],
        }),
      },

      contact: {
        title: "Need help?",
        subtitle: "We're here to assist",
        fields: [
          {
            type: "text",
            name: "name",
            label: "Name",
            required: true,
            placeholder: "Enter your name",
          },
          {
            type: "email",
            name: "email",
            label: "Email",
            required: true,
            placeholder: "[email protected]",
          },
          {
            type: "textarea",
            name: "message",
            label: "Message",
            required: true,
            placeholder: "How can we help you?",
            rows: 4,
          },
        ],

        submit: {
          type: "function",
          handler: async ({ fields }) => {
            // Simulate API call
            await new Promise(resolve => setTimeout(resolve, 1000));

            console.log("Contact form submitted:", fields);

            return {
              success: true,
              message: "Thank you for your message!",
            };
          },
        },
      },

      closeOnEscape: true,
      position: "bottomRight",
    };
  </script>

  <!-- Load HelpDock -->
  <script src="https://unpkg.com/helpdock/dist/helpdock.umd.js"></script>
</head>
<body>
  <!-- Your app content -->
  <h1>My Application</h1>

  <!-- HelpDock will automatically initialize with the window.HelpDockConfig -->
</body>
</html>

License

MIT