A simple e-commerce application built using Swift with the Model-View-ViewModel (MVVM) architecture. The app allows users to browse and search for products, add items to the cart, and proceed to checkout. This project does not use storyboards and adopts a full programmatic UI approach.
- Browse and search for products
- Add products to the shopping cart
- View the shopping cart contents
- Proceed to checkout and complete the order (Mock service, no real payments)
- Clone this repository to your local machine.
- Open the Xcode project.
- Build and run the application on your simulator or iOS device.
The project uses the following third-party libraries:
- SDWebImage: For asynchronous image loading and caching.
- swift-collections: For additional data structures and algorithms.
The project includes both UI tests and unit tests to ensure code reliability and maintainability.
The unit tests validate individual units of code (e.g., ViewModel methods) in isolation to ensure their correctness. These tests are located in the ECommerceAppTests target. To run the unit tests, follow these steps:
- Open the Xcode project.
- Select the ECommerceAppTests target from the target list.
- Press Cmd + U or click the Play button next to the test class to run the unit tests.
The UI tests cover essential user flows and interactions within the app. These tests are located in the ECommerceAppUITests target. To run the UI tests, follow these steps:
- Open the Xcode project.
- Select the ECommerceAppUITests target from the target list.
- Choose a simulator or a connected iOS device.
- Click the Play button or press Cmd + U to run the UI tests.
app.mov
Special thanks to the following resources that helped in building this project:
Skeleton Loader Shimmer Effect
Thanks to OpenAI for providing the GPT-3.5 language model that assisted in creating this README.