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

@pauldvlp/vp-react-ts-nestjs

v0.3.5

Published

Vite+ monorepo template: a React web app + a NestJS api (conformed to the Vite+ toolchain) sharing Zod contracts.

Downloads

40

Readme

@pauldvlp/vp-react-ts-nestjs

A Vite+ monorepo generator that scaffolds a full-stack workspace where the front-end and the back-end share one toolchain:

  • apps/web — a minimal React + Vite+ app that proxies /api to the server (no CORS)
  • apps/api — a NestJS api conformed to Vite+ (no Webpack, no nest CLI)
  • packages/contracts — shared Zod schemas + inferred types, the single source of truth for both ends

The api rides Vite+'s native Oxc transform, which emits emitDecoratorMetadata from tsconfig.json — so Nest's dependency injection works with no transform plugin. Dev runs on vite-node --watch, the production build is a Vite SSR bundle (dist/main.js), and a single vp check / vp test / vp run -r build covers the whole workspace.

Options can be passed on the vp create command line (anything after --) or answered interactively.

Usage

Published under the @pauldvlp/create manifest:

# Interactive (prompts for anything you don't pass)
vp create @pauldvlp:vp-react-ts-nestjs

# Non-interactive, fully specified
vp create @pauldvlp:vp-react-ts-nestjs -- \
  --name my-app --scope @acme --apiPort 3000 --webPort 5173

Boolean options (--swagger, --serveWeb, --docker, --install) accept both forms: pass --swagger to enable or --no-swagger to disable. Omit any option to answer it at the interactive prompt.

Options

| Option | Type / values | Default | Notes | | ------------ | ------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | --name | string | my-app | Root project / package name. | | --scope | string | @<name> | npm scope for workspace packages → @scope/web, @scope/api, @scope/contracts. Defaults to the project name prefixed with @ (e.g. --name acme@acme); falls back to @app. | | --apiPort | string | 3000 | Port the NestJS api listens on (substituted into the env default + the web proxy). | | --webPort | string | 5173 | Port the web dev server listens on. | | --swagger | boolean | false | Expose Swagger UI at /docs and the OpenAPI JSON at /docs.json (adds @nestjs/swagger). | | --serveWeb | boolean | false | Have the api serve the built web app for a single deployable (adds @nestjs/serve-static). | | --docker | boolean | false | Emit a multi-stage apps/api/Dockerfile (+ root .dockerignore). | | --install | boolean | true | Run pnpm install after scaffolding. false = files only. |

What it scaffolds

produce() reads the static monorepo skeleton under template/, rewriting the @app scope, project name and ports, then conditionally wires the optional features via marker comments:

  • --swagger swaps the // __SWAGGER_*__ markers in apps/api/src/main.ts for a DocumentBuilder + SwaggerModule.setup('docs', …, { jsonDocumentUrl: 'docs.json' }); otherwise the markers are stripped.
  • --serveWeb swaps the // __SERVEWEB_*__ markers in apps/api/src/app.module.ts for a ServeStaticModule.forRoot pointing at apps/web/dist (excluding /api/*); otherwise stripped.
  • --docker keeps apps/api/Dockerfile + the root .dockerignore; otherwise both are dropped.

The optional Nest deps (@nestjs/swagger, @nestjs/serve-static) are added to apps/api/package.json only when their flag is on, and the README's <!-- SWAGGER/SERVEWEB/DOCKER --> doc blocks are kept or dropped to match. With --install, pnpm install runs as a post-scaffold step.

Develop the generator

pnpm install
node bin/index.ts --help            # list options
node bin/index.ts --directory /tmp/demo --name demo --scope @demo --apiPort 3000 --webPort 5173