A complete e-commerce mobile application built with Flutter. This app allows users to browse products, add them to their cart, save items to a wishlist, and proceed to checkout. It uses Firebase Firestore for real-time data storage and retrieval. Additionally, the app provides admin and customer roles for a differentiated experience.
- Browse Products: View a list of products fetched from Firestore.
- Add to Cart: Select products, choose options (size, color, etc.), and add them to the cart.
- Wishlist: Save favorite products for later in the wishlist.
- Cart Management: Update or remove products from the cart and view the total price.
- Checkout: Proceed to address input and payment after finalizing the cart.
- Admin Role: Admins can add, edit, or remove products, manage orders, and view customer lists.
- Customer Role: Customers can browse products, add them to the cart or wishlist, and proceed to checkout.
- Firebase Integration: Products, cart, and wishlist are synchronized with Firestore.
- Network Image Loading with Error Handling: Products are displayed with images fetched from a URL, and if the image fails, a fallback image or a placeholder is shown.
Screen_Recording_20241024_225909_2.mp4
List.and.Order.mp4
Screen_Recording_20241024_225942.mp4
Screen_Recording_20241024_230033.mp4
Screen_Recording_20241024_233022.mp4
-
Customer Experience:
- Users can browse through a catalog of products.
- Add selected products to the cart or wishlist.
- Remove items from the cart or wishlist and update the total price in real-time.
- View detailed product information including price, category, and available options.
- Proceed to checkout and input delivery details.
-
Admin Experience:
- Admins can manage the product catalog by adding, updating, or removing products.
- View and manage customer orders.
- Monitor product inventory and update stock.
-
Cart and Checkout:
- Customers can manage their cart (add, remove, or modify items).
- Proceed to checkout after confirming their cart and total price.
- Input address information and complete the purchase (further integration with payment gateways can be added).
-
Wishlist:
- Users can add items to their wishlist and revisit them later for purchasing decisions.
Follow these steps to set up the project locally.
- Flutter SDK: Ensure you have Flutter installed on your machine. You can download it from Flutter's official site.
- Firebase Project: Set up a Firebase project and enable Firestore. Follow the Firebase setup guide to integrate Firebase with Flutter.
-
Clone the repository:
git clone https://github.com/Siddiqui145/ShopApp_Flutter.git cd ShopApp_Flutter -
Install dependencies:
flutter pub get
-
Firebase Setup:
- Download the
google-services.jsonfile from your Firebase Console and place it in theandroid/app/directory. - Similarly, for iOS, download the
GoogleService-Info.plistfile and add it to theios/Runnerdirectory. - Configure Firebase according to this guide.
- Download the
-
Run the project:
flutter run
lib/
βββ main.dart # Entry point of the application
βββ pages/
β βββ cart_page.dart # Cart management page
β βββ form_page.dart # Address input and checkout page
β βββ wishlist_page.dart # Wishlist page
β βββ admin_dashboard.dart # Admin dashboard for managing products
βββ providers/
β βββ cart_provider.dart # Cart management provider (state management)
β βββ wishlist_provider.dart # Wishlist management provider
βββ widgets/
β βββ product_tile.dart # Custom widget for displaying product details
βββ services/
β βββ firebase_service.dart # Firebase-related functions for data fetchingThe project uses Firebase Firestore to store and retrieve product information, cart data, and wishlist data. Ensure you have:
- Enabled Firestore in your Firebase console.
- Added the correct security rules for Firestore.
Example Firestore structure:
Firestore Root
βββ products (collection)
β βββ {productDocumentId} (document)
β β βββ image: String (URL of the product image)
β β βββ company: String (Product company)
β β βββ price: Number (Product price)
β β βββ category: String (Product category)
β β βββ description: String (Product description)
β β βββ options: Array (Available options, e.g., size, color)
βββ users (collection)
β βββ {userId} (document)
β β βββ role: String (admin or customer)
- Flutter: A cross-platform mobile app development framework.
- Provider: For state management.
- Firebase Firestore: For cloud-based NoSQL database.
- Firebase Authentication (Optional): Can be added for user login/signup and role-based access control.
- Image.network: For loading product images with network error handling.
-
Customer Role:
- Customers can browse products, add items to the cart or wishlist, and proceed to checkout.
- Customers will see only the shopping-related functionalities like cart management and wishlist.
-
Admin Role:
- Admins have access to special features like adding or removing products, managing inventory, and viewing customer orders.
- Admin-specific pages are available, like product management and order management.
-
Product Display: Products are displayed with their images, company names, prices, and available options.
-
Cart Functionality: Items can be added, removed, and viewed in a cart with the total price dynamically calculated.
-
Wishlist: Users can add items to their wishlist and view them later.
-
Checkout: After finalizing the cart, users can proceed to input their address for delivery.
- Payment Gateway Integration: Add support for online payments (Stripe, Razorpay, etc.).
- User Authentication: Firebase Authentication for user login, registration, and personalized carts/wishlists.
- Push Notifications: Notify users about product offers, abandoned carts, etc.
- Product Reviews: Allow users to rate and review products.
Contributions are welcome! Please follow these steps to contribute:
- Fork the project.
- Create a feature branch:
git checkout -b feature/new-feature
- Commit your changes:
git commit -m "Add new feature" - Push to the branch:
git push origin feature/new-feature
- Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to use, modify, and contribute to this project. If you encounter any issues, feel free to open an issue or submit a pull request.