nestjs-oop-design-patterns
Refactor NestJS Code with Pragmatic Design Patterns
Unclear responsibilities and unnecessary abstractions make NestJS code difficult to change and test. This skill guides evidence-based object design, pattern selection, and behavior-preserving refactoring.
๋ด ์์ด์ ํธ๋ก ์ค์น
์ด ์์ฒญ์ ์์ด์ ํธ์ ๋ณต์ฌํ์ธ์. ๊ณต์ Skill ํ์ด์ง์ ๋งค๋ํ์คํธ๊ฐ ํฌํจ๋์ด ์์ต๋๋ค.
Review the Skillstore skill "nestjs-oop-design-patterns" from https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns.md and its manifest at https://skillstore.io/api/skills/amirtaherkhani-nestjs-oop-design-patterns/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.์์ด์ ํธ๋ ๊ณ์ํด์ ๊ณํ์ ํ์ํ๊ณ ๋ณด์ ์ ์ฑ ์์ ์๊ตฌํ๋ ํ์ธ์ ์์ฒญํด์ผ ํฉ๋๋ค.
์์ด์ ํธ๊ฐ ์ฝ๊ธฐ ์ฌ์ด ๋ฆฌ์์ค
AI ์์ด์ ํธ, ํฌ๋กค๋ฌ, ์คํฌ๋ฆฝํธ๊ฐ ์ ์ฒด ํ์ด์ง ๋์ ์ ๋ฆฌ๋ ์ปจํ ์คํธ๋ง ํ์ํ ๋ ์ด ๋งํฌ๋ฅผ ์ฌ์ฉํ์ธ์.
ํ ์คํธํด ๋ณด๊ธฐ
"nestjs-oop-design-patterns" ์ฌ์ฉ ์ค์ ๋๋ค. A checkout service validates orders, calls a payment SDK, and maps database rows.
์์ ๊ฒฐ๊ณผ:
- Role: The checkout use case coordinates order placement.
- Evidence: Vendor payment details and persistence mapping change for different reasons.
- Recommendation: Keep coordination in the use case and move vendor translation into an application-owned payment adapter.
- Trade-off: The adapter adds a boundary and requires contract tests.
- Verification: Preserve payment errors, order invariants, and provider wiring with focused tests.
"nestjs-oop-design-patterns" ์ฌ์ฉ ์ค์ ๋๋ค. Should a service with one stable pricing rule use Strategy?
์์ ๊ฒฐ๊ณผ:
- Evidence: Only one pricing algorithm exists, with no accepted requirement for another.
- Recommendation: Keep the direct implementation rather than adding interchangeable policy classes.
- Verification: Test pricing behavior and invariants through the public operation.
"nestjs-oop-design-patterns" ์ฌ์ฉ ์ค์ ๋๋ค. Does an in-process event guarantee publication after a database commit?
์์ ๊ฒฐ๊ณผ:
- Finding: In-process notification does not provide durable delivery across crashes or replicas.
- Recommendation: Consider a transactional outbox when external consumers must reliably observe committed changes.
- Trade-off: A relay requires retries, retention, ordering decisions, and idempotent consumers.
๋ณด์ ๊ฐ์ฌ
์์ All 25 static findings are false positives involving ordinary design guidance, Markdown identifiers, or headings. Backticks mark inline code, and the reconnaissance matches contain no system enumeration instructions. No evidence found of prompt injection, credential theft, unauthorized execution, or data exfiltration in the reviewed passages and surrounding files.
์ํ ์์ธ
โ๏ธ ์ธ๋ถ ๋ช ๋ น์ด (10)
์ด ๋ณด๊ณ ์ ๊ณต์ ๋ฐ ์ธ์ฉ
๋ฒ์ ์ด ์ง์ ๋ ํ๊ฐ ๋ณด๊ณ ์, ์ค๋ฆฝ ๋ฐฐ์ง, ์๋ฒ ๋ ์นด๋ ๋ฐ ์ธ์ฉ์ ๊ณต์ ํ์ธ์. Skillstore๋ ๊ทผ๊ฑฐ๋ฅผ ๋ณด๊ณ ํ์ง๋ง ์ด Skill์ ์์ ์ฌ๋ถ๋ฅผ ํ๋จํ์ง ์์ต๋๋ค.
๋ณด๊ณ ์ ๋งํฌ ๋ณต์ฌ
https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown ๋ฐฐ์ง
[](https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns?utm_source=security_passport_badge)HTML ๋ฐฐ์ง
<a href="https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/amirtaherkhani-nestjs-oop-design-patterns/security.svg" alt="Skillstore security assessment" loading="lazy"></a>์๋ฒ ๋ ์นด๋
<iframe src="https://skillstore.io/embed/skills/amirtaherkhani-nestjs-oop-design-patterns.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>ํ์ ์ธ์ฉ (APA ยท BibTeX ยท CFF)
APA ์ธ์ฉ
amirtaherkhani. (2026). nestjs-oop-design-patterns security audit report (audit version 1) [Author version 1.0.2]. Skillstore. https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns/audits/1BibTeX ์ธ์ฉ
@techreport{amirtaherkhani-amirtaherkhani-nestjs-oop-design-patterns-2026,
author = {amirtaherkhani},
title = {nestjs-oop-design-patterns security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns/audits/1},
note = {Author version 1.0.2}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "nestjs-oop-design-patterns security audit report (audit version 1)"
version: "1.0.2"
type: report
authors:
- name: "amirtaherkhani"
date-released: "2026-10-04"
url: "https://skillstore.io/skills/amirtaherkhani-nestjs-oop-design-patterns/audits/1"
identifiers:
- type: other
value: "skillstore:amirtaherkhani-nestjs-oop-design-patterns:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore ์ ์
์ด ์ ์์ ์ด์ ์ฆ๊ฑฐ ์ ๋ขฐ๋: ์ค๊ฐ๋ง๋ค ์ ์๋ ๊ฒ
Review an overloaded service
Identify unrelated responsibilities and propose a small refactor that preserves behavior and public contracts.
Choose a provider integration pattern
Compare direct integration, Adapter, and Strategy using vendor coupling, variation, and substitution requirements.
Plan contract-focused verification
Define tests for invariants, adapter substitution, Nest provider wiring, and transport behavior before refactoring.
์ด ํ๋กฌํํธ๋ฅผ ์ฌ์ฉํด ๋ณด์ธ์
Review [class] and its callers. Explain its role, responsibilities, and one concrete design concern without editing files.
Compare a direct solution, Strategy, and Factory for [observed variation]. Recommend one using repository evidence and explain its testing cost.
Refactor [service] to separate [misplaced responsibility]. Preserve public behavior and user changes, add focused tests, and verify Nest provider wiring.
Review [workflow] for adapter substitution, transaction boundaries, and event delivery guarantees. Compare direct coordination with outbox or saga designs and specify contract tests.
๋ชจ๋ฒ ์ฌ๋ก
- Inspect callers, tests, module wiring, and repository conventions before selecting a pattern.
- State the concrete problem, simpler alternative, and added cost before introducing an abstraction.
- Preserve behavior with focused tests and verify contracts and provider wiring after refactoring.
ํผํ๊ธฐ
- Adding interfaces, factories, repositories, or class hierarchies without real variation or a useful boundary.
- Judging design only by line counts or applying fixed size limits as mandatory rules.
- Assuming CQRS dispatch, in-process events, or pattern names provide durability or scalability.
์์ฃผ ๋ฌป๋ ์ง๋ฌธ
Which projects does this skill target?
Does every class need an interface?
Will it always recommend a design pattern?
Are the related NestJS skills required?
Which tests should accompany a refactor?
Does a Nest event bus guarantee durable delivery?
๊ฐ๋ฐ์ ์ธ๋ถ ์ ๋ณด
์์ฑ์
amirtaherkhani๋ผ์ด์ ์ค
MIT
์์ฑ์ ๋ฒ์
v1.0.2
Skillstore ๋ฆฌ๋น์
r1
๋ฆฌํฌ์งํ ๋ฆฌ
https://github.com/amirtaherkhani/nestjs-skills/tree/b82cdf0312e1c1bcaf871bb67473e91b2a1befad/skills/nestjs-oop-design-patterns์ฐธ์กฐ
c97a1862d1bc82763903ee068cd15acab35d638c
์ ์ง๋ณด์ ์ต์ ์ฑ
2026. 10. 5.
์ฌ์ฉ๋
0 ๋ค์ด๋ก๋ ยท 0 ์กฐํ
ํ์ผ ๊ตฌ์กฐ
๐ evals/
๐ evals.json
๐ references/
๐ nestjs-native-patterns.md
๐ object-design.md
๐ oop-solid.md
๐ pattern-catalog.md
๐ SKILL.md