-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from helloItsHEssam/feature/document
Add Documentation
- Loading branch information
Showing
19 changed files
with
157 additions
and
28 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,29 @@ | ||
# Data | ||
|
||
A description of this package. | ||
## Description | ||
In Clean Architecture, the "Data" module plays a crucial role and is divided into two main parts: "Network" and "LocalStorage." This module allows the application to communicate with external resources and store the desired data in local files. | ||
|
||
"Network" Section: In this section, the application has the capability to communicate with external resources such as servers and web services. These communications are typically used to retrieve real-time data from external sources. | ||
"LocalStorage" Section: This section enables the application to store data in local files or local databases. This is usually done to retain data that the application may need for future use. | ||
In this way, the "Data" module provides the application with the ability to manage and access the required data in two parts, "Network" and "LocalStorage," allowing it to establish communication with external sources and store local data. | ||
|
||
## Targets | ||
In the **"Data"** module that we've created, there are the following targets: | ||
|
||
- **Common**: This section contains items that are needed across all other sections. | ||
|
||
- **Local**: In this section, the program fulfills all its requirements for storing and retrieving images from the device's memory. | ||
|
||
- **Http**: In this section, the program manages requests to the server. | ||
|
||
- **Repositories**: In this section, protocols needed by the "Domain" module are implemented. | ||
|
||
## Targets | ||
In this module, only the **"Alamofire"** library has been used for the "Network" target. | ||
|
||
## Diagrams | ||
<img alt="Data Digram" src="Diagram/1.png"> | ||
<img alt="Data Digram" src="Diagram/2.png"> | ||
<img alt="Data Digram" src="Diagram/3.png"> | ||
<img alt="Data Digram" src="Diagram/4.png"> | ||
<img alt="Data Digram" src="Diagram/5.png"> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
# Domain | ||
|
||
A description of this package. | ||
## Description | ||
In this layer, we place our **business logic**, and it acts as an interface between the **"Presentation"** and **"Data"** layers. It consists of three main components: **Entities**, **Use Cases**, and **Repository Protocol**. | ||
|
||
In summary, the **"Domain"** module is where your application's business logic is defined and serves as a bridge between the **"Presentation"** and **"Data"** layers. It includes entities that represent your data, use cases that define your application's operations, and a repository protocol for data access. | ||
|
||
## Targets | ||
In the **"Domain"** module that we've created, there are the following targets: | ||
|
||
- **"Entities"**: These are the core data structures that represent the fundamental concepts of your application. They encapsulate the most critical business rules and data. | ||
|
||
- **"Use Cases"**: These are the application's core business logic components. They define the specific operations or use cases your application can perform. | ||
|
||
- **"Repository Protocol"**: This protocol defines the contract for data access. It specifies the methods that must be implemented to interact with data sources, such as databases or network services. | ||
|
||
- **"Error"**: represent and handle errors that can occur during operations involving fetching lists. | ||
|
||
- **"Extension"**: In the "Extension" section, two extensions have been added to convert between Combine and async/await. These extensions allow for seamless communication between Combine and async/await by adding functionality to AnyPublisher. | ||
|
||
|
||
## Diagrams | ||
<img alt="Domain Digram" src="Diagram/1.png"> | ||
<img alt="Domain Digram" src="Diagram/2.png"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Transfer List <img alt="Logo" src="icon.png" align="right" height="50"> | ||
|
||
|
||
## Description | ||
This application is implemented using the **MVVM (Model-View-ViewModel)** pattern along with the **Clean Architecture**. It is structured into three separate modules: Data, Domain, and MediaListUIKit. These modules are organized in a Monorepo setup, managed using Swift Package Manager, and all the modules are kept within a single package. | ||
|
||
## The tech stack used in this project 🛠 | ||
|
||
- UIKit | ||
- MVVM + clean architecture | ||
- Unit Test + MockURL | ||
- async / await (Structured concurrency) | ||
- Combine | ||
- Http client (Alamofire) | ||
- Image Cacher (Kingfisher) | ||
|
||
## Tools | ||
- Xcode 14.3.1 | ||
- Swift 5.8.1 | ||
|
||
## Screenshots 🌃 | ||
List | Detail | ||
:-------------------------:|:-------------------------: | ||
<img alt="list" src="shot1.png">|<img alt="detail" src="shot2.png"> | ||
|
||
## MonoRepo | ||
In a **Monorepo** setup, multiple related projects are stored in a **single repository**, making it easier to manage and share code between them. | ||
<br> | ||
[monorepo.tools](https://monorepo.tools) | ||
|
||
## Modules | ||
- **Data Module**: Contains implementations related to repository, network, and local storage. | ||
- **Domain Module**: Consists of repository protocols, use cases, and entities. | ||
- **MediaListUIKit Module**: Contains Colors, Fonts, and views. | ||
|
||
For more detailed information about each module, you can refer to the following links: | ||
<br> | ||
<br> | ||
[Data](Data/README.md) | ||
<br> | ||
<br> | ||
[Domain](Domain/README.md) | ||
<br> | ||
<br> | ||
[UI](MediaListUIKit/README.md) | ||
|
||
## Clean Architecture + MVVM | ||
|
||
- **Data Layer:** This layer includes repository implementations, network-related components, and local storage handling. | ||
|
||
- **Domain Layer:** Here, you'll find repository protocol, use case (interactors), and entities that represent the core business logic and data structures. | ||
|
||
- **Presentation Layer:** This layer is divided into view models (ViewModels) and views (Views) responsible for presenting the user interface and handling the user interactions. | ||
|
||
|
||
## Presentation Layer | ||
It's important to note that the **Presentation layer** is part of the **main app** and **is not organized as a separate module**. | ||
|
||
<br> | ||
In the Presentation section, the following key components are present: | ||
|
||
1. **SceneDelegate:** This class manages the application's lifecycle. It begins by registering the necessary fonts. It also creates the container required for Dependency Injection, which is utilized by the `ViewModelFactory`. | ||
|
||
2. **DIContainer (Dependency Injection Container):** This protocol is responsible for creating the desired use cases. It should be passed to view models that need these use cases. | ||
|
||
By implementing `DIContainerImpl`, we fulfill the DIContainer protocol, and this is where everything needed to construct use cases is assembled. | ||
|
||
3. **ViewModelFactory:** The purpose of this class is to create view models. It handles the creation of view models that may require specific use cases. In this scenario, views don't directly get involved in the construction of view models; instead, the ViewModelFactory takes care of it. | ||
|
||
## Diagrams | ||
<img alt="App Digram" src="Diagram/1.png"> | ||
<img alt="Presentation Digram" src="Diagram/2.png"> | ||
|
||
## Roadmap | ||
|
||
- [ ] Test | ||
- [ ] UITest cases. | ||
- [ ] Test plan. | ||
|
||
### Contributing 🤝 | ||
|
||
Contributions, issues, and feature requests are welcome! Feel free to fork the repository and submit a pull request with your changes. | ||
|
||
## License | ||
|
||
Please check [LICENSE](LICENSE) for details. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
# UI | ||
|
||
A description of this package. | ||
|
||
## Description | ||
In the **"UI"** section, you'll find everything related to the user interface (UI) needs of the application. It includes the following targets: | ||
|
||
1. **Color:** | ||
- In this section, colors required for the app are created using the `Theme` class. | ||
|
||
2. **Font:** | ||
- This section provides everything needed to create and use fonts, including two parts: | ||
- **Font:** This class is responsible for registering fonts required in the main app. It must be invoked at the beginning of the app as `MediaListFont.registerFonts()`. | ||
- **Raleway:** An enum that creates fonts with specific weights, including regular, semiBold, and extraBold. It is used to retrieve the Raleway font. You can obtain fonts based on text styles: | ||
- `func customFont(basedOnTextStyle textStyle: UIFont.TextStyle) -> UIFont` | ||
|
||
3. **View:** | ||
- In this section, essential UI components are created, which include the following: | ||
- **Base:** In this section, you'll find everything the program needs to create subClasses. | ||
- **CollectionView:** This section contains everything required when using UICollectionView. | ||
- **Label:** In this section, three customized UILabels are available. | ||
|
||
## Diagrams | ||
<img alt="UI" src="Diagram/1.png"> | ||
<img alt="UI" src="Diagram/2.png"> |
This file was deleted.
Oops, something went wrong.