Demo.mp4
Assignmnet: An e-commerce app
The Challenge: You have to build an e-commerce app which uses Firebase Authentication, Firebase Remote Config and will fetch products from https://dummyjson.com/products as per the specified designs.
What is expected:
- Firebase Authentication (email only)
- Collect details (name, email) [Store details collected in Firestore in user collection]
- A products feed showing the all the products from (https://dummyjson.com/products)
- The products from the API will have a discountPercentage field, you will need to use discountPercentage to calculate the discountedPrice from the actual price field and display it accordingly in the UI.
- Create a boolean in Firebase Remote Config to decide whether we display the discountedPrice or the original price. [if boolean in Firebase Remote Config is true we calculate the discountedPrice from the discountPercentage for each product and display it or else we only display the original price]
Design specs: https://www.figma.com/proto/plVEnYXYi6CMsCSZdrsPRf/products?node-id=7%3A3&scaling=scale-down&page-id=0%3A1&starting-point-node-id=7%3A3 or https://tinyurl.com/bdcwr4ah
Must Haves:
- Flutter >= v2.2.0
- Error Handling for Backend Services ex: API/Firebase interaction exceptions and errors
- Form validation
- State management [Provider only]
Bonus Points:
- Keep the app size as small as possible
- Following the latest design guidelines
- Follow any well-known architecture pattern
- Surprise us with your creativity!
- Feel free to use any third-party dependencies that may solve the problem
Evaluation Criteria:
- Code quality - The code should be well structured
- Completeness - All the features listed above should work as expected 3. Presentability - The user interface must be clean and usable
- Download fvm and follow the instructions
- Setup Firebase Project
- Implement user login and registration using Firebase Authentication (Email and Password)
- Include basic form validation (e.g., email format, password strength)
- API call to fetch products from server
- Firebase Remote Config to dynamically display the product price along with the discount
These are the main packages used in the app:
- Provider A wrapper around InheritedWidget to make them easier to use and more reusable.
- GoRouter for navigation
- Firebase Auth for authentication
- Cloud Firestore as a realtime database
- Build Runner is concrete way of generating files using Dart code
- Firebase Remote Config
- Dio A powerful HTTP networking package.
See the pubspec.yaml file for the complete list.
To use this project with Firebase, follow these steps:
- Create a new project with the Firebase console
- Enable Firebase Authentication, along with the Email/Password Authentication Sign-in provider in the Firebase Console (Authentication > Sign-in method > Email/Password > Edit > Enable > Save)
- Enable Cloud Firestore
- Enable Firebase Remote Config
Make sure you have the Firebase CLI and FlutterFire CLI installed.
Then run this on the terminal from the root of this project:
- Run
firebase login
so you have access to the Firebase project you have created - Run
flutterfire configure
and follow all the steps
That's it. Have fun!