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

@shopkit/apps-platform

v0.1.5

Published

Apps Platform host adapter + capability validator + sandbox shell. The iframe runtime shared across all 5 surfaces (Embed, Block, Account, Checkout, Admin).

Downloads

144

Readme

@shopkit/apps-platform

Apps Platform runtime: iframe host adapter, capability validator, and the static sandbox shell that ships to apps.ratio.win.

What's in this package

| Export | Purpose | | --- | --- | | HostAdapter | Base host adapter — mounts a sandboxed iframe, performs the LOAD_APP_CODE handshake, routes RPC through a capability-validated funnel | | CapabilityValidator | Per-method capability check against a manifest's declared scopes; per-surface allowlist enforcement | | EmbedsHostAdapter | Concrete subclass for the Embed surface | | sandbox-shell/sandbox.html | Static HTML deployed at apps.ratio.win/sandbox.html. Every Apps Platform iframe loads this URL. |

Subclasses for Block / Account / Checkout / Admin surfaces ship in later Phase 1 / 2 / 4 stories.

Quick usage (host side)

import { EmbedsHostAdapter } from "@shopkit/apps-platform";

const adapter = new EmbedsHostAdapter({
  appId: "acme-reviews",
  manifest: installedAppManifest,
  shellUrl: "https://apps.ratio.win/sandbox.html",
  bundleUrl: "https://cdn.ratio.win/apps/acme-reviews/1.0.0/index.js",
  bundleIntegrity: "sha384-...",
  sessionJwt: sessionJwtForThisInstall,
  networkOrigins: ["https://api.acme.com"],
  rpcHandlers: {
    "cart.read":      async () => cartStore.read(),
    "customer.read":  async () => customerStore.read(),
  },
  audit: (event) => analytics.rpcAudit(event),
});

const slot = document.getElementById("embed-slot")!;
await adapter.mount(slot);  // resolves when app:ready arrives

Design

See ARCHITECTURE.md for the full design — what's locked, why each piece exists, and how it fits with Phase 2/4.

Cross-references:

  • Architecture Reference §2.1 (sandbox runtime), §2.2 (host adapter), §3 (manifest contract), §4 (per-surface)
  • Spike outcomes that shaped this package:
    • RAP-8 — iframe RPC throughput (p95 0.8–1.1 ms laptop, 1.0 ms iOS)
    • RAP-9 — capability validator (11/11 attacks blocked; source-check is the security boundary)
    • RAP-10 — two-layer auth (RFC 7519 + 8693; targetOrigin "*" required for sandboxed iframes)
    • RAP-11 — Block mount budget (LCP Δ +4 ms with 5 iframes on PDP)

Jira

RAP-12 — Sandbox infrastructure. Part of Phase 1 (RAP-3).