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

create-state-surface

v0.1.1

Published

Scaffold a new StateSurface project

Readme

create-state-surface

Scaffold a new StateSurface project in seconds.

Usage

npx create-state-surface my-app
cd my-app
pnpm install
pnpm dev

Open http://localhost:3000 — your app is running with full SSR, NDJSON streaming, and live action binding.

What You Get

The generated project comes with a complete working app:

my-app/
  server.ts                # Express + Vite dev server entry
  routes/
    index.ts               # Home page (hero, concepts, features)
    guide/[slug].ts        # Dynamic guide pages with TOC
    examples/
      streaming.ts         # Full/partial/accumulate frame demo
      actions.ts           # Declarative action playground
      chat.ts              # Streaming chatbot with abort
      search.ts            # Form submission + pending state
      view-transition.ts   # View Transition API morphing
      ui-patch.ts          # CSS class/variable patching
    _shared/               # Cross-route templates & transitions
  layouts/                 # Page composition helpers
  shared/                  # Data helpers, i18n utilities
  client/                  # Tailwind CSS entry + plugins
  tsconfig.json
  vite.config.ts
  vitest.config.ts

Every route includes its own templates/ (TSX) and transitions/ (async generators) — all auto-registered by the framework.

Options

npx create-state-surface <project-name>
npx create-state-surface --help

| Argument | Description | |---|---| | <project-name> | Directory name for the new project (required) |

Project names must start with a letter or number and may include letters, numbers, -, or _.

What Happens Under the Hood

  1. Downloads the latest scaffold template from the StateSurface repository
  2. Substitutes project name and runtime version into package.json
  3. Renames dotfiles (.gitignore, .npmrc)
  4. Initializes a git repository

No global dependencies. No configuration prompts. One command, ready to develop.

After Scaffolding

pnpm dev                   # Start dev server with HMR
pnpm build                 # Production build
pnpm start                 # Run production server
pnpm test                  # Run tests (Vitest)
pnpm format                # Format with Prettier

Updating the Runtime

The CLI is for new projects only. To update an existing project's framework runtime:

pnpm up state-surface
pnpm test && pnpm build

Do not re-run create-state-surface on an existing project — it will not overwrite, and your customizations live in user-space files that the runtime upgrade respects.

Requirements

  • Node.js >= 20
  • pnpm (recommended) or npm

License

MIT