If anyone wants to do some changes or wants to see the working of the app, one has to do following things to build their own database -
- Create an account on Firebase - https://firebase.google.com/
- Click on 'GO TO CONSOLE' on top right corner.
- Create a new Project (Follow some youtube or any tutorial if you are doing first time or follow along with instructions given by Google). After all the steps,
- Add your json file into the project(that you've downloaded or forked).
- After creating the project successfully you'll find the page look like this-
Here are only three things you have to change or create for the whole project to run on your system i.e. Login/Sign-up Method, Cloud Firestore and Storage.
- For Login/Sign-up, go to 'Authentication' and enable sign-in methods. The two I have used are - Email/Password, Anonymous.
-
If you'll read all the db files properly you'll find the name of collections I have used in 'my' Firebase Database are 'foods' and 'users'.
-
Click on 'Start Collection' and named it 'users', see the "lib/model/user.dart" to see all the attributes of "users" collection. Write the first document for your testing purpose like this -
-
Do the same for "foods" Collection, repeat step 10.
-
For Storage(to store user profile and food blog's images), Go to "STORAGE". Click on create folder icon on right, create a folder of name "images" -
- Enjoye!!