You are not done when it work
Invest the time to spend to write the program to make the program clean
Clean code what is expect when to read the code
Function should be verb (not noun)
Function
File should be <100 lines
- Single responsibility
- Open-closed
- Liskov substitution
- Interface segregation
- Dependency inversion
![][image4]
Clean Architecture
Dependency Inversion Principle
Interface adapters
Entities
Use cases
Controllers
Gateway
Presenter
Devices
Web
Database
UI
External Interface
Dependency Injection
Data flow from outside to inside
Using Clean Architecture for Microservice APIs in Node.js with MongoDB and Express