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

mujib-chat-sdk

v1.0.3-beta.4

Published

Multi-platform Mujib AI chat SDK for web, mobile, and desktop applications.

Readme

Mujib Chat SDK

Mujib Chat SDK is a self-contained chat widget with distribution targets for npm, browser/CDN, Android, iOS, Flutter, React Native, and Electron.

Install from npm

npm install mujib-chat-sdk

Importing the package registers the <mujib-chat> custom element:

import "mujib-chat-sdk";
<mujib-chat
  endpoint="https://api.example.com"
  bot-id="YOUR_BOT_ID"
></mujib-chat>

You can provide the chatbot response config directly as a JSON object in the config attribute:

<mujib-chat
  endpoint="https://api.example.com"
  bot-id="YOUR_BOT_ID"
  config='{"configs":{"mujib":{"color":"#0D121C"}}}'
></mujib-chat>

A valid tag config skips the remote config request and is used exactly as supplied, without adding omitted fallback fields. Missing or invalid tag config falls back to the remote request, then to the packaged local defaults if that request fails.

The package also exports MujibChat, defineMujibChat, ChatEngine, setupSDK, and httpRequest for programmatic integration.

Messages are posted to {endpoint}/assistant/chat as { message }. After the first successful response, the returned session_id is persisted per bot and included automatically with later messages. An authentication token is resolved from localStorage, cookies, then sessionStorage using token, access_token, or mujib_token keys.

Browser and CDN

Run npm run build, deploy the contents of dist/browser/, then load:

<script src="https://cdn.example.com/mujib-chat-sdk.iife.js"></script>
<mujib-chat endpoint="https://api.example.com" bot-id="YOUR_BOT_ID"></mujib-chat>

dist/browser/mujib-widget.html is the hosted full-page entry used by mobile and desktop WebViews. Configure wrappers with its deployed URL, for example https://cdn.example.com/mujib-widget.html.

Mobile SDKs

Generated integration sources are placed under dist/mobile/:

  • Android: copy android/MujibChatActivity.kt, add the activity to the manifest, and request the INTERNET permission.
  • iOS: add ios/MujibChatViewController.swift to the Xcode target.
  • Flutter: add flutter/mujib_chat.dart and depend on webview_flutter.
  • React Native: add react-native/MujibChat.js and depend on react-native-webview.

Each wrapper accepts widgetUrl, botId, endpoint, and an optional secret. The configuration is passed in the URL fragment so credentials are not sent to the static hosting server.

Desktop SDK

dist/desktop/electron/MujibChatWindow.js exports createMujibChatWindow. Copy it into the Electron main process and pass the same widgetUrl, botId, and endpoint options. The generated window disables Node integration and enables context isolation and sandboxing.

Build and publish

npm ci
npm run build
npm run test:package
npm run pack:check
npm publish

The build creates ESM and IIFE bundles, TypeScript declarations, the hosted widget page, all platform wrappers, and dist/manifest.json. prepublishOnly rebuilds and verifies these artifacts before publication. Bump package.json using semantic versioning before each release.

Security

Anything supplied to a browser or WebView can be inspected by the end user. Do not embed privileged server credentials in secret; use a public widget credential or a short-lived, restricted token. Serve the widget and API over HTTPS in production.

License

MIT