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

@asteby/storefront-kit

v0.1.1

Published

React Router v7 adapter for @asteby/storefront stores: per-destination session cookies, SWR cache, Node server runtime and route modules, behind subpaths. Skeleton: the subpaths are typed and documented; the implementations land in follow-up changes.

Downloads

425

Readme

@asteby/storefront-kit

React Router v7 adapter for stores built on @asteby/storefront (pure client and rules) and @asteby/storefront-react (UI). It is where the "glue" every store used to copy lives: session cookies, cache, the Node server runtime and the route modules.

Status: skeleton. Every subpath below is typed and documented but still empty of behaviour. The implementations arrive one subpath at a time, each as an additive minor. Do not move store code here by hand; each piece is extracted with a parity test against the stores that carry it today.

Why a separate package

@asteby/storefront-react does not depend on a router (it takes renderLink and plain actions). react-router and the Node HTTP runtime therefore live here, as peers, so a store that does not use them never installs them.

Install

pnpm add @asteby/storefront @asteby/storefront-react @asteby/storefront-kit react-router

Peers: react-router ^7, @asteby/storefront >=0.55 <1 (a fixed range on purpose: ^0.x would freeze the minor; widen it when the SDK goes 1.0). @asteby/storefront-react and react become peers in the change that adds the first subpath importing them; until then nothing in the kit imports them.

Subpaths

| Import | Runs in | What it will hold | | --- | --- | --- | | @asteby/storefront-kit/session | Node, edge | createStoreSession: signed cookies per slot (cart, customer, receipt, pay, selection), optional per-destination scoping and legacy cookie names. | | @asteby/storefront-kit/cache | Node, edge | SWR cache for Ops reads, cacheHeaders(kind), per-request memo. | | @asteby/storefront-kit/server | Node only | createStoreServer: the HTTP runtime with built-in plugins (compress, security-headers, image-variants, storage-proxy, resilience, demo-gate) and the store's own StorePlugins. | | @asteby/storefront-kit/routes | Node, edge, build | Route-module factories (cart, checkout pay/status, returns, newsletter, sitemap/robots/llms) and the generated route table. | | @asteby/storefront-kit/css | Tailwind | One stylesheet that adds the @source lines for the installed SDK packages. |

/* app/app.css */
@import '@asteby/storefront-kit/css';

Extension contract (seams)

A store is a thin layer on top of the kit. Its own code may live only in the declared seams; outside them there is no store-owned file, so an upgrade never has to merge anything.

| Seam | Typical location | Holds | | --- | --- | --- | | components | app/store/** | Own sections and components. | | config | app/config/** | Store configuration. | | i18n | app/i18n/overrides | Text overrides per locale. | | theme | app/theme/** | Theme tokens. | | mocks | app/mocks/** | Mock data for the mock mode. |

The store declares them in store.extensions.json, and the drift check reads its layers from that file instead of hard-wired patterns:

{
  "version": 1,
  "seams": {
    "components": ["app/store/**"],
    "config": ["app/config/**"],
    "i18n": ["app/i18n/overrides/**"],
    "theme": ["app/theme/**"],
    "mocks": ["app/mocks/**"]
  }
}

(StoreExtensionsManifest in @asteby/storefront-kit/routes types this file.)

On top of the file seams, each route module exposes the same three overrides (RouteModuleOverrides), which is the only way to change a kit route:

// Planned shape; the factories land with the route modules.
checkoutPayRoute({
  hidden: ['cash'],              // hide parts of the module by id
  slots: { aside: <MyNotice /> }, // named content slots the module renders at fixed points
  messages: { 'pay.title': '…' }, // message overrides, by id
})

Rules of the contract:

  1. Nothing hardcoded. Cookie names, lifetimes, cache sizes, plugin lists, route prefixes and texts are options that the store takes from its Ops profile or its config, never constants inside the kit.
  2. General. No store, market or industry names appear in the kit. Industry differences are configuration that turns on general pieces.
  3. Additive. New options are optional and off by default; existing exports are not removed in a minor.
  4. Repeated three times, extracted. A file that two stores both carry outside the seams is a candidate to move into the kit; three block the build.
  5. Destination, not market. Per-destination scoping uses the destination of @asteby/storefront. "Branch" in a store means a pickup point and is never used for the destination.

Development

pnpm --filter @asteby/storefront-kit build
pnpm --filter @asteby/storefront-kit test

src/size-budget.test.ts bundles each subpath with the peers external and fails if a subpath grows past its budget or inlines the router, React or the SDK (checked on the resolved import graph, with a negative control that inlines a peer on purpose). The shared external list is src/peer-externals.ts.