nestjs-architecture-principles
Design and Review NestJS Architecture
Unclear module boundaries make NestJS changes harder to test and coordinate. This skill guides evidence-based architecture decisions, explicit ownership, and incremental boundary repairs.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "nestjs-architecture-principles" from https://skillstore.io/skills/amirtaherkhani-nestjs-architecture-principles.md and its manifest at https://skillstore.io/api/skills/amirtaherkhani-nestjs-architecture-principles/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "nestjs-architecture-principles". A small team needs one NestJS deployment for an order-management API.
Expected outcome:
- Decision: use a modular monolith with cohesive Orders, Catalog, and Billing capabilities.
- Boundaries: each capability owns its writes and exposes only required application operations.
- Trade-off: keep simple CRUD compact and layer only features with meaningful domain or integration complexity.
- Validation: test public operations, module wiring, and forbidden cross-feature persistence imports.
Using "nestjs-architecture-principles". Orders and Payments have a circular dependency and both use forwardRef.
Expected outcome:
- Baseline: trace the shared workflow and establish which capability owns its invariant.
- Decision: consider an owning coordinator or narrow port before asynchronous events.
- Migration: characterize behavior, move callers incrementally, then remove temporary circular wiring.
- Validation: compile affected modules and verify payment failures preserve the required order invariant.
Using "nestjs-architecture-principles". A CPU-heavy report generator needs more capacity than the rest of the application.
Expected outcome:
- Decision: evaluate a separately scaled worker before creating a business microservice.
- Boundary: define job identity, idempotency, retry limits, payload bounds, and data access ownership.
- Extraction gate: require evidence of independent operation and account for contract and failure costs.
- Validation: test duplicate jobs, partial failures, backlog limits, and shutdown behavior.
Security Audit
SafeAll 19 static findings are false positives involving architecture guidance, Markdown formatting, or illustrative configuration access. The payment example passes configuration to an adapter without logging or exporting credentials. No evidence found of malicious intent, prompt injection, reconnaissance, or shell execution in the reviewed files.
Risk Factors
๐ Env variables (2)
โ๏ธ External commands (8)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/amirtaherkhani-nestjs-architecture-principles/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/amirtaherkhani-nestjs-architecture-principles?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/amirtaherkhani-nestjs-architecture-principles?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/amirtaherkhani-nestjs-architecture-principles/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/amirtaherkhani-nestjs-architecture-principles.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
amirtaherkhani. (2026). nestjs-architecture-principles security audit report (audit version 1) [Author version 1.1.2]. Skillstore. https://skillstore.io/skills/amirtaherkhani-nestjs-architecture-principles/audits/1BibTeX citation
@techreport{amirtaherkhani-amirtaherkhani-nestjs-architecture-principles-2026,
author = {amirtaherkhani},
title = {nestjs-architecture-principles security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/amirtaherkhani-nestjs-architecture-principles/audits/1},
note = {Author version 1.1.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-architecture-principles security audit report (audit version 1)"
version: "1.1.2"
type: report
authors:
- name: "amirtaherkhani"
date-released: "2026-10-04"
url: "https://skillstore.io/skills/amirtaherkhani-nestjs-architecture-principles/audits/1"
identifiers:
- type: other
value: "skillstore:amirtaherkhani-nestjs-architecture-principles:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: MediumWhat You Can Build
Plan a new backend
Choose cohesive feature modules, public operations, and data owners before adding layers or separate services.
Review an existing system
Identify cross-feature write leaks, broad exports, and dependency cycles, then recommend focused repairs with regression checks.
Evaluate service extraction
Compare worker scaling with business-service extraction and define ownership, contracts, consistency, and operational requirements.
Try These Prompts
Design a NestJS order-management API for one team and one deployment. Recommend module boundaries, public APIs, data ownership, and validation.
Review this NestJS repository without editing files. Map imports and exports, identify ownership violations, and report evidence, impact, minimal remedies, and tests.
OrdersModule and PaymentsModule depend on each other. Trace the workflow and propose an incremental cycle repair that preserves contracts and required consistency.
Evaluate extracting reporting from our NestJS monolith. Compare worker deployment and microservices using ownership, scaling, data, failure, contracts, migration, and validation.
Best Practices
- Inspect installed versions, module wiring, callers, tests, and concrete change pressures before choosing an architecture.
- Assign clear capability and write ownership, then add only boundaries justified by current requirements.
- Make changes incrementally, preserve public contracts, and verify boundaries with existing lint, module, integration, or contract tests.
Avoid
- Introduce CQRS, microservices, or strict layering only to match a preferred diagram.
- Export every provider or let features directly write another capability's tables.
- Treat forwardRef as the default cycle repair or create interfaces for every stable local helper.
Frequently Asked Questions
What does this skill help with?
Does every NestJS application need Clean Architecture?
Does it require other NestJS skills?
Can it fix circular dependencies?
Does it automatically run migrations or verify performance?
When does it recommend microservices?
Developer Details
Author
amirtaherkhaniLicense
MIT
Author version
v1.1.2
Skillstore revision
r1
Ref
c97a1862d1bc82763903ee068cd15acab35d638c
Maintenance freshness
10/5/2026
Usage
0 downloads ยท 0 views
File structure
๐ evals/
๐ evals.json
๐ references/
๐ database-orm.md
๐ engineering-principles.md
๐ microservices.md
๐ module-boundaries.md
๐ SKILL.md