NotiDocs Wiki

Welcome to the NotiDocs Wiki. Here you’ll find a complete reference of all tags supported by the npm library, including their properties, examples, and use cases. Use the sidebar to navigate or search for a specific tag.

@ND_Project

Defines the root project and its general metadata.

Properties

NameTypeRequiredDescription
nameStringYesProject name
versionStringNoProject version
descriptionStringYesProject description
instructionsStringNoInstructions to run the project
entrypointStringNoMain entry file

Example

/* @ND_Project {
  name: "TestApp",
  version: "1.0.0",
  description: "A test application for NotiDocs",
  instructions: "Run 'node src/index.js' to start",
  entrypoint: "src/index.js"
} */

@ND_Module

Groups related functionalities into a module.

Properties

NameTypeRequiredDescription
nameStringYesModule name
descriptionStringYesModule description
parentStringNoParent module or project name

Example

/* @ND_Module {
  name: "UtilsModule",
  description: "Utility functions",
  parent: "TestApp"
} */

@ND_Class

Documents a class in the code.

Properties

NameTypeRequiredDescription
nameStringYesClass name
descriptionStringYesClass description
parentStringNoParent module or class
statusStringNoStatus (e.g., 'in progress', 'done')

Example

/* @ND_Class {
  name: "Calculator",
  description: "A calculator utility class",
  parent: "UtilsModule",
  status: "done"
} */

@ND_Constructor

Documents the constructor of a class.

Properties

NameTypeRequiredDescription
descriptionStringYesConstructor description
parentStringYesParent class name
inputsObjectNoInput parameters (e.g., { name: { type, required, desc } })

Example

/* @ND_Constructor {
  description: "Initializes the calculator",
  parent: "Calculator",
  inputs: { initialValue: { type: "Number", required: true, desc: "Starting value" } }
} */

@ND_Destructor

Documents the destructor or cleanup method of a class.

Properties

NameTypeRequiredDescription
descriptionStringYesDestructor description
parentStringYesParent class name

Example

/* @ND_Destructor {
  description: "Resets the calculator",
  parent: "Calculator"
} */

@ND_Method

Documents a standalone method or one within a class.

Properties

NameTypeRequiredDescription
descriptionStringYesMethod description
parentStringNoParent class or module
paramsObjectNoParameters (e.g., { name: { type, required, desc } })
returnsObjectNoReturn value (e.g., { type, desc })
asyncBooleanNoIndicates if it’s asynchronous
examplesArrayNoUsage examples

Example

/* @ND_Method {
  description: "Adds a number to the current value",
  parent: "Calculator",
  params: { x: { type: "Number", required: true, desc: "Number to add" } },
  returns: { type: "Number", desc: "New value" }
} */

@ND_Component

Documents a reusable component (e.g., UI).

Properties

NameTypeRequiredDescription
descriptionStringYesComponent description
parentStringNoParent module
inputsObjectNoComponent inputs
eventsObjectNoEmitted events
renderStringNoRendering description

Example

/* @ND_Component {
  description: "A reusable button",
  parent: "ComponentsModule",
  inputs: { label: { type: "String", required: true, desc: "Button text" } },
  events: { onClick: { desc: "Triggered on click" } }
} */

@ND_Router

Defines a group of routes for an API.

Properties

NameTypeRequiredDescription
nameStringYesRouter name
pathStringYesBase route of the router
descriptionStringYesRouter description
parentStringNoParent module

Example

/* @ND_Router {
  name: "AuthRouter",
  path: "/auth",
  description: "Handles authentication routes",
  parent: "MainModule"
} */

@ND_Endpoint

Documents a specific API endpoint.

Properties

NameTypeRequiredDescription
methodStringYesHTTP method (e.g., GET, POST)
pathStringYesEndpoint path
descriptionStringYesEndpoint description
parentStringNoParent router
authStringNoAuthentication type
paramsObjectNoRoute parameters
queryObjectNoQuery parameters
bodyObjectNoRequest body
responsesObjectNoPossible responses (e.g., { '200': { code, desc } })

Example

/* @ND_Endpoint {
  method: "POST",
  path: "/auth/login",
  description: "Logs in a user",
  parent: "AuthRouter",
  body: { username: { type: "String", required: true } }
} */

@ND_Middleware

Documents a middleware for an API.

Properties

NameTypeRequiredDescription
descriptionStringYesMiddleware description
paramsObjectNoParameters (req, res, next)
throwsObjectNoPossible errors
asyncBooleanNoIndicates if it’s asynchronous
examplesArrayNoUsage examples

Example

/* @ND_Middleware {
  description: "Validates JWT token",
  params: { req: { type: "Request", required: true } },
  async: true
} */

@ND_Service

Documents a service or logical utility.

Properties

NameTypeRequiredDescription
nameStringYesService name
descriptionStringYesService description
parentStringNoParent module

Example

/* @ND_Service {
  name: "AuthService",
  description: "Authentication utilities",
  parent: "MainModule"
} */