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

@x-titan/resolver

v0.0.1

Published

This is a minimal and extensible boilerplate for Node.js projects using TypeScript. It works for CLI tools, backend, Electron, or any other project without being tied to frameworks or databases.

Readme

Node.js Boilerplate (TypeScript, ESM, Env-ready)

This is a minimal and extensible boilerplate for Node.js projects using TypeScript.
It works for CLI tools, backend, Electron, or any other project without being tied to frameworks or databases.


Features

  • Latest LTS Node.js
  • TypeScript with strict type checking
  • ESM (module: nodenext)
  • ESLint + Prettier for code quality
  • Vitest for testing
  • Environment switcher (.env.development, .env.test, .env.production)
  • Flexible script structure (build, dev, start, debug, test)
  • Easily extendable (build:electron, start:cli, etc.)
  • Bundling with tsup or plain TypeScript compilation

Installation

  1. Clone the repository:
git clone <repository> my-project
cd my-project
  1. Install dependencies:
npm install
# or yarn
  1. Create environment files based on .env.example:
cp .env.example .env.development
cp .env.example .env.test .env.test
cp .env.example .env.production .env.production

.env files store environment variables. For production, use real secrets via CI/CD.

Project Structure

src/           # Source code
tests/         # Tests
dist/          # Build output
tsconfig*      # TypeScript configs
tsup.config.ts # tsup bundler config
nodemon.json   # nodemon config for development
.env.*         # Environment files

Scripts

Scripts are defined in package.json.

Main scripts

| Script | Description | | ------------------------------- | -------------------------------------------------------- | | npm run start | Run production build (dist) with .env.production | | npm run build | Main build using TypeScript (tsc) | | npm run dev | Development mode with nodemon and .env.development | | npm run test | Run tests with .env.test | | npm run debug | One-time run of TypeScript code directly (ts-node src) | | npm run lint | Run ESLint | | npm run format / format:fix | Check and fix code formatting with Prettier |

Namespaced / extended scripts

| Script | Purpose | | --------------- | ------------------------------------ | | build:tsc | Compile with TypeScript | | build:tsup | Bundle with tsup (cjs + esm + d.ts) | | dev:nodemon | Development with nodemon | | test:vitest | Run tests | | test:watch | Run tests in watch mode | | test:coverage | Run tests with coverage report | | debug:ts | Run TypeScript directly with ts-node | | debug:tsx | Run TypeScript directly with tsx |

You can add new scripts (build:electron, start:cli) without changing existing ones.

First Run

  1. Start development with hot reload:
npm run dev
  1. One-time run TypeScript (without building):
npm run debug
  1. Build for production:
npm run build
  1. Run production build:
npm run start

Environment Configuration

Files:

  • .env.development — local development
  • .env.test — testing / CI
  • .env.production — production

NODE_ENV determines which environment file is loaded.

Access variables in code via process.env.VARIABLE_NAME.

Environment Switcher

Using dotenv-cli:

npm run dev # uses .env.development
npm run test # uses .env.test
npm run start # uses .env.production

You can add more environments (staging) without modifying existing scripts.

Why This Structure

Boilerplate is project-type agnostic, usable for any Node.js project.

Scripts use namespaces for extensibility (build:tsup, build:electron).

Dev/test/prod separation via env files makes it CI/CD ready.

Supports both plain TypeScript compilation and bundling with tsup.

Strict TypeScript and ESLint settings enforce code quality from the start.