birbmaaan / split-pies

aA Full Stack Project: Splitwise Clone
2 stars 0 forks source link

FSP To-Do List #1

Open mwmadsen67 opened 4 years ago

mwmadsen67 commented 4 years ago

Wiki Page Home


Database Schema


Sample State


MVP List


Backend Routes


Frontend Routes

mwmadsen67 commented 4 years ago

Hi Elijah, your docs look really great so far, and the formatting is on point.

Schema: The only thing that you're missing is a way of keeping track of friends. It should be a joins table between users, but also think about how you would need to implement friend requests and how thats represented in your backend.

State shape: You will need to add a friends slice of state, and think about if you'd like associated information in there as well. For example you may want an array of commentIds in your bills slice of state. Otherwise looks on point.

MVP-List: Looks great, not much to say here.

Again great start and happy to answer any questions you may have on the friends table implementation or whatever else it may be.

birbmaaan commented 4 years ago

Hey Mike! Thanks for the feedback. I went ahead and implemented your suggestions. Added a friends table into the schema and a friends slice of state into the state shape. Also added my routes, although I'm not entirely sure they're exactly what they should be.

mwmadsen67 commented 4 years ago

Awesome. You will likely want a unique constraint on the combination of user_id and friend_id to keep people from refriending each other.

Backend Routes: You will probably want post and delete routes for friending. For groups, you probably don't need to nest any of those routes under users. Since you'll have access to current_user, you should be able to return the correct groups using the current_user id. Some of your bills routes still say chirps. Also, do you want to be able to delete comments?

Frontend Routes: Your frontend routes look good.

Anyways, looks great Elijah!

birbmaaan commented 4 years ago

Ah! Chirps! How embarrassing.

I took your advice and unnested group backend routes. Also added a shared index for user_id and friend_id in the friends table (not entirely sure if my formatting is correct there). I decided to not include the ability to delete comments since they are associated with a single bill and operate as a sort of transaction history between users.

Again, thanks for the input! Much appreciated.