What this project provides 📦

This package offers AI-powered n8n nodes for DocuWriter.ai, enabling seamless automation of code documentation, tests, comments, UML diagrams, and metadata retrieval. It includes:

  • Action Node (DocuWriter.ai):

    • Generate code documentation, tests, comments, diagrams, optimizations.
    • Retrieve past generation metadata.
  • Trigger Node (DocuWriter.ai Trigger):

    • Listen for generation.created webhooks from DocuWriter.ai.
    • Kick off workflows on new generations (docs, tests, etc.).
  • Comprehensive metadata support:

    • Filename, generation type, user info, timestamps.
    • Access via generations resource.
  • Built with Node.js ≥ 18.10 and pnpm.

  • TypeScript code in nodes/ and credentials/, compiled to dist/ for n8n consumption.

How it fits in n8n 🎯

n8n discovers and loads community packages via the n8n manifest in package.json. This package’s manifest declares compiled nodes and credentials under the dist/ folder. At runtime, n8n uses these compiled files directly, ignoring the TypeScript source.

Manifest Registration

In package.json, the n8n field registers credentials and nodes:

"n8n": {
  "n8nNodesApiVersion": 1,
  "credentials": [
    "dist/credentials/DocuWriterApi.credentials.js"
  ],
  "nodes": [
    "dist/nodes/DocuWriter/DocuWriter.node.js",
    "dist/nodes/DocuWriterTrigger/DocuWriterTrigger.node.js"
  ]
}
  • Credentials: API key settings for DocuWriter.ai
  • Nodes:
    • Action: DocuWriter.node.js
    • Trigger: DocuWriterTrigger.node.js

This setup ensures n8n loads the compiled JavaScript at runtime without requiring TypeScript or additional build steps .

Runtime Loading

  • Compiled Output: All TypeScript from nodes/ and credentials/ is transpiled into dist/.
  • n8n Consumption: n8n reads the dist/ paths from package.json and registers nodes and credentials accordingly.
  • No Direct TS: The original .ts files are not used by n8n in production.

Minimal index.js

A stub index.js satisfies the main entrypoint but delegates to dist/:

// This file is required by the package.json main field
// but n8n uses the compiled dist files directly
module.exports = {};

This empty export ensures compatibility with Node’s module resolution while keeping n8n’s loader focused on dist/ .


By centralizing all runtime artifacts in dist/ and declaring them in package.json, n8n-nodes-docuwriter-ai integrates cleanly into n8n’s plugin system, offering a drop-in solution for automated code documentation workflows.