Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)7.1k · #13506

evolutionary-modular-architecture

Skill này làm gì

Skill này hướng dẫn AI thiết kế một nền tảng là một ứng dụng với ranh giới nội bộ mạnh. Nó bao gồm thiết kế lĩnh vực, bảo vệ mã khỏi nhà cung cấp bên ngoài và xử lý lỗi. Phù hợp với các nhóm xây backend mới và muốn tránh microservice quá sớm.

Khi nào nên dùng

  • ✓Khi bạn thiết kế một nền tảng hoặc backend mới từ đầu.
  • ✓Khi bạn cần kết nối với một nhà cung cấp bên ngoài mà không gắn mã của bạn vào nhà cung cấp đó.
  • ✓Khi bạn chọn giữa một ứng dụng đơn, monolith module hóa và microservice.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/evolutionary-modular-architecture/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Giúp tôi thiết kế kiến trúc cho nền tảng mới của chúng tôi, giữ nó là một ứng dụng nhưng với ranh giới nội bộ sạch.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill đặt các quy tắc để chia hệ thống thành các bounded context, thêm một lớp bảo vệ quanh các hệ thống bên ngoài, và dùng sự kiện cùng cơ chế thử lại có thể lỗi an toàn.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Evolutionary Modular Architecture

Design and build platforms as an evolutionary modular monolith: strong logical boundaries from day one (DDD bounded contexts, flat-by-aggregate modules, an Anti-Corruption Layer around every external system, event-driven communication, resilience by default) while keeping physical boundaries (separate deploys, separate databases) as a later, optional step. Start simple, evolve granularity only when the product and the team justify it — never reverse-engineer microservices from hype.

When to use this skill

  • Designing a new platform, backend, or service from scratch.
  • Defining bounded contexts and a context map for a domain.
  • Deciding how to organize a module's folders and files.
  • Choosing between monolith, modular monolith, and microservices.
  • Integrating with (or decoupling from) an external vendor: ERP, ticketing, storage, payment, AI, identity, durable-workflow engine.
  • Making external/inter-module calls resilient.
  • Adding real-time server-to-client updates.
  • Picking a modern (2026) full-stack TypeScript stack.

When NOT to use it

  • Simple CRUD with a handful of endpoints — framework defaults are enough.
  • Deep, NestJS-specific implementation detail — prefer nestjs-modular-monolith.
  • Reviewing or refactoring a single domain model for anemia — prefer tactical-ddd.

The one rule that governs everything

Separate the logical boundary (always strong) from the physical boundary (evolutionary). Modules, contracts, state ownership, and the Anti-Corruption Layer are non-negotiable from day one. Whether a module is its own deploy or its own database is an operational decision made later — never a structural prerequisite. This is what lets the system start as one deploy and grow without a rewrite.

A useful mental image: the house has well-divided rooms (modules). Inside each room things sit out in the open, grouped by what they are for (flat-by-aggregate) — not buried in nested drawers (technical-layer folders). The floor plan (boundaries) is what matters most.


Core model (load the matching reference when you go deep)

Topic What it covers Reference
Principles 10 modular (P1–P10) + 9 structural (P11–P19) + conflict hierarchy references/principles.md
DDD Strategic (subdomains, context map, integration patterns) + tactical (rich aggregates, intensity by subdomain) references/ddd.md
Module internals Flat-by-aggregate, suffixes, depth, flat vs subdomain test, scaffolding references/flat-by-aggregate.md
Communication Ports & Adapters / ACL, events + transactional outbox, SSE real-time references/acl-and-communication.md
Resilience Backoff + full jitter, circuit breaker, retry budget, idempotency, bulkhead, timeouts references/resilience.md
Stack 2026 Frontend, backend, data, observability, durable workflow, decisions references/stack-2026.md
Architecture doc Building the elegant, self-contained HTML architecture document with SVG diagrams references/architecture-doc.md + assets/architecture-template.html
Validation Deterministic checks for structure and module boundaries scripts/validate-structure.mjs, scripts/validate-boundaries.mjs

Do not load all references at once. Read a reference only when the current phase needs it (the workflow below states when).


Workflow

Use this whether you are designing a new system or reviewing an existing one. Move through phases in order; each has an exit criterion. State assumptions explicitly; if the domain is unclear, ask before guessing.

Phase 0 — Frame the scope

Confirm: is this a new platform, a new module in an existing one, or a review? Confirm the runtime/stack constraints (default target is the 2026 TypeScript stack — see references/stack-2026.md). Default to one deploy (modular monolith) unless a hard constraint says otherwise.

Exit: scope and constraints written down.

Phase 1 — Domain discovery (DDD strategic)

Read references/ddd.md. Identify subdomains from the business language, classify each as Core, Supporting, or Generic, and find the ubiquitous language of each. Do not group by technical layer. If multiple bounded-context interpretations exist, present them — do not pick silently.

Exit: a list of candidate bounded contexts, each classified, with one-line responsibility and key aggregates.

Phase 2 — Boundaries & context map

Dr

Câu hỏi thường gặp

Nó có luôn khuyên dùng microservice không?

Không. Nó bắt đầu đơn giản và chỉ thêm service riêng khi sản phẩm và đội ngũ đủ lý do.

Nó có bao gồm cập nhật thời gian thực không?

Có. Skill bao gồm việc thêm cập nhật thời gian thực từ server đến client.

Có dành cho ứng dụng đơn giản với vài endpoint không?

Không. Các ứng dụng đơn giản phù hợp hơn với mặc định của framework.

Chi tiết

Mô tả gốc của tác giả

Guides design and implementation of evolutionary modular-monolith platforms with DDD (strategic + tactical), flat-by-aggregate organization, an Anti-Corruption Layer for vendor independence, a transactional outbox for events, smart resilience (backoff with jitter, circuit breakers, idempotency), and a polished architecture HTML document with elegant SVG diagrams. Use when designing a platform or backend, defining bounded contexts, organizing modules and folders, choosing monolith vs microservices, decoupling from an external service (ERP, storage, AI), making calls resilient, adding real-time

repo: tech-leads-club/agent-skills

Độ phổ biến

Sao GitHub
7.1k
Vị trí xếp hạng
#13506
Giấy phép
—
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự