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

@techninja/staticart

v0.4.14

Published

StatiCart — a full-featured e-commerce platform built 99% on static hosting

Readme


Built with the Clearstack no-build web component specification. Ships as an npm package that scaffolds complete stores via Clearstack's platform stacking system.

Architecture

flowchart TB
  subgraph CDN["Static Site (CDN)"]
    pages["Product pages"] ~~~ cart["Cart (localStorage)"] ~~~ spa["SPA (Hybrids.js)"]
  end

  subgraph API["Thin API (Lambda)"]
    checkout["POST /checkout"] ~~~ webhook["POST /webhook"] ~~~ stock["GET /stock"]
    orders["GET /orders"] ~~~ session["GET /session"]
  end

  subgraph DB["Database"]
    dynamo["DynamoDB (single table)"]
  end

  CDN -- "checkout" --> API
  API <-- "stock & orders" --> DB
  dynamo -- "stock changed" --> rebuild["Build Trigger (GitHub Actions)"]
  rebuild --> CDN

Quick Start (New Store)

mkdir my-store && cd my-store
npm init -y
npm install @techninja/staticart
npm install -D @techninja/clearstack
npx clearstack init -y --static   # Detects StatiCart, scaffolds store
npm install
npm run dev

Edit staticart.config.json to set your store name, then replace src/data/products.json with your catalog.

Quick Start (Development)

npm install
cd api && npm install && cd ..
npm run dev       # Start dev server (port from .env.local)
npm test          # Run tests (18 node + 31 browser)
npm run spec      # Spec compliance checker (11/11)

Configuration

All store settings live in staticart.config.json:

{
  "store": {
    "name": "My Store",
    "logo": "/assets/logo.svg",
    "locale": "en-US",
    "currency": "USD"
  },
  "shipping": { "type": "flat", "amount": 499 },
  "tax": { "automatic": false },
  "productFields": {
    "isbn": { "type": "string", "label": "ISBN" },
    "grade": { "type": "string", "label": "Condition" }
  }
}
  • store.name — displayed in the header (text fallback when no logo)
  • store.logo — optional path to logo image
  • shipping.type"flat", "tiered", or "custom" (see docs)
  • productFields — custom metadata fields rendered on product detail pages

Environment

Copy .env defaults. Override in .env.local (gitignored):

STRIPE_SECRET_KEY=sk_test_...    # From Stripe dashboard
STRIPE_WEBHOOK_SECRET=whsec_...  # From `stripe listen` CLI

Platform Stacking

StatiCart is a Clearstack platform. Child projects get:

  • Vendored components, store models, utils, and styles in src/vendor/staticart/
  • Config-driven branding, shipping, and product fields
  • Override any component via import map specificity
  • Override styles via CSS custom properties in tokens.css
  • Override translations via locales/overrides.json

See docs/app-spec/SCAFFOLD.md for the full override architecture.

Component Overrides

node scripts/override.js molecules/product-card

This copies the vendor component to src/components/ and patches the import map. Edit freely — your override is project-owned and never overwritten.

Vendor Sync (Development)

When developing StatiCart itself, sync source to the vendor directory before committing:

node scripts/sync-vendor.js

i18n

Default language is English. To translate:

  1. Set locale in staticart.config.json: { "store": { "locale": "es" } }
  2. Package translations live in src/locales/<lang>.json (UI chrome only)
  3. Project overrides in src/locales/overrides.json (English) and src/locales/overrides.<lang>.json
  4. Add custom keys for your own components in the override files

Cascade: package defaults → locale file → project overrides → project locale overrides.

The package translates framework UI (buttons, labels, status text). Store-specific terms — category names, variant labels, product descriptions — are project data. Define display names for your categories via category.<slug> keys in override files. Variant labels come from products.json and are the store owner's responsibility.

Shipping

Three shipping models:

  • Flat rate — single fixed amount ("type": "flat")
  • Tiered — rate tiers by cart subtotal with product classes and regional pricing ("type": "tiered")
  • Custom — project-provided module at api/lib/shipping-custom.js ("type": "custom")

Deploy

Static site: src/ → CDN (S3+CloudFront or Cloudflare Pages)

API: api/ → AWS Lambda via SAM:

cd api
sam build && sam deploy --guided

Build pipeline: GitHub Actions rebuilds on stock changes:

node scripts/build-products.js   # DynamoDB → dist/data/products.json

Specification

See docs/ for the full specification this project follows.

License

MIT