Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Firestore backend DB #4

Merged
merged 17 commits into from
Oct 27, 2023
Merged

Add Firestore backend DB #4

merged 17 commits into from
Oct 27, 2023

Conversation

ethanl21
Copy link
Owner

@ethanl21 ethanl21 commented Oct 25, 2023

I'm working on the back-end implementation for our website. I'll be working on the following:

  • "Add New Item" React component
  • Storing all the items that can be rated (name, description, image, avg rating)
  • Storing a user's ratings (id of item, rating value)

Since our site's frontend is still pretty minimal, I put the component I made on the front page under the authentication component I made so I can see how it looks. If the home page gets implemented while I'm still working on this branch, I'll delete what I changed.

Add firestore export
we need this to actually add stuff to the backend
@ethanl21 ethanl21 self-assigned this Oct 25, 2023
@ethanl21
Copy link
Owner Author

@ethanl21
Copy link
Owner Author

Add New Item Component

@github-actions
Copy link

github-actions bot commented Oct 25, 2023

Visit the preview URL for this PR (updated for commit e0dd7d6):

https://retroratings--pr4-firestore-db-18l43fjs.web.app

(expires Fri, 03 Nov 2023 22:43:27 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 8c8029c398d88e68d291880754a7579347647b27

@ethanl21
Copy link
Owner Author

I'm still working on this. I figured out how to allow users to upload images to Firebase Storage and I added functionality to the AddNewItemCard component that I made (items uploaded using the card will be added to the database, only if the user is logged in)

I'm still working on implementing functions to read from the database and to add a rating to an item. Since I have a better understanding of Firestore now, it shouldn't take me too long.

Implement adding ratings
implement get items that can be rated
Update documentation
Implement getting a user's ratings from the database
Document back-end api details
@ethanl21
Copy link
Owner Author

ethanl21 commented Oct 27, 2023

I'm very close to finishing this, all I have left are a few things:

  • Allow users to update ratings
  • Allow users to delete ratings
  • Update average rating when users create, update, or delete a rating

@ethanl21 ethanl21 marked this pull request as ready for review October 27, 2023 22:39
@jose-gonzalez1 jose-gonzalez1 merged commit 250a46c into main Oct 27, 2023
2 checks passed
@ethanl21 ethanl21 deleted the firestore-db branch October 28, 2023 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants