This iOS application fetches and displays character data from the Rick and Morty API. The app is designed to showcase a clean architecture approach, making the codebase modular, scalable, and testable. Users can browse through a paginated list of characters and view detailed information about each character.
- Swift: The primary programming language used for developing the app.
- UIKit & SwiftUI: Utilized for building the user interface.
- Combine: Used for handling asynchronous events and data binding.
- Clean Architecture: Implements the clean architecture principles to maintain a clear separation of concerns.
- Dependency Injection: Used for managing dependencies and enhancing testability.
- Kingfisher: Used for image caching.
- SkeletonView Add more user-friendly loading style in poor connection situations
Clean Architecture was chosen to ensure that the app is modular, testable, and maintainable. while it might seem to be an overkill for such a simple task, I think such task typically would be a part of a larger app that should follow this architecture like IMDB, Fextralife, etc, This approach provides several benefits as following:
- Separation of Concerns: Each layer has a distinct responsibility, making the codebase easier to understand and maintain.
- Testability: The architecture allows for easier unit and integration testing by decoupling components that can be mocked individually to increase code coverage
- Scalability: The modular structure makes it easier to add new features without impacting existing functionality.
- Flexibility: Components can be easily replaced or updated without affecting other parts of the system.
- Characters are colored in homepage based on their status as following: blue for alive, peach for dead, white for unknown
- filteration happens at API level not on the current character list
- Used Xib files for UIKit instead of designing by code as there are already some SwiftUI views writted by code to showcase diversity in creating UI
- Details don't need to be refetched from remote source as the model itself in homepage has the full details and doesn't have a simplified version
- Used the default urlsession because we don't need any additional customization as no features like SSL pinning are implemented.
- Minor UI enhancements like adding shadow to back button in details page to increase visibility and adding pull to refresh logic
- Separation of concers while designing with clean architecture i.e. having multiple mappers between models
- Choosing what to make mockable and testable
- Dependency Injection Container logic, coordinator logic.
- Pagination Unit testing.
- Enhance network layer to have logging and better error handling
- Adding system for handling accessbility identifier and adding more UI Tests
![Screenshot 2024-07-08 at 05 34 15](https://private-user-images.githubusercontent.com/9192592/346418414-136965be-6e90-4136-a2ee-746de78e354d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTQwNzEsIm5iZiI6MTcyNTU5Mzc3MSwicGF0aCI6Ii85MTkyNTkyLzM0NjQxODQxNC0xMzY5NjViZS02ZTkwLTQxMzYtYTJlZS03NDZkZTc4ZTM1NGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDZUMDMzNjExWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDg3ZTU0Njg2NzFjNjNhZGViNGY2NDQwYzc1NDgxNzZhZTZmMjNjMjc1NzdhYTI2MzhkM2RhNWY5ODA3OWY2NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.BN6ucsSxpX-wNdGHd-srCyptgXD2Cwpo82NFGDFyIso)
![Screenshot 2024-07-08 at 05 34 15](https://private-user-images.githubusercontent.com/9192592/346418434-86c639b0-263a-4e1f-b9a8-b43167e71e61.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTQwNzEsIm5iZiI6MTcyNTU5Mzc3MSwicGF0aCI6Ii85MTkyNTkyLzM0NjQxODQzNC04NmM2MzliMC0yNjNhLTRlMWYtYjlhOC1iNDMxNjdlNzFlNjEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwNiUyRnVzLWVhc3QtMSUyRnMzJT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AifQ.EevvQYcWxvS37yBK4kML7IQithzpgGySkYZzrL5TwRI)
![Screenshot 2024-07-08 at 05 34 15](https://private-user-images.githubusercontent.com/9192592/346418487-74a25e30-62b0-4794-aba6-bb83a23b27b2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTQwNzEsIm5iZiI6MTcyNTU5Mzc3MSwicGF0aCI6Ii85MTkyNTkyLzM0NjQxODQ4Ny03NGEyNWUzMC02MmIwLTQ3OTQtYWJhNi1iYjgzYTIzYjI3YjIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDZUMDMzNjExWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDhmNTczZTlmYmQxMGM2NTM4ODIwOWNiODg2MzZkMmUyY2FhNzUyZGU2NjRiMjk1OWViOGRmZjM2NjcwZTc3YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.r_wY9HOXuNuwtOpDKlkb6rygbhUVPrqb2gcck2aQIAQ)
![Screenshot 2024-07-08 at 05 34 15](https://private-user-images.githubusercontent.com/9192592/346418508-2a4236eb-1301-4303-8c51-d61a3d564050.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTQwNzEsIm5iZiI6MTcyNTU5Mzc3MSwicGF0aCI6Ii85MTkyNTkyLzM0NjQxODUwOC0yYTQyMzZlYi0xMzAxLTQzMDMtOGM1MS1kNjFhM2Q1NjQwNTAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDZUMDMzNjExWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjVhZGI3ZWM2OGUzYjIyMmFhZTU0NTc0ZmVkYTc1MjNmYTMyOTBjYzA2ZmJmY2ZlZDI5MWJjYThjMzZjZmJjMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.AI3yWJATm_GrJVsYfqcFw2mqEUbQZ0dDkZhAvRHTPsQ)
- Xcode 15.0 or later
- iOS 16.0 or later
- Clone the repository:
git clone https://github.com/Mostafa3la2/RickAndMortyCharacters.git