nx-workspace-architect

Guides Nx monorepo architecture with Angular and NestJS library organization.

Updated Jun 14, 2026
One-click install
npx skills add https://github.com/ironkid90-s/lucky5-v7 --skill nx-workspace-architect-ironkid90-s
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nx-workspace-architect
Source: https://github.com/ironkid90-s/lucky5-v7/tree/main/.ptah/skills/nx-workspace-architect
Command: npx skills add https://github.com/ironkid90-s/lucky5-v7 --skill nx-workspace-architect-ironkid90-s

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up and scaling an Nx monorepo with Angular and NestJS involves many decisions—library types, naming conventions, tagging strategies, module boundaries, and TypeScript path mappings—that are easy to get wrong and costly to refactor later. ## Core Features & Use Cases - Library Type System: Defines feature, feature-api, ui, data-access, util, api-interfaces, and domain library types with naming conventions and dependency rules. - Module Boundary Enforcement: Provides ready-to-use ESLint @nx/enforce-module-boundaries configurations with scope, type, and platform tag dimensions. - Custom Generators: Shows how to build Nx workspace generators that scaffold entire domain library structures in one command. - Use Case: When starting a new SaaS product with an Angular frontend and NestJS backend, use this Skill to scaffold the workspace, create domain-organized libraries, and enforce architectural boundaries from day one. ## Quick Start Ask the AI to set up a new Nx workspace with an Angular web app, a NestJS API, and a user-management domain organized into feature, ui, and data-access libraries.

Frequently Asked Questions about nx-workspace-architect

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

FAQPage Schema
How do I structure an Nx monorepo with Angular and NestJS?

Organize code into thin apps and domain-based libraries under libs/. Each domain gets feature (Angular smart components), feature-api (NestJS controllers), ui, data-access, and util libraries, with shared and core directories for cross-domain code.

How to enforce module boundaries in an Nx workspace?

Use the @nx/enforce-module-boundaries ESLint rule with depConstraints based on tags. Tag each project with scope, type, and platform dimensions in project.json, then define which tag combinations may depend on each other.

What library types should an Nx monorepo use?

Common types are feature (smart components and routes), ui (presentational components), data-access (state and API clients), util (pure functions), api-interfaces (shared DTOs), and domain (DDD entities). Each type has distinct dependency rules.

Can Angular and NestJS share code in an Nx workspace?

Yes, through platform-shared libraries such as api-interfaces for DTOs and types, util for pure functions, and domain for business models. Platform-specific code like Angular components must never be imported by NestJS libraries.

How do I create a custom Nx generator for domain libraries?

Create a plugin project with @nx/plugin:plugin, add a generator with a schema.json defining inputs, then implement generator.ts using @nx/devkit to compose existing library generators and template files. Test it with createTreeWithEmptyWorkspace.

Why does my Nx import fail with a module boundary error?

The ESLint rule blocks imports that violate depConstraints, such as a ui library importing data-access or cross-domain imports. Fix it by moving shared code to an allowed library type or adjusting the tag constraints in .eslintrc.json.