clean-architecture

Enforce a canonical Clean Architecture module structure for NestJS backend components.

Updated Nov 2, 2025
One-click install
npx skills add https://github.com/JPerezC92/TisOps-Hub --skill clean-architecture-jperezc92
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-architecture
Source: https://github.com/JPerezC92/TisOps-Hub/tree/main/.claude/skills/clean-architecture
Command: npx skills add https://github.com/JPerezC92/TisOps-Hub --skill clean-architecture-jperezc92

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It defines a canonical blueprint for structuring backend modules following Clean Architecture, enabling consistent module boundaries, domain separation, and clear dependency rules.

Core Features & Use Cases

  • Standard directory layout for domain, application, and infrastructure layers.
  • Layer rules: domain purity, no framework imports in domain, and factory-based wiring in infrastructure.
  • Reference implementation patterns and naming conventions for adapters, repositories, controllers, and modules.
  • Use with NestJS and Drizzle ORM in a TypeScript monorepo setup, enabling scalable, testable backends.

Quick Start

Apply this blueprint to new or existing modules to standardize structure and wiring.

Frequently Asked Questions about clean-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a NestJS module using clean architecture?

Structure a NestJS module using clean architecture by separating domain, application, and infrastructure layers. This blueprint enforces domain-layer purity, explicit dependency injection via factories, and consistent boundaries for controllers, modules, and repository adapters.

What is the best way to keep domain logic pure in a TypeScript backend?

The best way to keep domain logic pure is to prohibit framework imports within the domain layer. This blueprint enforces layer rules where domain interfaces remain independent, utilizing infrastructure factories for wiring and repository adapters.

Does this clean architecture blueprint work with Drizzle ORM?

Yes, this clean architecture blueprint works with Drizzle ORM. It provides reference implementation patterns for use with NestJS and Drizzle ORM in a TypeScript monorepo setup, ensuring scalable and testable backend components.

How do I migrate an existing backend module to clean architecture?

Migrate an existing backend module to clean architecture by applying this canonical blueprint to standardize directory layout and wiring. It guides module review and migration tasks to ensure explicit dependency injection and clear infrastructure boundaries.

Do I need external dependencies to enforce clean architecture in NestJS?

No, you do not need external dependencies beyond TypeScript to enforce clean architecture in NestJS. This blueprint requires no runtime dependencies, relying instead on a reference implementation pattern using domain interfaces and factory providers.