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

phlo-whatsapp

v1.0.0

Published

Phlo WhatsApp server

Downloads

424

Readme

Phlo WhatsApp

WhatsApp Web gateway (whatsapp-web.js + Express) for the Phlo framework. One process per WhatsApp number; inbound messages reach the app through a secret-protected webhook, outbound messages are sent through a local HTTP bridge.

Phlo WhatsApp is the messaging half of the Phlo server layer, next to Phlo Realtime (the WebSocket layer built into the Phlo Daemon) for realtime. The engine's WhatsApp resource handles the webhook on the app side; the Phlo Dashboard shows the status of every instance across the fleet. Try it end to end with the Phlo WhatsApp demo, a standalone app that sends text, images, polls and locations.

One gateway per WhatsApp number: local bridge out, secret-protected webhook in

Usage

require('./phlo-whatsapp.js')('wa1', 8081, '<secret>', 'https://app.example.com/receive/whatsapp/web/wa1')

Arguments: (instanceId, port, secret, webhookUrl).

On first start the instance prints a QR code in the terminal; scan it with the WhatsApp account that this instance should send and receive as. The session is persisted, so this is a one-time step per instance.

Install

npm install   # deps: whatsapp-web.js, express, axios, qrcode-terminal

Production

Keep one small config file per instance so the gateway and its webhook are managed in one place:

// config/wa1.js  (node-local, keep out of version control)
require('../whatsapp/phlo-whatsapp.js')('wa1', 8081, 'a-long-random-secret', 'https://app.example.com/receive/whatsapp/web/wa1')

The secret is an inline literal on purpose: the Phlo Dashboard discovers each instance and proxies to it by reading config/wa*.js, so it must be a plain string here, not pulled from an env var the dashboard cannot see. Keep this file node-local and out of version control.

Run each instance under a process manager, for example pm2:

pm2 start config/wa1.js --name wa1
pm2 save

Environment

| Variable | Default | Effect | | --- | --- | --- | | WA_HOST | 127.0.0.1 | Listen address. The Docker image sets 0.0.0.0 so a sibling container can reach it. | | WA_WEBHOOK_TIMEOUT | 10000 | Per-attempt webhook request timeout (ms). | | WA_WEBHOOK_RETRIES | 3 | Attempts before an inbound delivery is dropped (bounded exponential backoff on network/timeout/5xx/429). |

The Docker entrypoint (docker/boot.js) also reads WA_PORT, WA_WEBHOOK and WA_SECRET, and refuses to start without a WA_SECRET.

License

MIT. See LICENSE.