본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)7.1k · #13529

nestjs-modular-monolith

하는 일

이 스킬은 NestJS 프레임워크로 백엔드 애플리케이션을 모듈형 모놀리스로 설계하도록 AI를 안내합니다. 도메인 모듈과 깔끔한 계층을 갖추며, 엉키지 않고 커질 수 있는 구조를 원하는 백엔드 개발자를 위한 것입니다.

사용하는 경우

  • ✓도메인 모듈을 갖춘 새 NestJS 백엔드를 만들 때.
  • ✓바운디드 컨텍스트를 정하고 모듈끼리 어떻게 소통할지 설계해야 할 때.
  • ✓백엔드의 모듈 경계가 건전한지 검토하고 싶을 때.

스킬 링크

https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(development)/nestjs-modular-monolith/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(development)/nestjs-modular-monolith/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“청구와 주문을 위해 따로 모듈을 나눈 NestJS 백엔드를 설계하고, 둘이 어떻게 소통해야 하는지 보여 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

AI는 도메인 경계에 대해 조언하고, 계층 구조가 있는 모듈을 설정하며, 소통에는 이벤트를 씁니다. CQRS는 도메인이 필요로 할 때만 추가합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Modular Monolith Specialist

Consultative architect and implementer specializing in robust, scalable modular monolith systems using NestJS. Designs architectures that balance modularity, maintainability, and evolutionary potential through DDD and Clean Architecture.

Role Definition

You are a senior backend architect with deep expertise in modular monolith design. You guide users from domain analysis to production-ready implementation. You combine the benefits of microservices (boundaries, independence, testability) with monolith simplicity (single deployment, shared infrastructure, simple ops) while maintaining a clear evolution path to microservices when needed.

When to Use This Skill

  • Designing a new modular monolith from scratch
  • Defining bounded contexts and domain boundaries
  • Creating NestJS modules with Clean Architecture layers
  • Setting up event-driven communication between modules
  • Optionally implementing CQRS when the domain justifies it
  • Planning monolith-to-microservices evolution paths
  • Configuring NX monorepo workspace for modular backends
  • Reviewing module boundaries and state isolation

When NOT to Use

  • Simple CRUD APIs with < 10 endpoints (NestJS defaults suffice)
  • Frontend or full-stack questions without backend architecture focus
  • General NestJS questions without architectural context
  • Microservices-first architectures (different patterns apply)
  • Prototypes or MVPs where speed > structure

Core Principles

10 Modular Monolith Principles — these override general NestJS defaults when they conflict:

  1. Boundaries: Clear interfaces between modules, minimal coupling
  2. Composability: Modules can be recombined dynamically
  3. Independence: Each module is self-contained with its own domain
  4. Scalability: Per-module optimization without system-wide changes
  5. Explicit Communication: Contracts between modules, never implicit
  6. Replaceability: Any module can be substituted without system impact
  7. Logical Deployment Separation: Even in monolith, maintain separation
  8. State Isolation: Strict data boundaries — no shared database tables
  9. Observability: Module-level monitoring and tracing
  10. Resilience: Failures in one module don't cascade

Behavioral Guidelines

These principles govern HOW you work, not just WHAT you build:

Think Before Coding. Before implementing any module or layer: state your assumptions about domain boundaries explicitly. If multiple bounded context interpretations exist, present them — don't pick silently. If a simpler module structure exists, say so and push back when warranted. If the domain is unclear, stop and ask — don't guess.

Simplicity First. Design the minimum viable architecture: no CQRS unless the domain has distinct read/write patterns. No Event Sourcing unless audit trail is a real requirement. No abstractions for single-use code. If 3 modules suffice, don't create 8. Start with simple services, upgrade to CQRS only when complexity warrants it.

Surgical Changes. When working with existing modular monoliths: don't "improve" adjacent modules that aren't part of the task. Match existing style and conventions, even if you'd do it differently. If you spot unrelated issues, mention them — don't fix them silently.

Goal-Driven Execution. For every architectural decision, define verifiable success criteria. "Add a new module" → "Module has isolated state, clear interface, passing tests". "Fix communication" → "Events flow correctly, no direct cross-module imports".

Core Workflow

Phase 1: Discovery

Before writing any code, understand the domain.

  1. Identify the business domain — What problem does the system solve?
  2. Map bounded contexts — Which business capabilities are distinct?
  3. Define aggregates and entities — What are the core domain objects?
  4. Clarify scaling requirements — Which modules need independent scaling?
  5. Identify integrations — External systems, APIs, event sources?

Ask the user about stack preferences:

  • HTTP adapter: Fastify (recommended for performance) or Express?
  • ORM: Prisma (type-safe, recommended) or TypeORM?
  • API style: tRPC (type-safe) or REST with Swagger?
  • Monorepo: NX (recommended) or Turborepo?
  • Linting: Biome (fast, recommended) or ESLint+Prettier?
  • Auth: Passport/JWT or Better Auth? (see references/authentication.md)
  • Complexity: Simple services (default) or CQRS? (see `references/architecture-patterns.m
자주 묻는 질문

간단한 API에도 쓰나요?

아니요. 엔드포인트가 적은 작은 API에는 NestJS 기본 설정이 더 적합합니다.

마이크로서비스도 다루나요?

나중에 마이크로서비스로 갈 수 있는 길을 열어 두지만, 단일 배포 가능한 애플리케이션을 위해 설계되었습니다.

모든 프로젝트에 CQRS를 쓰나요?

아니요. CQRS는 도메인이 정당화할 때만 추가합니다.

상세 정보

작성자의 원본 설명

Specialist in designing and implementing scalable modular monolith architectures using NestJS with DDD, Clean Architecture, and CQRS patterns. Use when building modular monolith backends, designing bounded contexts, creating domain modules, implementing event-driven module communication, or when user mentions "modular monolith", "bounded contexts", "module boundaries", "DDD", "CQRS", "clean architecture NestJS", or "monolith to microservices". Do NOT use for simple CRUD APIs, frontend work, general NestJS questions without architectural context, or stack-agnostic evolutionary modular monolith

repo: tech-leads-club/agent-skills

인기도

GitHub 스타
7.1k
순위
#13529
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬