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-fastify-oop-decorators

v1.0.0

Published

The official scaffolding CLI tool to quickly bootstrap a Fastify application using **[fastify-oop-decorators](https://github.com/WaRtr0/fastify-oop-decorators)**.

Readme

create-fastify-oop-decorators

The official scaffolding CLI tool to quickly bootstrap a Fastify application using fastify-oop-decorators.

Get a NestJS-like Developer Experience (DX) with the raw performance of Fastify in seconds.

Features

  • Interactive CLI: A smooth, interactive prompt to configure your project.
  • TypeScript Ready: Pre-configured tsconfig.json with strict mode, experimentalDecorators, and emitDecoratorMetadata.
  • Modular Architecture: Generates an enterprise-ready folder structure (Controllers, Services, Modules, and Plugins).
  • Validation Options: Choose between native Fastify JSON schemas or class-based DTOs via ajv-decorators.
  • Linter Support: Out-of-the-box configuration for ESLint or Biome.
  • Package Manager Agnostic: Works flawlessly with npm, pnpm, yarn, and bun.

Quick Start

The easiest way to get started is to use npx. Run the following command in your terminal:

npx create-fastify-oop-decorators@latest my-awesome-api

You will be prompted to choose your preferences:

  • Which package manager to use?
  • Would you like to use ajv-decorators for class-based DTO validation?
  • Which linter would you like to use (ESLint, Biome, or none)?

Once the setup is complete, navigate into your new project and start the development server:

cd my-awesome-api
npm run dev

Non-Interactive Mode (CLI Flags)

You can bypass the interactive prompts by passing command-line arguments. This is perfect for CI/CD environments or quick setups.

npx create-fastify-oop-decorators@latest my-api --use-pnpm --ajv --biome --yes

Available Options:

| Flag | Description | | --- | --- | | --use-npm | Explicitly use npm to install dependencies. | | --use-pnpm | Explicitly use pnpm to install dependencies. | | --use-yarn | Explicitly use yarn to install dependencies. | | --use-bun | Explicitly use bun to install dependencies. | | --ajv / --no-ajv | Include (or exclude) ajv-decorators for DTO validation. | | --eslint | Initialize the project with an ESLint configuration. | | --biome | Initialize the project with a Biome configuration. | | --no-linter | Skip linter configuration entirely. | | --yes | Use your previously saved preferences (or defaults) without prompting. | | --reset-preferences | Clear the saved preferences from your machine. |

Generated Project Structure

By default, the CLI generates a modular, enterprise-ready architecture:

my-awesome-api/
├── src/
│   ├── hello/
│   │   ├── dto/
│   │   │   └── sayHelloPost.dto.ts  # (If ajv-decorators is enabled)
│   │   ├── hello.controller.ts      # Example Controller
│   │   ├── hello.module.ts          # Module grouping Controller & Service
│   │   └── hello.service.ts         # Example injectable Service
│   ├── plugins/
│   │   ├── ajv-decorators-plugin.ts # (If ajv-decorators is enabled)
│   │   └── bootstrap-plugin.ts      # Fastify OOP injection setup
│   ├── app.module.ts                # Root module
│   ├── build-app.ts                 # Fastify instance builder (Great for testing!)
│   └── index.ts                     # Entry point (Server listen)
├── package.json
├── tsconfig.json
└── eslint.config.mjs / biome.json   # Depending on your linter choice

Available Scripts

Inside your newly created project, you can run:

  • npm run dev: Starts the application in watch mode using tsx.
  • npm run build: Compiles the TypeScript code into the dist/ folder.
  • npm start: Runs the compiled application.
  • npm run lint: Runs your chosen linter (ESLint or Biome) to check your codebase.

Related Projects

License

This project is licensed under the MIT License.