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

@broadreachalliance/q-assistant

v0.0.90

Published

A React-based voice assistant

Readme

Q-Assistant

Q-Assistant is an NPM package that provides voice assistant capabilities for Contract Q web application. It includes a UI component for selecting and saving voice settings, as well as a custom hook for managing voice interactions.

Installation

To install the package, run:

npm install @broadreachalliance/q-assistant

or with Yarn:

yarn add @broadreachalliance/q-assistant

Usage

Importing Components

import { AssistantVoiceSettings, useAssistant } from "@broadreachalliance/q-assistant";

Example Implementation

function App() {
  const { startListening, stopListening, state } = useAssistant();

  const handleToggleListening = () => {
    if (state === "listening") {
      stopListening();
    } else {
      startListening();
    }
  };

  return (
    <div>
      <AssistantVoiceSettings />
      <button 
        onClick={handleToggleListening} 
        className="w-[20%] bg-[#1f4745] ml-auto text-white text-sm py-2 rounded-md shadow-md hover:bg-[#2ba49e]"
      >
        {state === "listening" ? "Stop Recording" : "Start Recording"}
      </button>
      <div>{state}</div>
    </div>
  );
}

Environment Variables

The assistant API endpoint should be defined in the .env file:

NEXT_PUBLIC_AI_ASSISTANT_HOST=<your-api-endpoint>

Local Storage Requirements

  • User Data: Must be stored in local storage under the key currentUser and should contain a userID.
  • Authorization Token: The customer's authorization token must be available in local storage under the key token.

API Reference

AssistantVoiceSettings

A UI component that allows users to select and save a preferred voice to local storage. The saved voice is used for chatbot response playback.

useAssistant Hook

A custom hook that provides functions and state for voice interaction.

State

  • idle - No active voice interaction.
  • listening - Actively capturing voice input.
  • responding - Processing a response.
  • processing - Handling voice data.

Functions

  • startListening() - Begins capturing voice input.
  • stopListening() - Stops capturing voice input.

License

MIT