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

botstack

v0.2.1

Published

Bot Stack

Readme

BotStackjs

Build Status npm version npm

Why?

We believe the beginning of a successful bot has little to do with engineering and everything to do with the skill of the product owner in acquiring users and keeping them faster than their competition.

That's why we've open sourced our Facebook Messenger node.js code base so you can get all the latest features from API.AI, Facebook Messenger and Analytics like Dashbot and BotMetrics. While setting yourself up for success with a robust and extensible code base when you've tested your assumptions and are ready for an engineer to build domain specific features.

Installation

  • npm install botstack
  • set API keys in env_tmpl

Example

Create index.js file with this content:

const BotStack = require('botstack');

class ExampleBot extends BotStack {};

const bot = new ExampleBot('example-bot');
bot.startServer();

Before the start of the bot, we need to set a few environment variables:

FB_PAGE_ACCESS_TOKEN, FB_VERIFY_TOKEN, APIAI_ACCESS_TOKEN

If you don't want to set environment variables explicitly, you can use the dotenv library.

Example:

  1. Create .env file in the root folder of your project Example:
FB_PAGE_ACCESS_TOKEN=
FB_VERIFY_TOKEN=
APIAI_ACCESS_TOKEN=
  1. Create JS file:
require('dotenv').config();
class ExampleBot extends BotStack {};

const bot = new ExampleBot('example-bot');
bot.startServer();
  1. Run
node index.js

Other examples you can find in the examples folder of this repository.

Features

  • Emjoi Support
  • Configurable 'Greeting, Get Started Button & Action Menu'
  • Simple User Onboarding Design
  • Facebook Referral Support- Track different links placed in different channels to see which is most effective
  • NLP - Inuitive and easy use Natural Langage Programming
  • Easily setup FB structured messages (Image, Quick Replys, Card, Custom Payload)
  • Analytics and Insights
  • Subscription and Broadcast capabilities with Backchat.io

Stack

  • BotStackjs - clean modular re-usable libraries
  • Node.js - Scalable fast code
  • API.AI - Best in class Natural Language Processing
  • Redis [Optional] - In-memory cache storage for thing like user sessions
  • Docker - Management and simplified deployment of services

Code

  • Better Promise Support with Bluebird and request-promise
  • Good Test Coverage
  • Structured logging with Winston - specify additional metadata (like session id, user id, module name, etc)
  • Track Stack Traces with Sentry

Roadmap

  • Facebook Webviews
  • Rabbit MQ Support

How to get involved?

It's still early days and everything we are learning on customers messenger bots we are trying to incorporate here. If you are using this source code and make enhancements please feed the changes back in. If you are more a product person message me or add your ideas under the issues.