Objectives: explain each SOLID principle and spot a violation; explain the Dependency Rule and place a class in a Clean Architecture layer; design ports and adapters (driving vs driven); compare layered, Clean and Hexagonal and justify the extra structure; unit-test a use case with an in-memory adapter; describe CQRS and its cost. Outline: (1) the core problem and the layered starting point; (2) SOLID; (3) Clean Architecture; (4) Hexagonal; (5) side-by-side comparison; (6) CQRS.