Skip to content

Latest commit

 

History

History
97 lines (62 loc) · 4.3 KB

PROJECT_OUTLINE.md

File metadata and controls

97 lines (62 loc) · 4.3 KB

Midterm_project

Oct26th Lighthouse Labs Midterm project

User story

  1. As a user, i can browse the restaurants menu, because i'm a hungry and want food quickly;

  2. As a user, i can choose whether i will have my food delivered (stretch or option to pick it up at the restaurant)

  3. As a user, i can select from a list of food items because i want to group my items into one order;

4)As a user, i can select quantity of the food item to add to my order because i may want more/less of an item;

5)As a user, i can see my combined order and cost because i want to know what ive chosen before i submit my order and how much it will cost;

6)As a user, i can edit my order to change/add/remove items because i may change my mind;

7)As a user, i can add my address information and phone number to my order because i want the delivered food to get to me AND i want to know when it is on its way;

8)(stretch As a user, i can add my name and phone# to my order because i want to pickup my order and be notified when its ready);

  1. As a user i can select my payment method upon delivery (cash, debit, CC);

9-A) As a user, i CANT submit my order without my payment information and contact info;

  1. As a user i can then submit my order because i have completed my order, and will be notified that my order is submitted;

10-A) As a user i CANT submit an empty order because the restaurant wants to feed me!;

  1. (stretch As a user, i can cancel my order after it has been submitted, because i changed my mind, and i am notified on screen that my order is cancelled);

  2. As a user, i will be notified via SMS that my order was recieved by the restaurant and it is being prepared because i want to be kept updated on the status of my order;

  3. As a user, i will be notified via SMS that my order is ready and is on its way to me, because i want to know when it will be arriving;

  4. (stretch As a user, i can view my previous orders, and repeat that order i want to, because it is convenient and im a busy busy web dev with poor memory);

  5. As a user, my order cart will be emptied upon submition because my order was submitted;

stretch have stock amount for items

Typical User Scenarios

  • => GET Route : /login/:id to assign a cookie to req.session.user_id

  • Renders home.ejs

  • App main page loads which includes app name, create order, logout.

    • User hits Create order button, which takes them to the menu page.
  • app.use(/menu, menuRoutes)

  • => GET Route : "/"

  • User is shown a list of items with pictures, item description, price, quantity, and an "add to order button"

  • User can then choose quantity of the food item, and when satisfied, hit the add to order button

  • app.use(/order, orderRoutes)

  • => POST Route : "/:id/:food_id/:quantity"

  • This will need to also query the db to INSERT the data into their order record

  • User can view/edit order by clicking on "my order" button in nav

  • app.use(/order, orderRoutes)

  • => GET Route : "/:id"

  • User can edit their order before submitting:

  • => if they choose delete an item

  • app.use(/order, orderRoutes)

  • => DELETE Route : "/:id/:food_id/delete"

  • This will need to also query the db to DELETE the data in their order record

  • => if they choose to change the quantity, prompt user with a pop-up for new quantity, then submit to update table

  • app.use(/order, orderRoutes)

  • => PUT Route : "/:id/:food_id/:quantity/" This will need to to also query the db to INSERT the data in their order record

  • => This will then follow with a REDIRECT back to the order page:

  • app.use(/order, orderRoutes)

  • => GET Route : "/:id"

  • => If satisfied, choose checkout

  • app.use(/checkout, checkoutRoutes)

  • => GET Route : "/"

  • Since user is logged in, info is prepopulated already, and they can simply confirm their personal info & phone number

  • When ready, user can hit "submit order" button.

  • app.use(/checkout, checkoutRoutes)

  • => POST Route : "/submit"

  • => sends off order VIA SMS to "restaurant"

  • => restaurant responds with boolean that it received order.

  • REDIRECT

  • app.use(/checkout, checkoutRoutes)

  • => GET route : "/confirmation"

  • displays page with message that order was received, with time for pickup created via function utilizing a Date.now() + a randomized amount of time generated by a function. This time will also be then sent to the user via SMS.