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

@frockbot/applet-sdk

v0.6.3

Published

Authoring SDK for FrockBot Applets: schema-first Durable Object server, TanStack DB client, component kit, linter, and the build pipeline.

Downloads

6,845

Readme

@frockbot/applet-sdk

The SDK a FrockBot Applet is written against: a schema-first Durable Object server, a TanStack DB client over one real-time socket, a precompiled component kit on the theme tokens, a linter, and the build pipeline the cloud build service runs.

An Applet is authored with the applet_* tools, built by apps/applet-build, and mounted as a Durable Object facet from an immutable artifact. There is no CLI: nothing outside the service builds an Applet, and no Computer is involved at any point.

Entry points

| Import | For | | ------------------------------- | -------------------------------------------------------- | | @frockbot/applet-sdk/server | Applet, table, t — the Applet's server.ts | | @frockbot/applet-sdk/client | createApplet, mount, newId — the Applet's ui.tsx | | @frockbot/applet-sdk/kit | the fourteen components (src/kit/README.md) | | @frockbot/applet-sdk/lint | the flat ESLint config and the five custom rules | | @frockbot/applet-sdk/protocol | wire protocol v1, for the kernel and for tests | | @frockbot/applet-sdk/build | runAppletBuildV1 — the five stages, for the service |

The build

runAppletBuildV1(directory, { mode }) is five named stages over one directory: descriptor, typecheck, lint, bundle, describe. check stops after the linter; build goes on to the artifacts. A stage that fails stops the run and names itself, and every failure is a list of {file, line, column, message, severity}.

manifest.json's tool declarations are derived by mounting the built server.js in Miniflare and calling health() — the same question the kernel asks the facet before it admits a generation, so the manifest cannot disagree with the code.

template/ is the scaffold a new Applet starts as. scripts/build-applets-assets.ts turns it into applets/template.generated.ts, which applet_create writes through the Workspace.

What runs where

server.ts becomes a single ESM file whose only import is cloudflare:workers, loaded by the kernel's APPLETS Worker Loader with no outbound network, and mounted as a facet under AppletState. ui.tsx becomes one self-contained HTML page served from the anonymous artifact origin into a sandboxed iframe, which receives its theme tokens and a short-lived viewer token through the host's init message and opens exactly one WebSocket back to the facet.

The Cloudflare programming model is not hidden: an Applet is a Durable Object with SQLite and hibernating sockets. What the SDK does hide is every binding name — an author sees tables, tools, and this.db.

Wire protocol v1

JSON frames, at most 64 KB each, decoded by src/protocol/ at both ends; an unknown type, field, or table fails closed.

| Direction | Frame | Carries | | --------------- | ---------- | ----------------------------------------------------------- | | server → client | hello | contract, generationId, viewer, tables, revision, cursor | | client → server | hello | contract, optional since cursor for catch-up | | server → client | snapshot | every row of every table, plus the cursor | | server → client | changes | ordered row changes, optionally tagged with a client txn id | | client → server | mutate | one client transaction: insert/update/delete | | server → client | ack | the resulting rows for that txn | | server → client | reject | why the txn was refused (the client rolls back) |

Tests

bun test test spike

Pure modules and the client are tested in bun test: the store runs against bun:sqlite, and test/loopback.ts joins the real protocol server to the real client transport through a pair of fake sockets. test/build.test.ts and spike/ run the real pipeline and the built Applet in Miniflare.