मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)7.1k · #13529

nestjs-modular-monolith

यह क्या करती है

यह स्किल AI को NestJS फ़्रेमवर्क से एक मॉड्यूलर मोनोलिथ के रूप में बैकएंड डिज़ाइन करने में मार्गदर्शन देती है, जिसमें डोमेन मॉड्यूल और साफ़ परतें हों। यह उन बैकएंड डेवलपर्स के लिए है जिन्हें ऐसा ढाँचा चाहिए जो उलझे बिना बढ़ सके।

कब इस्तेमाल करें

  • ✓जब आप नया NestJS बैकएंड बना रहे हैं और साफ़ डोमेन मॉड्यूल चाहते हैं।
  • ✓जब आपको bounded contexts और मॉड्यूलों के आपस में बात करने का तरीका तय करना है।
  • ✓जब आप जाँचना चाहते हैं कि आपके बैकएंड की मॉड्यूल सीमाएँ ठीक हैं या नहीं।

Skill का लिंक

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 में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(development)/nestjs-modular-monolith/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“NestJS बैकएंड बनाइए, जिसमें billing और orders के अलग मॉड्यूल हों, और दिखाइए कि उन्हें आपस में कैसे बात करनी चाहिए।”

हर हफ़्ते 5 नई skills, 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
अक्सर पूछे जाने वाले सवाल

क्या यह सरल APIs के लिए है?

नहीं। कुछ एंडपॉइंट वाले छोटे APIs के लिए NestJS के डिफ़ॉल्ट बेहतर हैं।

क्या यह माइक्रोसर्विसेज़ संभालती है?

यह बाद में माइक्रोसर्विसेज़ का रास्ता खुला रखती है, पर इसे एक ही deploy होने वाले ऐप के लिए बनाया गया है।

क्या हर प्रोजेक्ट में 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
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

component-common-domain-detection

7.1k

यह आपके एजेंट को कोडबेस के कई हिस्सों में दोहराए गए बिज़नेस लॉजिक को ढूँढने और उन्हें मिलाने का तरीका सुझाने में मदद करती है।

कोडिंगसामान्य कोडिंग

component-flattening-analysis

7.1k

यह आपके एजेंट को गलत जगह रखा गया कोड ढूँढने और उलझे हुए कंपोनेंट फ़ोल्डर ढाँचे को सीधा करने में मदद करती है, ताकि हर चीज़ अपनी सही जगह रहे।

कोडिंगसामान्य कोडिंग

component-identification-sizing

7.1k

यह आपके एजेंट को कोडबेस के हिस्सों का नक्शा बनाने और उनका आकार मापने में मदद करती है, ताकि पता चले कि पहले किस मॉड्यूल को तोड़ना है।

कोडिंगसामान्य कोडिंग

coupling-analysis

7.1k

यह आपके एजेंट को जाँचने में मदद करती है कि कोडबेस के हिस्से एक-दूसरे पर कितनी कसकर निर्भर हैं, और पहले कौन से जोड़ ढीले करने चाहिए।

कोडिंगसामान्य कोडिंग

मिलती-जुलती skills