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

@websitetherapy/platform-client

v0.4.2

Published

Thin in-build surface for WebsiteTherapy client sites: the visitor-agent widget mount + a next.config helper. Everything else (the agent runtime, plugins) is delivered as external platform services, so the owner build stays freeform with a near-zero platf

Readme

@websitetherapy/platform-client

The entire in-build platform surface for a WebsiteTherapy client site. It is deliberately tiny: the owner repo is a freeform standalone app, and almost all platform value is delivered as external services (the visitor-agent runtime, plugins) that the site merely consumes. This package is the small, versioned seam for the few things that genuinely must live in the owner's build.

This replaces the old template-sync file-push model. Instead of syncing a platform codebase into every client repo (and protecting an owner-zone denylist), the platform ships this one dependency. Platform updates propagate through a single version bump, not a file sync — and template-sync remains only for the legacy site-template forks.

What it provides

withPlatform(nextConfig) — @websitetherapy/platform-client/next-config

Merges the handful of platform-required next.config settings (kept minimal and stable) into the owner's own config. Today that's allowedDevOrigins for the admin preview's Vercel Sandbox — without it, Next 16 blocks cross-origin /_next dev assets and the preview never hydrates.

// next.config.ts (owner-owned)
import { withPlatform } from "@websitetherapy/platform-client/next-config";

export default withPlatform({
  trailingSlash: true, // owner's own settings
});

A future platform requirement reaches every site by bumping this package — no per-repo edit.

<PlatformWidget siteId /> — @websitetherapy/platform-client / /widget

Mounts the visitor-agent widget. The UI, chat logic, model keys, BotID, and per-site context all live on the platform (loaded from agent.websitetherapy.com/widget.js); this component only injects that loader with the site id. So platform-side improvements ship instantly with no per-site rebuild, and no secrets ever land in the client repo.

// app/layout.tsx (owner-owned) — mount once
import { PlatformWidget } from "@websitetherapy/platform-client";

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <PlatformWidget siteId={process.env.NEXT_PUBLIC_SITE_ID!} />
      </body>
    </html>
  );
}

The contract (where this fits the zone model)

  • Owner zone = everything else in the repo, freeform, never touched.
  • Platform allowlist = effectively just this package's surface.
  • Contract files (seeded at onboarding, owner-owned after): entity.json, content/plugins.json, redirects, the published site-manifest, and the one <PlatformWidget> mount line.

Operational note — publishing

For standalone owner repos (outside the monorepo) to npm install this, it must be published to a registry the owner's npm install can reach (npm org or GitHub Packages under @websitetherapy). Until then it resolves as a workspace package inside the monorepo only. Publishing + the version-bump propagation (a bot PR that flows through the working-copy reconciliation contract) is the next operational step for this package.