xenShop is an E-Commerce iOS Application with basic functionality as described below:
- Customers should be able to view the list of the products based on the product categories
- Customers should be able to add the products to the shopping cart
- Customers should be able to view the products listed on the shopping cart
- Customers should be able to remove the products listed on the shopping cart
- Customers should be able to checkout shopping cart and continue their transaction to payment page
xenShop iOS application is build using SwiftUI and Combine targetting iOS 15.0 and above.
Below is the major application components.
-
AppState (ObservedObject): Complete App Data state. As SwiftUI views as just representation of State, this State drives all the views.
-
Views
- ProductView: Product List view
- ProductRowView: Item in product list
- ProductDetailView: Product details view
- CartView: Cart List view
- CartItemView: Cart Item in cart list
- TabbarView: Home Tabbar view
- SplashView: Application Start splash screen
- OrderView: Success/Failure order view
Other helper views
- StarsView: Star rating view (https://swiftuirecipes.com/blog/star-rating-view-in-swiftui)
- ActivityIndicatorView: Loading Indicator view
- LineView: Simple line view
- XenImageView: Async Image loading view from remote url
- OverlayView: Show overlay banner view (https://prafullkumar77.medium.com/swiftui-how-to-make-toast-and-notification-banners-bc8aae313b33)
-
NetworkManager: Networking is done using Moya + Combine library (https://github.com/Moya/Moya)
- XenShopAPI: Enum listing all possible APIs Cart API not working as of now, so didn't integrate those.
- XenShopError: Error parsing from API
- Fake APIs used from https://fakestoreapi.com
-
Model:
- Product: Product Details like (title, description, price, etc.)
- Cart: Cart details like (cardId, userId, products in cart with quantity)
-
Constant:
- XenColor: Color pallet for app
- Constant.XenString: String constant for app
Design (UI/UX) inspiration is coming from free template available on Figma.
To run the application locally, please used Xcode 13.4+ and make sure all command line tools are installed.
- Open xenShop.xcodeproj file using Xcode
- Resolve SPM dependencies: Xcode -> File -> Packages -> Resolve package dependencies
- Run application target
xenShop
to iOS Simulator.
There seems to be an issue with running the XCTest for iOS target of this project. Most probably due to M1 mac. Not much time to dig deep and resolve issue.