Application Name: E-Commerce
Developer: Berkay Yaman
Purpose: An e-commerce application that allows users to shop online.
- SwiftUI: UI development
- MVVM: Architectural pattern
- Firebase Authentication & Firestore: Authentication and data management
- Mocky API: JSON data integration
- Alamofire: Network request management
- Kingfisher: Image loading and caching
- Model: Represents the application's data structures.
- ViewModel: Handles data processing and business logic.
- View: Creates the user interface and displays data from the ViewModel.
- Alamofire: Used for HTTP requests and API integration.
- Firebase: Provides user authentication and data storage.
- Kingfisher: Handles image loading and caching.
You can access the UI design of the E-Commerce application on Figma :
🔗 Figma Design Link
- Mocky provides JSON-based data.
- API responses are fetched using Alamofire and processed within the ViewModel before being displayed in Views.
- Mock Data(Products)
{
"products": [
{
"id": 1,
"name": "Sony WH-1000XM5",
"price": 349.99,
"views": 1523,
"rating": 4.8,
"image": "https://productimages.hepsiburada.net/s/240/424-600/110000223938780.jpg/format:webp"
},
{
"id": 2,
"name": "Apple AirPods Pro (2. Nesil)",
"price": 249.99,
"views": 4321,
"rating": 4.7,
"image": "https://cdn.vatanbilgisayar.com/Upload/PRODUCT/apple/thumb/0003-layer-3_large.jpg"
}
]
}- Mock Data(Product Detail)
{
"product": {
"id": 1,
"name": "Sony WH-1000XM5",
"price": 349.99,
"currency": "USD",
"views": 1523,
"rating": 4.8,
"images": [
"https://productimages.hepsiburada.net/s/240/424-600/110000223938780.jpg/format:webp",
"https://example.com/sony-wh-1000xm5-side-view.jpg",
"https://example.com/sony-wh-1000xm5-top-view.jpg"
],
"reviews": [
{
"username": "john_doe",
"rating": 5,
"comment": "Amazing sound quality and noise cancellation!",
"date": "2025-03-25",
"images": [
"https://example.com/review-image1.jpg",
"https://example.com/review-image2.jpg"
]
},
{
"username": "jane_smith",
"rating": 4,
"comment": "Comfortable to wear, but a bit expensive.",
"date": "2025-03-24",
"images": []
}
],
"relatedProducts": [
{
"id": 2,
"name": "Bose QuietComfort 45",
"price": 329.99,
"currency": "USD",
"image": "https://example.com/bose-qc45.jpg"
},
{
"id": 3,
"name": "Apple AirPods Max",
"price": 499.99,
"currency": "USD",
"image": "https://example.com/airpods-max.jpg"
}
]
}
}
- User login and registration are handled using Firebase Authentication.
- User-related data is stored in the Firestore database.
- Xcode 15+
- Swift 5+
- Swift Package Manager
git clone https://github.com/ymnberkay/E-Commerce.git
- Follow Firebase setup instructions to create a new Firebase project.
- Download the GoogleService-Info.plist from your Firebase console and add it to your Xcode project.
- In Xcode, go to File > Swift Packages > Add Package Dependency.
- Add the necessary dependencies (such as Alamofire, Firebase, and Kingfisher) from their respective repositories.