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

@volter/browser-substrate

v0.1.99

Published

Run a folder in a browser tab: one command, a Dockerfile as the config, static files out

Downloads

11,797

Readme

browser-substrate

The command that brings a project into a browser tab. Run it in the project's folder on your machine:

npx @volter/browser-substrate dev

It reads the folder's setup (a Dockerfile or compose file, or else package.json with its lockfile, pyproject.toml or requirements.txt, a Procfile), prepares the image on your machine, and opens a tab that runs it. Everything before the project's CMD happens here, once: dependencies are resolved by the package manager the lockfile names and prepared as packs. The tab links those packs and runs CMD; it does not install, clone or build (see the repository README's four rules).

To change what the tab has, change the folder and run dev again: a new dependency goes in the lockfile, a new program in the Dockerfile. Something added to a running tab without a new image comes from the catalog as a live pack.

Commands

| Command | What it does | |---|---| | browser-substrate dev | Prepare this folder's image and run it in a tab, attached to a World. -- <command> names what serves it, in place of what the folder's files say. | | browser-substrate build | Write ./dist: the page and the image, deployable to any static host. | | browser-substrate preview | Serve ./dist locally with its isolation headers. | | browser-substrate init | Write a playground Dockerfile and bootstrap.mjs into an empty folder. | | browser-substrate dockerfile | Write a Dockerfile from what this folder carries. |

browser-substrate with no command prints every option.

For a prepared Next production app, entries/start-next-on-demand.cjs is an optional image entry. It selects Next's preloadEntriesOnStart: false, keeping unrelated routes out of startup; their first request loads them normally. Pass its source to node -e so Next resolves from the application's directory:

NEXT_IMAGE_ENTRY=$(node -p "require.resolve('@volter/browser-substrate/entries/start-next-on-demand.cjs')")
browser-substrate dev --world /path/to/world --dir apps/web --build '<project build command>' \
  -- node -e "$(cat "$NEXT_IMAGE_ENTRY")"

The entry reads the build's normalized .next/required-server-files.json config (set NEXT_IMAGE_DIST_DIR for a custom build directory) and uses Next's own standalone configuration seam and CLI. It refuses versions without that scheduling option. It does not edit the project or its installed framework.

In a tab

A tab also registers a browser-substrate program. Typed there, dev reads the setup of a folder already in the tab and starts its dev command. A folder that arrived without a prepared image has nothing to link, and its install is refused, never run: the tab installs nothing (Article 1).

Words used here are defined in the glossary.

Shared Workbench programs

@volter/browser-substrate/programs.js exports createWorkbenchPrograms(options, host). The returned definitions have id, title, icon and mount(element, { close }); mounted views support show, hide, refresh and dispose. The program set owns sessions and releases them on dispose. A window host mounts on first open and hides without disposing when a window closes.

mountToolbar consumes these same definitions. Its buttons are icon shortcuts to floating windows. No tool or shell starts unless opened explicitly (including terminal: { open: true }); stored visibility is ignored. A desktop consumes the definitions directly and supplies its own window manager.

share.sources returns named ShareSource objects with id, title, kind, optional supported audience modes, and open(access, signal). The result is a ShareHandle; the host remains responsible for authorization and publication. The existing port-sharing callback remains supported. screen-share-source.js supplies the AlmostCDP adapter for a substrate preview; the prepared viewer is view only and shows DOM reconstruction, not canvas/video. See ADR-0058.