Skip to content

Develop a Flutter application that manages user authentication, product browsing with searching option, and checkout processes. This involves integrating with existing APIs, using bearer token authentication for securing API requests. E-Commerce Functionality Implementation with Flutter BLoc State Management

Notifications You must be signed in to change notification settings

majharul-islam181/LRL-Shopping

Repository files navigation

LRL Shopping

Table of Contents

  1. Project Overview
  2. Resources
  3. Features
  4. App Screenshots
  5. Technical Specifications
  6. Installation
  7. Running the App
  8. Testing

Project Overview

LRL Shopping is a Flutter-based mobile application designed to facilitate product browsing, stock checking, and order placement in an e-commerce environment. The app integrates with a backend API to manage product inventory, user authentication, and order checkout.

Resources

  • API Base URL: https://demo.limerickbd.com/backend/public/api/
  • Auth API: Used for login and logout (/login, /logout)
  • Product API: Retrieves product listings with stock details (/fg-with-stock)
  • Dio: Handles API requests with error handling
  • Shared Preferences: Stores authentication tokens securely for user sessions

Features

1️⃣ Authentication

  • User Login: Users can log in with their credentials.
  • Token Management: The app securely stores the authentication token after a successful login.
  • Logout Functionality: The app provides a logout feature that clears stored user data and tokens.

2️⃣ Product Listing

  • Retrieve Products: The app fetches products and their stock details.
  • Search Functionality: Users can search for products by name.
  • Stock & Pricing Details: The product list includes name, stock quantity, price, and master pack details.
  • Quantity Selection: Users can increase/decrease the quantity of selected products.

3️⃣ Checkout & Order Management

  • Review Selected Products: The checkout page displays the selected products, their quantities, and total prices.
  • Stock Validation: The app ensures that selected products are available before proceeding to checkout.
  • Remove & Modify Products: Users can modify product quantities or remove items from the checkout list.
  • Submit Order: A placeholder function simulates order placement.

App Screenshots

<img src="/assets/screenshots/settings-darkmode.png" width="200" />


Technical Specifications

📌 Architecture

  • Clean Architecture: The app follows a layered structure:
    • Data Layer: Manages API calls and data sources.
    • Domain Layer: Contains business logic and use cases.
    • Presentation Layer: Manages UI and user interactions.

📌 State Management

  • BLoC (Business Logic Component): Used for managing authentication, product listing, and checkout state.

📌 Networking

  • Dio: Used for handling API requests and error handling.
  • Pretty Dio Logger: Provides API request/response logging in debug mode.

📌 Authentication & Secure APIs

  • Bearer Token Authentication: The app securely stores and passes the authentication token in API requests.
  • Shared Preferences: Stores the token persistently for maintaining user sessions.

📌 Routing

  • Navigator 2.0: Manages screen transitions efficiently.

📌 Localization

  • Easy Localization: Supports multi-language UI, allowing users to switch languages.
  • Language Support: Currently supports English and Bengali.

📌 Dependency Injection

  • GetIt: Manages service dependencies, ensuring modular and scalable code.

📌 Handling Data and Internet Connectivity

  • Connectivity Package: Checks internet connectivity before making API requests.
  • Error Handling: Provides clear error messages for API failures and network issues.

Running the App

With Android Studio

  • Open the project in Android Studio, where launch configurations for different flavors (development and production) are saved.
  • Select the appropriate configuration and run the app.
  • Also, select Run All Tests to execute all unit and widget tests.

From Command Line

🚀 Run the App

  • For Development Flavor:
    flutter run --flavor development -t lib/app/env/main_development.dart
  • For Production Flavor:
    flutter run --flavor production -t lib/app/env/main_production.dart

🧪 Run Tests

  • Execute all tests:
    flutter test

📦 Build APK

  • For Development Build:

    flutter build apk --flavor development -t lib/app/env/main_development.dart
  • For Production Build:

    flutter build apk --flavor production -t lib/app/env/main_production.dart

📦 Build App Bundle (AAB)

  • For Play Store Upload:
    flutter build appbundle --flavor production -t lib/app/env/main_production.dart
    
  • For Production Build:
    flutter build apk --flavor production -t lib/app/env/main_production.dart

Installation

1️⃣ Clone the repository:

git clone https://github.com/your-username/lrl-shopping.git

Installation

1️⃣ Download LRL-Shopping App:

https://drive.google.com/drive/folders/101FnCB3eUsQDlCqqZJZgYSlSBE-zhiSF?usp=sharing

About

Develop a Flutter application that manages user authentication, product browsing with searching option, and checkout processes. This involves integrating with existing APIs, using bearer token authentication for securing API requests. E-Commerce Functionality Implementation with Flutter BLoc State Management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published