ddd-api-generator

Generate NestJS REST API endpoints with DTOs, controllers, and OpenAPI documentation.

5|1|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/moasadi/ddd-bun-api-boilerplate --skill ddd-api-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddd-api-generator
Source: https://github.com/moasadi/ddd-bun-api-boilerplate/tree/main/.claude/skills/ddd-api-generator
Command: npx skills add https://github.com/moasadi/ddd-bun-api-boilerplate --skill ddd-api-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the scaffolding of REST API endpoints for DDD contexts, generating DTOs, controllers, and OpenAPI documentation, reducing repetitive boilerplate and speeding up delivery.

Core Features & Use Cases

  • DTOs & Validation: Create request DTOs with class-validator decorators and response serializers with JSON Schema for Swagger docs.
  • Controllers & Routes: Generate controllers with versioned routes and standardized CRUD/OpenAPI annotations.
  • OpenAPI Docs: Auto-generated Swagger/OpenAPI docs for all endpoints.
  • Use Case Scenarios: Create API endpoints for new use cases or extend existing contexts (e.g., "Create user API" or "Product API with search").

Quick Start

Run the generator for the Order context to produce the full REST API scaffold with v1 routing and Swagger docs.

Frequently Asked Questions about ddd-api-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate REST API endpoints with OpenAPI documentation?

REST API endpoint generation automatically produces versioned controllers, request/response DTOs with validation decorators, and Swagger/OpenAPI documentation. This Skill scaffolds production-ready endpoints for DDD contexts, eliminating manual boilerplate for routing, validation, and doc generation.

Can I use NestJS-style decorators and class-validator for API scaffolding?

Yes. The generator creates controllers with NestJS-style decorators, class-validator DTOs for request validation, and JSONSchema decorators for response serialization. All endpoints include automatic Swagger documentation and follow routing-controllers patterns.

What HTTP conventions does the generated API follow?

Generated APIs use versioned routes (/v1), plural lowercase hyphenated resource names, standard HTTP status codes, consistent response formatting, and built-in support for pagination, sorting, and filtering across all endpoints.

How do I add new API endpoints to an existing DDD context?

The generator extends existing contexts by producing new controllers and DTOs that integrate with your current structure. Run it for any use case—such as creating a Product or Order API—to generate fully scaffolded endpoints ready for your domain logic.

Does this tool reduce time spent writing boilerplate for API projects?

Yes. By automating DTO creation, controller scaffolding, validation setup, and Swagger documentation generation, the tool eliminates repetitive boilerplate and accelerates REST API delivery for DDD-structured applications.

What's the best way to document REST APIs with auto-generated Swagger specs?

This generator produces OpenAPI documentation automatically from controller decorators and DTO schemas. All endpoints are documented with request/response models, status codes, and parameters without manual Swagger annotation work.