Skip to content

Clean Architecture

Separating business rules from external details and directing source-code dependencies towards the core.

Software architecture

What is Clean Architecture?

Clean Architecture arranges software so that source-code dependencies point towards an inner core of business rules. The database, user interface and other technical details sit outside. The core should not need to know their concrete classes or data formats. Runtime control flow may point differently; interfaces make this separation possible.

In a fictional example, an approval rule checks business inputs without calling a particular database driver. An outer adapter translates stored data into the required form and connects the parts. This supports focused checks of the core but does not replace checking the adapters. No fixed number of layers is required. Folder names alone do not demonstrate the separation, and the pattern does not automatically guarantee good quality or high performance.

Sources