Luke-Fanguna / FoodForLesser

0 stars 0 forks source link

Schema/API Design Comments (Andrew Ji) #39

Open DrewskiG123 opened 10 months ago

DrewskiG123 commented 10 months ago
  1. Your API Spec is a little hard to read and needs formatting.
  2. The API Spec says that making a new grocery list requires no input but it requires a user id in your code.
  3. Your Stores table doesn't have a column for address, which seems like an important aspect of your program since it uses location (within 10 mile radius). At the least maybe add a distance-from-user column or something similar.
  4. Your delete request probably shouldn't have "delete" in the URL, just make a delete request to the desired object's URL
  5. You should find a way to encourage users to post new prices if they are different from what's listed, so that the values stay up-to-date
  6. You should add more constraints to your table values, as many of them are nullable and that can cause issues
  7. You currently have no way to add a store to your list of stores without manually adding it to the backend database.
  8. You have no way to delete a store
  9. You have no way to delete a user
  10. The methods in stores.py should be GET requests instead of POST requests.
  11. You could save a lot of space over time if you swap inventory level from a string Enum to an int considering there are only 3 options and they are static. You could just check the num and still display "low", "med", or "high" without storing them as strings.
  12. I am unsure what will happen if a user adds an item that isn't sold at the stores, or finds an item and posts the price without it being originally listed. You should maybe add some logic that checks for grocery items that don't exist/duplicates.