- Submitted By: Dana Barhoom (A00200)
- Course: Mobile Programming (COSC 348)
- University: American University of Bahrain (AUBH)
- Degree: BSc in Computer Engineering
- Submission Date: 15/12/2024
This project is a simple, interactive clothing store app built using SwiftUI in Xcode. It allows users to browse, search, favorite, and manage clothing items through a clean and user-friendly interface. The app also features user login, profile management, and a functional shopping cart.
- Develop a functional retail shopping app in Swift.
- Demonstrate SwiftUI and MVVM architecture knowledge.
- Implement core features such as login, product browsing, cart management, and data persistence.
The app includes:
- Login page (name & email)
- Home screen with featured products
- Product grid with filtering (e.g., Shoes, Tops)
- Item details page
- Cart (favorites) with quantity editing
- Profile screen with editable address & order history
- Local data storage using
UserDefaults
- Language: Swift
- Framework: SwiftUI
- IDE: Xcode (macOS)
- Architecture: MVVM (Model-View-ViewModel)
- Storage:
UserDefaults, JSONEncoding/Decoding
- Collects and stores user name and email.
- Displays info on the profile page.
- Animated product highlights.
- Horizontal product list with clickable items.
- Grid view navigation.
- Detailed product view with image, rating, and color.
- Add to Cart functionality.
- Grid layout of all products.
- Quick add to cart (+ button).
- Category filtering (Shoes, Tops, Bags, etc.)
- View all added items.
- Edit quantity or delete items.
- Checkout simulation via ApplePay button.
- Total price calculation.
- Display name, email, address, and phone number.
- Edit address.
- View past orders.
- Sign out functionality.
- Uses
@State,@Binding, andUserDefaultsfor local storage. - JSONEncoder/Decoder used for saving cart contents.
- Cart data persists across app sessions.
- Tested item addition, deletion, and quantity updates.
- Verified correct total price updates.
-
Simulated user actions to test:
- Navigation
- Cart updates
- Profile editing
Cart data was lost when the app closed.
Implemented UserDefaults and JSON encoding/decoding to persist data between sessions.
- Push Notifications: Remind users about items in cart.
- Dark Mode: Optional theme toggle for better UX.