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

@latrinebot/widgets

v0.4.5

Published

Embeddable Latrine Bot widgets: live stats, holder list, status badge.

Readme

@latrinebot/widgets

Embeddable, framework-free widgets for the Latrine Bot public API. Drop them into a token page, an OBS browser source, or any HTML you can edit.

npm version License: MIT

Part of the dfnwtf/latrinebot monorepo.

Three ways to embed

1. iframe (zero JS on your page)

<iframe
  src="https://latrinebot.com/embed/?id=YOUR_WIDGET_UUID"
  width="480" height="560"
  style="border:0;background:transparent"
  loading="lazy"
  title="Latrine Bot live stats"
></iframe>

2. Script tag (flows with your DOM, theme overrides)

<div id="lb-widget"></div>
<script
  src="https://cdn.jsdelivr.net/npm/@latrinebot/widgets/dist/embed.js"
  data-widget-id="YOUR_WIDGET_UUID"
  data-target="#lb-widget"
  data-poll-sec="20"
  defer
></script>

3. Programmatic (frameworks, SPAs)

import { mountWidget } from "@latrinebot/widgets";

const ctrl = mountWidget({
  widgetId: "YOUR_WIDGET_UUID",
  target: "#lb-widget",
  pollSec: 20,
});

// later
ctrl.refresh();
ctrl.destroy();

What you get out of the box

  • Stat tiles - claimed SOL, holders paid, airdrops sent, market cap, cycles, tier floor, hold cycles
  • Status pill - running / stopped + last cycle timestamp
  • Token ticker - symbol + short mint
  • Event log - the last 1-30 cycle events, scrolling
  • Last event - one-line summary card
  • Custom label + divider - styling primitives

Layout, theme, and which blocks are visible are configured in the dashboard at latrinebot.com/app. The widget UUID is stable.

Themes

Eight presets bundled (medieval, stream-dark, stream-light, minimal, obs, cyberpunk, pastel, brutalist). All exposed as CSS variables on the embed root so a parent stylesheet can override anything:

.lb-widget {
  --lb-text: #2b2118;
  --lb-muted: #6b5c4a;
  --lb-accent: #c45c00;
  --lb-border: #2b2118;
  --lb-panel-bg: rgba(255, 255, 255, 0.6);
}

OBS / streaming

The obs theme uses a transparent canvas. The stream-hud layout preset is sized 360 by 720, ready to drop as a sidebar in OBS:

  1. Add Browser source.
  2. URL: https://latrinebot.com/embed/?id=YOUR_WIDGET_UUID&theme=obs&layout=stream-hud
  3. Width 360, height 720.
  4. Check Shutdown source when not visible.

How it works

The embed library calls two public endpoints:

| Endpoint | Cached | Purpose | |---|---|---| | GET /api/public/widgets/:id/config | 60 s | Layout + theme | | GET /api/public/widgets/:id/live | 5 s | Stats + last events |

No auth. No tokens. No CORS quirks. Safe to embed on third-party domains.

The poll interval defaults to 20 seconds. Set data-poll-sec or pollSec to override (10 to 120).

Examples

npm install
npm run serve:examples
# open http://localhost:3001

Security

These widgets only call public endpoints. They do not send any wallet, signature, or metrics key over the network. You can safely embed them on a third-party site.

Bundle size

ESM build is ~5 KB gzipped, zero deps.

License

MIT - see the root LICENSE.