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

doke-nest

v1.0.1

Published

Simple and beautiful API documentation generator for NestJS

Downloads

75

Readme

Doke

API documentation generator for NestJS applications with beautiful UI 🎨

Features

  • Simple API endpoint decorators
  • Beautiful and customizable documentation UI
  • Easy to use and integrate
  • Automatic metadata extraction
  • Customizable themes and layouts

Packages

This repository is a monorepo containing the following packages:

  • @doke/core - Core package for generating API documentation
  • @doke/ui - UI package for rendering beautiful documentation

Installation

# Install core package
npm install @doke/core

# Install UI package (optional) (Not support yet)
npm install @doke/ui

Quick Start

1. Prepare docs data and package.json

// package.json
  "scripts": {
    ...
    "generate-docs": "ts-node -r tsconfig-paths/register ./src/utils/generate-docs.ts", // <- Add this line
  }
// /docs/create-user.docs.ts
import { ApiDocsEndpoint } from '@doke/core'

export const DocsCreateUser = () => {
  const metadata: EndpointDecoratorMetadata<{
    body: 'email' | 'name'
    response: 'id' | 'email' | 'name'
  }> = {
    description: 'Create a new user',
    request: {
      body: {
        properties: {
          email: {
            type: 'string',
            description: 'User email address',
            required: true
          },
          name: {
            type: 'string',
            description: 'User full name',
            required: false
          }
        },
      }
    },
    response: {
      example: {
        id: "98874008-8915-4d53-9239-3913f7ee2089",
        email: "[email protected]",
        name: "benny"
      }
    }
  }

  return ApiDocsEndpoint(metadata)
}

2. Add Decorators to Your Controllers

import { Controller, Post, Body } from '@nestjs/common'
import { ApiDocsController } from '@doke/core'
import { DocsCreateUser } from '/docs'

@Controller('users')
@ApiDocsController({
  description: 'User management endpoints',
  tags: ['users']
})
export class UserController {
  constructor(...somethin) {}

  @Post()
  @DocsCreateUser() // use decorator make in /docs
  async createUser(@Body() createUserDto: CreateUserDto) {}
}

3. Generate Documentation

// docs.ts
import { ApiDocsGenerator } from '@doke/core'
import { NestFactory } from '@nestjs/core'
import { AppModule } from './app.module'

async function generateDocs() {
  const app = await NestFactory.create(AppModule)

  const generator = new ApiDocsGenerator(
    {
      name: 'My API',
      description: 'API documentation for my awesome project',
      version: '1.0.0'
    },
    './docs'
  )

  const discoveryService = app.get(DiscoveryService)
  await new ApiDocsGenerator(info, './', discoveryService).generate()
  await app.close()
}

generateDocs()

4. Run command

npm run generate-docs
or
yarn generate-docs

5. View Documentation (with @doke/ui) (Not support yet)

# Install doke UI globally
npm install -g @doke/ui

# Start documentation server
doke serve ./docs

Examples (Not support yet)

You can find more examples in our examples directory.

Contributing

We welcome contributions! Please see our contributing guide for details.

Support