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

arcaptcha-fastify-template

v1.0.0

Published

ArcCaptcha Fastify template - Scaffold for Fastify backend apps (Fastify + ESLint + Prettier)

Readme

arcaptcha-fastify-template

A CLI tool to quickly scaffold a Node.js Fastify backend project with ESLint and Prettier configured out of the box.

Overview

This project provides a template generator that can be used globally via npx:

npx arcaptcha-fastify-template my-app

It will create a ready-to-run backend project using:

  • Fastify
  • ESLint (flat config) for consistent linting
  • Prettier for code formatting
  • Predefined folder structure (src/, routes/, etc.)

How This Template Was Created

  1. Initialized a Node project

    mkdir arcaptcha-fastify-template
    cd arcaptcha-fastify-template
    npm init -y
  2. Created folders

    bin/
    template/
  3. Added a CLI entry point

    The root package.json includes:

    {
      "bin": {
        "arcaptcha-fastify-template": "bin/index.js"
      },
      "files": ["bin", "template"]
    }
  4. Created the CLI logic (bin/index.js)

    This script:

    • Takes a project name (e.g. my-app)
    • Copies everything from the template/ folder
    • Installs dependencies
    • Prints the next steps for the user
#!/usr/bin/env node
import fs from "fs";
import path from "path";
import { execSync } from "child_process";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const targetDir = process.argv[2];
if (!targetDir) {
    console.error("❌ Please provide a project name");
    process.exit(1);
}

const destPath = path.join(process.cwd(), targetDir);
const templatePath = path.join(__dirname, "../template");

if (fs.existsSync(destPath)) {
    console.error("❌ Directory already exists.");
    process.exit(1);
}

fs.cpSync(templatePath, destPath, { recursive: true });

console.log("✅ Project files copied.");
console.log("📦 Installing dependencies...");

execSync("npm install", { cwd: destPath, stdio: "inherit" });

console.log("\n🎉 All done!");
console.log(`➡️  cd ${targetDir}`);
console.log("➡️  npm run dev");

Template Structure

All template files live under template/. These files are copied into the new project when the CLI runs.

template/
├── src/
│   ├── server.js
│   └── routes/
│       └── index.js
├── eslint.config.js
├── .prettierrc
├── .prettierignore
└── package.json

Highlights:

  • src/server.js: Minimal Fastify server setup.
  • eslint.config.js: Flat ESLint config for Node.js environment.
  • .prettierrc & .prettierignore: Code formatting rules.
  • package.json: Includes Fastify, scripts (npm run dev, npm run lint, etc.).

Development and Publishing

1. Test Locally

node bin/index.js demo-app
cd demo-app
npm run dev

2. Create a tarball (for inspection)

npm pack

3. Publish to npm

npm publish --access public

4. Verify

npm info arcaptcha-fastify-template

5. Test the generated project

npx arcaptcha-fastify-template my-new-api

Check that .prettierrc and .prettierignore exist in the new project.

Updating the Template

  1. Make changes inside template/

  2. Bump version:

    • Patch: npm version patch
    • Minor: npm version minor
    • Major: npm version major
  3. Publish again: npm publish --access public

  4. Verify: npm info arcaptcha-fastify-template

Local Development Shortcut

npm link
arcaptcha-fastify-template test-app
npm unlink -g arcaptcha-fastify-template

Commands Summary

| Command | Description | | ----------------------------------- | -------------------------------------- | | npx arcaptcha-fastify-template my-app | Scaffold a new Fastify backend project | | npm run dev | Start the development server | | npm run lint | Run ESLint | | npm run format | Format files with Prettier |

License

MIT © 2025 — Melika Bagheri