Skip to content

COS30017-SoftwareDevForMobileDevices/Swinburne-E-Commerce-Mobile-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Swinburne E-Commerce Mobile Application

Author: Do Gia Huy
Student ID: 104988294


πŸ“± Project Overview

The Swinburne E-Commerce Mobile Application is a full-featured Android mobile app designed to provide users with a seamless shopping experience. This application allows users to browse products, manage shopping carts, make purchases, track orders, and manage user accounts through an intuitive interface.


✨ Features

Core Functionality

  • Product Browsing: View a comprehensive catalog of products with detailed information
  • Product Search & Filter: Easily find products using filters and search functionality
  • Shopping Cart: Add/remove items, manage quantities, and calculate totals
  • Checkout Process: Multi-step checkout with shipping and payment information
  • User Authentication: Secure login and registration with Google Sign-In integration
  • Order Management: View order history and track order status
  • Favorite Products: Mark and manage favorite products for quick access
  • User Profile: Manage user information and preferences
  • Guest Checkout: Allow users to continue shopping without account creation

Technical Features

  • Real-time Database: Firebase Firestore for scalable data management
  • Modern UI/UX: Material Design components with smooth animations
  • Bottom Navigation: Easy access to main sections (Home, Cart, Profile, Orders, Favorites)
  • Image Optimization: Efficient image loading with Picasso and Glide
  • Animations: Smooth transitions and slide animations between screens

πŸ› οΈ Technologies & Dependencies

Core Technologies

  • Language: Kotlin
  • Android SDK: Target SDK 36, Min SDK 27
  • Build Tool: Gradle (Kotlin DSL)
  • Architecture Components: ViewModel, LiveData, Navigation, Fragment

Key Dependencies

  • Firebase:
    • Cloud Firestore (Database)
    • Firebase Authentication
    • Google Services
  • UI Components:
    • AndroidX Material Design (Material 3)
    • ConstraintLayout
    • RecyclerView
  • Image Loading:
    • Picasso
    • Glide
  • Authentication:
    • Google Sign-In
    • AndroidX Credentials API
  • Async Operations:
    • Kotlin Coroutines
  • Testing:
    • JUnit
    • Robolectric
    • Espresso
    • Mockito
    • AndroidX Navigation Testing

πŸ“‚ Project Structure

mobile/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”‚   β”œβ”€β”€ java/com/assignment3/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ MainActivity.kt          # Main activity with navigation
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ adapters/                # RecyclerView adapters
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ fragments/               # UI fragments
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ auth/                # Login, Register, ResetPassword
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ home/                # Home screen
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ product/             # Product listing
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ productdetail/       # Product details
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ cart/                # Shopping cart
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ checkout/            # Checkout process
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ favorite/            # Favorites
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ order/               # Order management
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ profile/             # User profile
β”‚   β”‚   β”‚   β”‚   β”‚   └── guest/               # Guest features
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ models/                  # Data models
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ repositories/            # Data access layer
β”‚   β”‚   β”‚   β”‚   └── interfaces/              # Interfaces and contracts
β”‚   β”‚   β”‚   β”œβ”€β”€ res/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ layout/                  # XML layout files
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ drawable/                # Vector drawables and resources
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ anim/                    # Animation resources
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ values/                  # Colors, strings, dimensions
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ navigation/              # Navigation graph
β”‚   β”‚   β”‚   β”‚   └── mipmap-*/               # App icons
β”‚   β”‚   β”‚   └── AndroidManifest.xml         # App manifest
β”‚   β”‚   β”œβ”€β”€ androidTest/                     # Instrumentation tests
β”‚   β”‚   └── test/                            # Local unit tests
β”‚   β”œβ”€β”€ build.gradle.kts                     # App-level build configuration
β”‚   └── google-services.json                 # Firebase configuration
β”œβ”€β”€ gradle/
β”‚   └── libs.versions.toml                   # Centralized dependency versions
β”œβ”€β”€ build.gradle.kts                         # Root-level build configuration
β”œβ”€β”€ settings.gradle.kts                      # Project settings
└── gradlew                                  # Gradle wrapper (Unix)

πŸ“‹ Data Models

The application uses the following core data models:

  • User: User account information and authentication details
  • Product: Product information including price, description, images
  • CartItem: Shopping cart items with quantity and product reference
  • OrderItem: Order history and status tracking
  • ShippingAddress: Delivery address information

πŸš€ Getting Started

Prerequisites

  • Android Studio (latest version recommended)
  • Java 11 or higher
  • Android SDK 36
  • Git
  • Firebase account and project setup

Installation & Setup

  1. Clone the Repository

    git clone <repository-url>
    cd mobile
  2. Configure Firebase

    • Create a Firebase project in the Firebase Console
    • Enable Firestore Database and Firebase Authentication
    • Download your google-services.json file
    • Place it in the app/ directory
  3. Build the Project

    ./gradlew build
  4. Run the Application

    • Open the project in Android Studio
    • Connect an Android device or start an emulator
    • Click "Run" (or press Shift+F10)

Building APK

For release build:

./gradlew assembleRelease

The APK will be available in app/release/


πŸ§ͺ Testing

The project includes comprehensive test coverage:

Run Unit Tests

./gradlew test

Run Instrumentation Tests

./gradlew connectedAndroidTest

Testing Frameworks Used

  • JUnit: Unit testing
  • Robolectric: Android component testing
  • Espresso: UI testing
  • Mockito: Mocking framework
  • AndroidX Navigation Testing: Fragment navigation testing

πŸ“¦ Build Configuration

  • App ID: com.assignment3
  • Version Code: 3
  • Version Name: 1.1
  • Target SDK: 36
  • Minimum SDK: 27 (Android 8.1)
  • Java Compatibility: Java 11

πŸ” Security Notes

  • Never commit sensitive files like keystores/password.txt to version control
  • Keep google-services.json secure and out of public repositories
  • Use environment variables for sensitive configuration

πŸ“ Development Notes

Navigation

The app uses Android Navigation Component with bottom navigation for main sections. Some screens (login, product detail, checkout) hide the bottom navigation for a cleaner experience.

State Management

The app uses LiveData and ViewModel for managing UI state. Kotlin Coroutines handle asynchronous operations.

Database

Firebase Firestore is used for real-time data synchronization. Authentication is handled through Firebase Authentication with Google Sign-In support.


πŸ› Troubleshooting

Gradle Build Issues

  • Run ./gradlew clean before building
  • Ensure you have the correct Android SDK versions installed
  • Check that internet connection is available for dependency downloads

Firebase Connection Issues

  • Verify google-services.json is in the correct location (app/)
  • Check Firebase project configuration matches app package name
  • Ensure Firebase services are enabled in your project

Android Emulator Issues

  • Update Android Emulator to the latest version
  • For better performance, enable hardware acceleration
  • If issues persist, try running on a physical device

πŸ“„ License

This project is part of Swinburne University coursework.


πŸ‘€ Author Information

  • Name: Do Gia Huy
  • Student ID: 104988294
  • Institution: Swinburne University

About

A Kotlin-based Android e-commerce application providing a complete shopping experience with real-time Firebase integration, secure Google authentication, and a modern Material Design interface.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages