Outline: (1) the Big Ball of Mud; layered vs. inverted dependencies; (2) SOLID at the class level; (3) Clean Architecture: layers, the Dependency Rule, Hands-on 1 mapping; (4) Hexagonal: ports, adapters, the store's adapters, testing; (5) Clean vs. Hexagonal, when not to; (6) CQRS; (7) mistakes.
Runtime calls still go service → DB; only the compile-time dependency flips. SOLID's D does this.
DIP is what makes Clean and Hexagonal possible: invert the dependency at every boundary.