Skip to content

ymnberkay/E-Commerce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

E-Commerce Application

General Information

Application Name: E-Commerce
Developer: Berkay Yaman
Purpose: An e-commerce application that allows users to shop online.

Technologies Used:

  • 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

Architecture and Technologies

MVVM Architecture:

  • 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.

Third-Party Libraries Used:

  • Alamofire: Used for HTTP requests and API integration.
  • Firebase: Provides user authentication and data storage.
  • Kingfisher: Handles image loading and caching.

UI/UX Design (Figma)

You can access the UI design of the E-Commerce application on Figma :
🔗 Figma Design Link


API and Data Management

Mocky API Usage:

  • 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"
      }
    ]
  }
}

Firebase Authentication & Firestore:

  • User login and registration are handled using Firebase Authentication.
  • User-related data is stored in the Firestore database.

Screenshots

Login Signup Home Detail Profile Shopping AllData

Installation and Setup

Requirements:

  • Xcode 15+
  • Swift 5+
  • Swift Package Manager

Steps:

1. Clone the project from GitHub:

git clone https://github.com/ymnberkay/E-Commerce.git

2. Create a Firebase project and add the GoogleService-Info.plist file to your project.

  • 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.

3.Install dependencies using Swift Package Manager in Xcode:

  • In Xcode, go to File > Swift Packages > Add Package Dependency.
  • Add the necessary dependencies (such as Alamofire, Firebase, and Kingfisher) from their respective repositories.

4.Open the project in Xcode and run the application.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages