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-stax-ui

v0.2.7

Published

Create a new Stax application

Readme

create-stax-ui

CLI to scaffold new Stax projects.

Usage

# With pnpm
pnpm create stax-ui my-app

# With npm
npm create stax-ui my-app

# With yarn
yarn create stax-ui my-app

The CLI prompts for a project name (if not provided), template selection, and whether to install dependencies.

Templates

SPA (Single-Page Application)

A client-side only application with routing:

pnpm create stax-ui my-app --spa

Includes:

  • @stax-ui/dom — DOM rendering and reactivity
  • @stax-ui/router — Client-side routing
  • Vite dev server and build
  • Example routes with a reactive counter

SSR (Server-Side Rendering)

A full-stack application with server-side rendering and hydration:

pnpm create stax-ui my-app --ssr

Includes:

  • @stax-ui/dom — DOM rendering and reactivity
  • @stax-ui/router — Routing (shared between server and client)
  • @stax-ui/platform — SSR rendering and data loading
  • @stax-ui/vite-plugin — Dev server with HMR and server-code stripping
  • @effect/platform / @effect/platform-node — HTTP server
  • Production server with static file serving
  • Client hydration entry point

SSG (Static Site Generation)

A pre-rendered static site with client-side hydration. Good for portfolios, marketing sites, documentation, and blogs:

pnpm create stax-ui my-app --ssg

Includes:

  • @stax-ui/dom — DOM rendering and reactivity
  • @stax-ui/router — Routing (shared between build and client)
  • @stax-ui/platform — Static site generation via buildStaticSite
  • @stax-ui/vite-plugin configured in ssg mode — runs the static build after the client bundle
  • Client hydration entry point

Routes opt into static generation via Route.static({ paths, load, render }). The paths function returns all parameter sets to build; the load function runs at build time per path. Output is fully hydratable — animations and interactive components work the same as SSR once the client bundle loads.

Project Structure

SPA Template

my-app/
├── public/
│   └── styles.css
├── src/
│   ├── App.ts           # Root layout with nav + Outlet
│   ├── main.ts          # Client entry point
│   └── routes.ts        # Route definitions and router
├── index.html
├── vite.config.ts
├── tsconfig.json
└── package.json

SSR Template

my-app/
├── public/
│   └── styles.css
├── src/
│   ├── App.ts           # Root layout (shared server/client)
│   ├── client.ts        # Client hydration entry
│   ├── server.ts        # Production HTTP server
│   ├── vite-entry.ts    # Vite dev server SSR entry
│   └── routes.ts        # Route definitions and router
├── vite.config.ts
├── tsconfig.json
└── package.json

SSG Template

my-app/
├── src/
│   ├── App.ts           # Root layout (shared build/client)
│   ├── client.ts        # Client hydration entry
│   ├── entry.ts         # Vite SSG entry (exports router + app + document)
│   └── routes.ts        # Route definitions and router
├── vite.config.ts
├── tsconfig.json
└── package.json

Development

After creating your project:

cd my-app
pnpm install   # if you skipped auto-install
pnpm dev

Building

SPA

pnpm build     # Build for production
pnpm preview   # Preview production build

SSR

pnpm build     # Build client + server bundles
pnpm start     # Run production server

SSG

pnpm build     # Build client bundle + generate static HTML for all Route.static routes
pnpm preview   # Preview the static site locally

The build outputs static HTML pages plus a hashed client bundle to dist/. Deploy dist/ to any static host.

CLI Options

create-stax-ui <project-name> [options]

Options:
  --spa          Use SPA template
  --ssr          Use SSR template
  --ssg          Use SSG template
  --no-install   Skip dependency installation
  --help         Show help
  --version      Show version

If both a project name and a template flag are provided, all prompts are skipped.

Iterating on the templates locally

The three templates under templates/ are workspace packages (stax-template-spa, stax-template-ssg, stax-template-ssr) so you can dev-loop on them without publishing:

# Root-level install links each template's @stax-ui/* deps to the
# workspace copies via pnpm overrides.
pnpm install

# Edit templates/spa/src/App.ts and see it live:
cd packages/create-stax-ui/templates/spa
pnpm dev

Changes to @stax-ui/* sources reflect in the running template via the workspace symlinks. When the CLI scaffolds a user's project, the template's name field (stax-template-spa etc.) gets rewritten to the user's project name, and the @stax-ui/* deps ship with the version specs written in the template's package.json — the workspace overrides are dev-only, not published.