What is a clean architecture?

In a Clean architecture, the application is separated in layers. Where the inner layers do not know anything about the outer layers This makes your code: testable, framework independent, UI independent, independent of data management. This can be visualized as:
Clean architecture diagram

Example

We created a simple MVP login Application.
Login Injection
The MVP architecture is an example of a clean architecture:
  • The Inner-layers contain the interactors, the models, repositories etc,
  • The Middle layers contain the Presenters
  • and the Outer layer contains the User Interface

In our example the Activities contains the User Interface. Which have a connection with the Presenters, which in their case talk to the interactors.