Portfolio 2 Week 13: Firebase Storing Sprint 3
- Goh Qi Xun

- Jan 15, 2021
- 2 min read
After completing my News API, I started working on the back-end. I create the structure of the Firebase storage design so that everything can be stored properly and retrieve properly.
On the other side, Jun Wei completed his design for Get Essential, donation and his quiz page which he done during the holiday. Now is my turn to take over the work and put all the information into database for retrieving later.
Here is how the structure of the database looks like:
Donation
One of the challenge I faced here was trying to upload images to Firebase Storage. Although I've been doing Firebase for awhile, this always a challenge because every language and application did it differently. For Xcode, I need to store the images and generate the URL of the images uploaded before adding it into database. I wasn't able to get the images URL generated sometimes for some reason. All the donation will store the userid of the donator so that we can identify who donated and give points accordingly once verify and other stuff is completed.
Get Essential (Food Storage)

For Get Essential Page, it is very straight-forward and easy to understand. This database is managed by the administrators when they collected the item from the donator. Once quantity will be added accordingly when others donate, if quantity reaches 0, it will not be displayed on the user's Get Essential's page. Quantity will also decreases when someone else purchase it. Administrator can also add new products into it.
Quiz

When the user created an account, they will be preset with $300 allowance and 888 points. I did this it's because I want to allow the user (everyone) to try out this app as gaining points and allowance is hard to determine without knowing their monthly gross income and stuff. They will be prompt for their dietary habits, allergy and other stuffs which will be stored in the database. For further reason why we do this will be covered in the next Sprint.
Validation for everything is yet to be done and crashes might happen occasionally... We are trying to work on the functionality for now and validation at the end.







Comments