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

baekstage

v0.3.8

Published

Connect UI, API, server, database, and worker tests in a scenario-centered workspace.

Readme

Baekstage

Baekstage connects UI, API, server, database, and worker tests around a shared user scenario. It shows validation coverage and failure location in one development and test workspace while keeping Storybook, OpenAPI tooling, Playwright, and existing test frameworks in their specialist roles.

Explore UI states like Storybook, browse and execute API operations like Swagger, and run full user journeys with Playwright traces. Baekstage normalizes their results into one scenario graph instead of replacing those tools.

Quick start

npm install --save-dev baekstage

Create baekstage.config.ts in the project root for shared settings:

import { defineConfig } from "baekstage/config";

export default defineConfig({
  sources: { openapi: [{
    id: "dataset-manager",
    title: "Dataset Manager API",
    file: "./openapi.yaml",
    environments: { Local: "http://localhost:8080" },
  }] },
  suite: { name: "Checkout tests", scenarios: [] },
  playwright: { projectRoot: "." },
  webServer: {
    command: "npm run dev",
    url: "http://127.0.0.1:3000",
    reuseExistingServer: true,
  },
});

Scenarios are discovered recursively from *.baekstage.ts files by default:

// e2e/card-payment.baekstage.ts
import { defineScenario } from "baekstage";

export default defineScenario({
  id: "card-payment",
  title: "Card payment",
  execution: { adapter: "playwright", source: "e2e/card-payment.spec.ts", grep: "card succeeds" },
  nodes: [
    { id: "cart", title: "Cart", kind: "screen" },
    { id: "paid", title: "Payment complete", kind: "outcome" },
  ],
  edges: [{ id: "checkout", source: "cart", target: "paid" }],
});

The suite entry is optional; its name then defaults to the project directory. Configured and discovered scenarios are combined, and duplicate IDs fail at startup. Discovery can be scoped when the project contains large or inaccessible directories:

discovery: {
  root: "./e2e",
  exclude: ["fixtures", "generated/scenarios"],
  ignorePermissionErrors: true,
},

Start the workspace:

npx baekstage --open

Baekstage opens at http://127.0.0.1:4173. Select a scenario to run Playwright and review its node-scoped screenshots and Trace snapshots. The optional webServer setting starts the app when needed, reuses an existing healthy process, and stops processes started by Baekstage. Keep this setting in Baekstage rather than duplicating it in the Playwright config. Use Catalog to search registered OpenAPI operations, inspect schemas, find linked scenarios, and execute linked API nodes through the protected local proxy. Expected error cases such as 404 or 409 can pass when their configured response branch and assertions match. Branches without reproduction cases remain untested and are not inserted into the Scenario graph automatically.

To use npm run baekstage, add an ordinary project script:

{ "scripts": { "baekstage": "baekstage --open" } }

CLI

npx baekstage [options]

-c, --config <file>  Config file
-h, --host <host>    Host (default: 127.0.0.1)
-p, --port <port>    Port (default: 4173)
    --open            Open the browser
    --no-open         Do not open the browser
    --help            Show help

Config discovery supports baekstage.config.ts, .mts, .js, .mjs, and .json, plus the short baekstage.js, .mjs, and .json names. Results are stored in .baekstage/results unless configured otherwise.

Playwright network evidence is opt-in through observeApiScenario() or createBaekstageTest() from baekstage/playwright. Baekstage does not automatically inspect every existing test or parse network data from Trace ZIP files.

Embed in React or Next.js

"use client";

import { ScenarioViewer } from "baekstage";
import "baekstage/style.css";

export function TestGraphPage() {
  return <ScenarioViewer suite={suite}/>;
}

Baekstage styles are scoped to .baekstage-root and its portal, so importing the CSS does not restyle the host application's main, header, buttons, or sidebars.

Mark Playwright screenshots

import { markElementScreenshot } from "baekstage/playwright";

await markElementScreenshot(page.getByTestId("kpi"), testInfo, {
  scenarioId: "sampling-review",
  nodeId: "kpi-after",
  label: "KPI after review",
  target: "[data-testid=kpi]",
  checkpoint: true,
});

Documentation

Development

npm install
npm test
npm run build
npm pack --dry-run

License

MIT