#Introduction
Clean Architecture Principle is the application's core functionality which separate into three layers:
- Presentation Layer: how the data presents to the user
- Domain Layer: can be called as use case layer where the core logic of the application.
- Data Layer: how data can be accessed.
Each layer has its own data model, and data can only be exchanged between layers and usually flow in one direction anytime data needs to be changed. At the data layer, every source of data should be represented using the repository data pattern.
Here is the given example in swift code
Organize Folder
Note: You can structure your folder as you like too, this is the example and basically I structured my project like this, so it is clean and easy to understand for who will work after me in the future (in case). It takes less time to understand the whole project.
Ideally, inside Presentation folder, I stored all the view files, there are collection of screens, one scene represents one view or one screen.