structuring-project-layout
Installation
SKILL.md
Structuring Project Layout
When to use
- Starting a new Node.js TypeScript repo
- Adding a new feature module
- Refactoring tangled imports and unclear boundaries
Core rules
- Three-layer layout:
src/domain/,src/application/,src/infrastructure/ - Feature modules inside
src/features/<feature-name>/with own layers - Shared kernel in
src/shared/(types, errors, contracts, constants) - Barrel files (
index.ts) in every folder for clean imports - Path aliases:
@domain/*,@application/*,@infrastructure/*,@shared/* - No cross-feature imports; use
@shared/contracts