This project demonstartes use of some of the APIs from Cookpad's challenge.
-
Project consists 3 screens
- Curated collections
- Recipes list of a collection
- Recipe details
-
Min deployment version iOS 13.0 and supports iPhones in portrait orientation
-
Project is based on UIKit, written entierly in Swift 5 and uses storyboards and XIBs, using Xcode 13.2.1
-
No use of external dependencies
-
First screen loads list of collections and displays them in a collection view
-
2nd screen loads list of recipes of a selected collection, and shows them in a table view
-
3rd screen shows details of the selected recipe, using table view
- Checkout the main branch of the project
- Since there's no external dependency, project should complie successfully right away
-
Project consists 2 main modules
- Curated Collections (to load collections)
- Recipe (to load recipes from a given collectionId)
-
There are 2 more modules
- APIClient (handles API communication)
- Mapper (handles mapping response data to models)
-
Views folder consists different classes and models which are used in ViewControllers
-
Use of dependency injection and SOLID principles
-
MVVM design pattern with bindings using Diffable Datasource
-
Consists unit tests for both the main modules
Project can be easily extended to include more screens as there are a few more APIs in the API documentation. I would like to add a collection view to show images which are attached with some of the Steps of a recipe details (I didnt add that due to time crunch). I would add more modules as needed using TDD approach.
Additionally, I would add a tab bar with 2 tabs, which would have existing Collections screen and a new screen to show all the recipes using api/recipes
. I couldn't find pagination information for any of the API, so If I were to add all recipes screen I would need that information.
Search functionality for all recipes screen could also be implemented with the use of CoreData and Combine frameworks.
To improve the UI, I would add some animation for navigation from one screen to another. For example, Collection View cell would expand upon selection to show recipe list screen. Slightly different kind of animation could be used from recipe list screen to recipe details screen.