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-uptimizr

v2.0.0

Published

Scaffold a self-host of the Uptimizr OSS 3D-analytics collector — Docker-free, single-file DuckDB by default, or backed by Postgres / ClickHouse / SQL Server. Run with `npm create uptimizr@latest`.

Readme

create-uptimizr

Scaffold a self-host of the Uptimizr OSS 3D-analytics collector in one command — Docker-free and single-file (DuckDB) by default, or backed by the Postgres, ClickHouse or SQL Server store you already run.

npm create uptimizr@latest my-analytics
# or pick the engine + name up front:
npm create uptimizr@latest my-analytics -- --engine three --name "My Game"
# or scaffold the full suite (collector + dashboard + runnable demo):
npm create uptimizr@latest my-analytics -- --full
# or point it at an external database instead of DuckDB:
npm create uptimizr@latest my-analytics -- --store postgres

It generates a ready-to-run folder:

my-analytics/
  package.json          # scripts wired to the `uptimizr` CLI (+ the chosen store package)
  .env                  # generated visitor-hash secret + store config (git-ignored)
  .gitignore
  README.md
  client-snippet.<engine>.ts   # paste-ready connector wiring for your app
  demo/                 # (optional, --demo) a runnable Babylon scene + tiny static server
  data/                 # (DuckDB only) the store file lives here

Then:

cd my-analytics
npm install
npm run setup     # mints your first project + API key (printed once)
npm start         # ingestion + query API on http://localhost:4318

Optional features

By default the scaffold is collector only. When run interactively you're asked whether to add each extra; non-interactively, pass the flags. They let you go from a bare collector to the full suite so you can test everything in one go:

  • Dashboard (--dashboard) — adds @uptimizr/dashboard and an npm run dashboard script (serves the analytics UI on http://localhost:3000; point its connection bar at the collector with your API key). The collector's COLLECTOR_CORS_ORIGINS is widened to allow it.
  • Demo (--demo) — writes a self-contained Babylon demo scene + a zero-dependency static server and an npm run demo script (serves on http://localhost:5173). Paste the projectId from npm run setup, then orbit/click the scene to generate camera, pointer, and mesh events. It uses Babylon (the reference connector) regardless of your chosen client engine.
  • --full — both of the above. --minimal forces collector only (skips the prompts).

With the full suite, run three processes (npm start, npm run demo, npm run dashboard) to watch events flow from the demo through the collector into the dashboard.

Choosing a store

The collector keeps events and metadata in one store, selected by COLLECTOR_STORE in the generated .env. When run interactively you're asked which one; non-interactively, pass --store:

  • duckdb (default) — a single .duckdb file under data/. No Docker, no database server, nothing else to install.
  • postgres — the single-tenant @uptimizr/db-postgres store. .env gets POSTGRES_URL (the database must already exist).
  • clickhouse — the single-tenant @uptimizr/db-clickhouse store for high-volume ingestion. .env gets CLICKHOUSE_URL / CLICKHOUSE_DATABASE / CLICKHOUSE_USER / CLICKHOUSE_PASSWORD.
  • mssql — the single-tenant @uptimizr/db-mssql store for SQL Server 2022+ / Azure SQL. .env gets MSSQL_URL.

For the external stores the scaffold adds the store package to package.json, writes local-server placeholder connection settings you edit to match your database, and skips the data/ folder. Start the database, then npm run setup creates the schema and mints the first project + API key there — the uptimizr CLI honours COLLECTOR_STORE for init / new-project / migrate just like serve does. The scaffold pins @uptimizr/collector-server and the store package to ^2.0.0, and the two majors must match (@uptimizr/db 2.0.0 changed the API-key metadata contract).

Options

| Flag | Default | Description | | ---------------- | -------------------- | ------------------------------------------------------------------------ | | [dir] | uptimizr-analytics | Folder to create (prompted when interactive). | | --engine <e> | babylon | babylon, babylon-lite, three, r3f, playcanvas, aframe. | | --store <s> | duckdb | duckdb, postgres, clickhouse, mssql (prompted when interactive). | | --name <name> | folder name | Human-readable project name. | | --port <n> | 4318 | Collector port baked into config + snippet. | | --dashboard | off | Include the analytics dashboard (@uptimizr/dashboard). | | --no-dashboard | — | Set dashboard inclusion off. | | --demo | off | Include a runnable Babylon demo scene. | | --no-demo | — | Set demo inclusion off. | | --full | off | Full suite: collector + dashboard + demo. | | --minimal | — | Collector only; skip the interactive prompts. |

The scaffolder only writes files — the generated folder is operated entirely via the uptimizr CLI (init / serve / new-project / migrate); it never reimplements collector logic.