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

@kidkender/archmind-nestjs-parser

v0.7.1

Published

Static analysis parser for NestJS projects — extracts routes, auth guards, DTOs, and class-validator field rules into ArchMind IR graphs.

Readme

@kidkender/archmind-nestjs-parser

Static analysis parser for NestJS projects — part of the ArchMind ecosystem.

Reads your NestJS source code and produces two things:

  1. IR execution graphs — one per HTTP route, capturing auth guards, validation gates, and side effects
  2. DTO schemas — field-level class-validator rules for every decorated DTO class

No server required. No runtime. Pure static analysis.


Installation

npm install @kidkender/archmind-nestjs-parser

Usage

Parse routes → IR graphs

import { parseNestJSProject } from "@kidkender/archmind-nestjs-parser"
import type { IntermediateExecutionGraph } from "@kidkender/archmind-protocol"

const graphs: IntermediateExecutionGraph[] = parseNestJSProject("/path/to/nestjs-project")

// graphs[0].entrypoint  → "POST /users"
// graphs[0].method      → "POST"
// graphs[0].path        → "/users"
// graphs[0].nodes       → ExecutionNode[] (auth gates, validation gates, ...)
// graphs[0].edges       → ExecutionEdge[]

Parse DTOs → field-level validation rules

import { parseDTOSchemas } from "@kidkender/archmind-nestjs-parser"
import type { DTOSchema } from "@kidkender/archmind-protocol"

const { schemas, index } = parseDTOSchemas("/path/to/nestjs-project")

// index.get("CreateUserDto")
// → {
//     className: "CreateUserDto",
//     file: "src/users/dto/create-user.dto.ts",
//     fields: [
//       { name: "email", type: "string", rules: [{ kind: "required" }, { kind: "email" }] },
//       { name: "age",   type: "number", rules: [{ kind: "required" }, { kind: "integer" }, { kind: "min", value: 18 }] },
//     ]
//   }

Parse a single DTO file

import { parseDTOFile } from "@kidkender/archmind-nestjs-parser"

const content = readFileSync("create-user.dto.ts", "utf-8")
const schemas = parseDTOFile(content, "src/users/dto/create-user.dto.ts")

What gets extracted

From routes

| What | How detected | |------|-------------| | HTTP method + path | @Get, @Post, @Put, @Patch, @Delete decorators | | Auth guards | @UseGuards(JwtAuthGuard) on controller or method | | Global guards | APP_GUARD provider in app module | | Public routes | @Public() decorator (skips global guard) | | DTO class name | @Body() body: CreateUserDto parameter type | | Validation pipe | @UsePipes(ValidationPipe) |

From DTOs

Supports all common class-validator decorators:

| Decorator | Rule emitted | |-----------|-------------| | @IsNotEmpty(), @IsDefined() | required | | @IsOptional() | optional | | @IsEmail() | email | | @IsUrl() | url | | @IsUUID() | uuid | | @IsInt() | integer | | @IsBoolean() | boolean | | @IsPositive() / @IsNegative() | positive / negative | | @Min(N) / @Max(N) | min / max | | @MinLength(N) / @MaxLength(N) | minLength / maxLength | | @Length(min, max) | minLength + maxLength | | @IsIn(['a', 'b']) | isIn with values | | @IsEnum(MyEnum) | enum with class name | | @Matches(/regex/) | regex | | @IsPhoneNumber() | phone | | @IsEthereumAddress() | ethereumAddress | | @IsDate() / @IsDateString() | date | | @IsAlphanumeric() | alphanumeric | | @IsNumberString() | numberString |

Multi-line decorators and ! (definite assignment) fields are handled correctly.


Output types

All output types are from @kidkender/archmind-protocol:

import type {
  IntermediateExecutionGraph,
  ExecutionNode,
  DTOSchema,
  FieldSchema,
  ValidationRule,
} from "@kidkender/archmind-protocol"

Requirements

  • Node.js 18+
  • TypeScript project using NestJS with class-validator decorators

License

MIT