Welcome to the Flutter Firebase Goodies Shopping App! This app showcases an exciting e-commerce platform built using Flutter and Firebase, with multiple user flows: Guest, Buyer, Seller, and Admin. Follow the instructions below to set up the project and explore its features.
- Generate the Android Folder in Your Existing Project
In your main project directory, you can directly create the android
folder by running:
flutter create .
To use Firebase features in your app, you need to configure Firebase by following one of these options:
-
Add
firebase.json
file: Download thefirebase.json
configuration file from the Firebase console and place it in the root directory of your project or Use Firebase Cli and configure accordingly. -
Use Firebase Emulator: To set up the Firebase Emulator for local testing:
-
Install the Firebase CLI if you haven't already:
npm install -g firebase-tools
-
Initialize Firebase in your project:
firebase init
-
Start the Firebase Emulator:
firebase emulators:start --import=./emulator-data
-
This must start the firebase emulator with such visbile output:
-
- Test the App: Open the app and interact with it to test different user flows while connected to the local emulator.
- Note: just make sure to keep that particular port free or change the port number from firebase,json
The emulator allows you to simulate Firebase services locally, such as Firestore, Authentication, and more.
The app includes four distinct user flows:
-
Guest: Explore the app without logging in. Guests can browse products, view product details, and see limited features.
-
Buyer: Registered users who can add products to their cart, make purchases, and track orders.
-
Seller: Users who can list products for sale, manage inventory, and fulfill orders.
-
Admin: Admins have access to manage users, oversee transactions, and monitor app activities.
To run the app with your data using the Firebase Emulator, or to set up a fresh Firebase project:
-
Option A: Use Emulator with Your Data
- If you have a pre-existing set of data you want to use, you can import it by running:
firebase emulators:start --import=./emulator-data
- Make sure your data files are in the
./emulator-data
directory to be loaded by the emulator.
- If you have a pre-existing set of data you want to use, you can import it by running:
-
Option B: Set Up a Fresh Firebase Project
- If you prefer to set up a fresh Firebase project:
- Go to the Firebase Console and create a new project.
- Add your desired Firebase services (Firestore, Authentication, etc.).
- Download the
google-services.json
file and place it in theandroid/app
directory. - Manually add initial data to your Firebase project using the Firebase Console.
- If you prefer to set up a fresh Firebase project:
Include images of different screens and user flows to provide a visual overview of the app. Add screenshots to the /images
folder and reference them accordingly in the README file.
If you want to contribute to this project, please fork the repository and submit a pull request. For any questions, feel free to open an issue.
This project is licensed under the MIT License.
Feel free to adjust further or add more specific details as needed!