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

@selorax/runtime

v0.1.17

Published

> The multi-tenant Next.js renderer for the **SeloraX Pages** platform — the engine that turns a tenant's HTML/TSX project into a served storefront.

Downloads

2,013

Readme

@selorax/runtime

The multi-tenant Next.js renderer for the SeloraX Pages platform — the engine that turns a tenant's HTML/TSX project into a served storefront.

npm i @selorax/runtime

0.1.0 · pre-1.0. Peer deps: next@16, react@19, react-dom@19, plus @selorax/data + @selorax/platform.

What it is

Every SeloraX Pages tenant is a Next-app-router-shaped project of files (routes/, components/, partials/, _layout.*). @selorax/runtime is the shared engine that resolves a request to the right file, compiles/loads it, fetches its data, composes layouts, and renders it — with platform islands hydrating in the browser.

You rarely install this by hand. It's emitted into a self-hostable Next app by selorax-pages build and consumed via transpilePackages. This README is for understanding it (or hand-assembling a runtime).

How it works — the SourceProvider seam

One render core, three sources, selected by the SX_SOURCE env var:

| SX_SOURCE | Provider | Where source comes from | |---|---|---| | hosted (default) | HostedProvider | the backend + R2 (the platform's own hosting) | | local | LocalProvider | a project folder, compiled on the fly (selorax-pages dev) | | prebuilt | PrebuiltProvider | a precompiled manifest + artifacts (selorax-pages build output) |

The render core (JIT loader, layout composition, templating, data loaders) and the platform islands are shared and source-agnostic — only the provider + tenant/auth context differ.

Exports

import { CatchAll, RootLayout, getProvider, getTenantContext,
         cartEnrichPOST, checkoutPOST, ordersModifyPOST } from '@selorax/runtime';
import '@selorax/runtime/client';     // re-exports the platform islands for the client bundle
// '@selorax/runtime/cart-sdk' → the built /selorax-cart.js (mounts window.SeloraX.cart)
  • .CatchAll (the [[...slug]] page), RootLayout, the provider/context helpers, and the commerce API route POST handlers.
  • ./client — the platform islands, re-exported so Next bundles them.
  • ./cart-sdk — the cart SDK script asset.

Notes

  • Next.js 16 (App Router, Turbopack) — not the Next you may remember (async params/headers(), serverExternalPackages, etc.).
  • @selorax/data + @selorax/platform are peer dependencies — the consuming app provides them.
  • @selorax/compiler is only needed in local (dev) mode; LocalProvider lazy-requires it, so prebuilt/hosted never load it.
  • In local dev (SX_SOURCE=local) the data cache is bypassed and --watch enables SSE live-reload.

Part of SeloraX Pages

@selorax/data · @selorax/runtime · @selorax/platform · @selorax/compiler · @selorax/pages-cli