project-guideline-examples

Organize NestJS projects with a DDD-driven layered folder structure and Event Bus pattern.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/mthang1801/go-domain-driven-design --skill project-guideline-examples
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: project-guideline-examples
Source: https://github.com/mthang1801/go-domain-driven-design/tree/main/.claude/skills/project-guideline-examples
Command: npx skills add https://github.com/mthang1801/go-domain-driven-design --skill project-guideline-examples

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps teams structure NestJS projects using a Domain-Driven Design (DDD) approach and an Event Bus pattern to improve modularity, scalability, and maintainability.

Core Features & Use Cases

  • DDD-based organization: Clear separation of domain, application, infrastructure, and presentation layers with a consistent folder layout.
  • Event Bus integration: Demonstrates how to wire domain events to bus-based messaging for decoupled, reactive workflows.
  • Layered architecture template: Prescribes a familiar structure: domain, application, infrastructure, and presentation, plus a libs area for shared code.
  • Best practices: Encourages barrel exports, framework-agnostic domain logic, and service boundaries that support testability and collaboration.

Quick Start

Organize your NestJS project using the provided directory layout and begin implementing modules according to the template.

Frequently Asked Questions about project-guideline-examples

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

FAQPage Schema
How do I structure a NestJS project using Domain-Driven Design?

Structure your NestJS project by separating domain, application, infrastructure, and presentation layers into a consistent folder layout. This DDD-driven approach provides explicit module boundaries and documented conventions to improve modularity and maintainability.

What is the Event Bus pattern in a layered NestJS architecture?

The Event Bus pattern in a layered NestJS architecture wires domain events to bus-based messaging, creating decoupled and reactive workflows. It separates event triggering from event handling to improve modularity across different application layers.

When do I need a DDD folder structure for my NestJS application?

You need a DDD folder structure for mid- to large-scale enterprise applications where multiple teams collaborate. It enforces explicit module boundaries, framework-agnostic domain logic, and clear service boundaries to support testability and scalability.

How do I organize shared code in a DDD NestJS project?

Organize shared code in a dedicated libs area within your DDD NestJS project. This layered architecture template encourages using barrel exports and framework-agnostic domain logic to maintain clean dependencies across modules.

Does this DDD NestJS template work for small applications?

This DDD NestJS template targets mid- to large-scale enterprise applications rather than small projects. Its strict layered architecture, explicit module boundaries, and Event Bus pattern introduce structural overhead designed for team collaboration and scalability.

Why use an Event Bus for domain events in NestJS?

Use an Event Bus for domain events in NestJS to achieve decoupled, reactive workflows across your application layers. It separates domain logic from infrastructure messaging, improving testability and allowing modules to react independently.