Strategic architecture, tactical design, and testable code principles (SOLID, Clean Architecture, Design Patterns, Testable Design)
97
97%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
The folder structure should communicate what the system does, not what framework it uses. Looking at the top-level directories should reveal the business domain.
Incorrect (framework-oriented structure):
src/
├── controllers/
│ ├── UserController.ts
│ ├── OrderController.ts
│ └── ProductController.ts
├── services/
│ ├── UserService.ts
│ ├── OrderService.ts
│ └── ProductService.ts
├── repositories/
│ ├── UserRepository.ts
│ ├── OrderRepository.ts
│ └── ProductRepository.ts
├── models/
│ ├── User.ts
│ ├── Order.ts
│ └── Product.ts
└── utils/
└── helpers.ts
# This screams "MVC framework" not "e-commerce system"Correct (domain-oriented structure):
src/
├── ordering/
│ ├── domain/
│ │ ├── Order.ts
│ │ ├── OrderLine.ts
│ │ └── OrderStatus.ts
│ ├── application/
│ │ ├── PlaceOrderUseCase.ts
│ │ ├── CancelOrderUseCase.ts
│ │ └── ports/
│ │ ├── OrderRepository.ts
│ │ └── PaymentGateway.ts
│ └── infrastructure/
│ ├── PostgresOrderRepository.ts
│ └── StripePaymentGateway.ts
├── inventory/
│ ├── domain/
│ ├── application/
│ └── infrastructure/
├── customers/
│ ├── domain/
│ ├── application/
│ └── infrastructure/
└── shared/
└── kernel/
├── Money.ts
└── EntityId.ts
# This screams "e-commerce with ordering, inventory, customers"Benefits:
Reference: Screaming Architecture
clean-architecture
evals
references
design-patterns
solid-principles
testable-design