all the text must be lowercase
- hawaiian
- chicken fajita
- cheese mania
- pepperoni feast
- custom
- small
- medium
- large
- hand-tossed
- thin crust
- deep dish
- Any item can be
- The screenshots contains the home, orders and stats page
can be view in /client/my-app/Assets folder
- You can see how this app works dynamically
- These are all available endpoint
1. https://pml-pizza-test.herokuapp.com/api/v1/orders/topping-stats
- return the aggregation stats for most used topping
2. https://pml-pizza-test.herokuapp.com/api/v1/orders/get-orders
- return All order made
3. https://pml-pizza-test.herokuapp.com/api/v1/orders/create-order
- End point for Saving the order in database
Note:
- These endpoint are all available to everybody, no matter what port they
are using,
- Clone the repo
- Go to /client/my-app
- npm install
- npm start (start the app)
1. Save every order in a database so that it can be reviewed later. (DONE);
2. Save every toppings and give a sum of every topping used (DONE)
- You can view on stats page (Where behind the scene there's aggregation
pipiline that count how many topping were mostly used)
3. Validate that the passed PML is a valid PML (DONE)
- If you put wrong syntac of PML, for example you remove curly braces, remove white space, or remove the end element.
- It will displa "INVALID PML"
4. Have a filter to search for all orders by Size, Crust, Type and/or Number of Toppings
- You can filter all the orders that are returning by adding query parameter
- take note, you add one size || one crust || one type query parameter
OR you can combine size, type || type, crust || size, crust query parameter
OR all of them, see example below.
- https://pml-pizza-test.herokuapp.com/api/v1/orders/get-orders?type=hawaiian&size=small&crust=thin crust
# Sample Input
{order number="24"} {pizza number="1"} {size}large{\size} {crust}hand-tossed{\crust} {type}custom{\type} {toppings area="0"} {item}pepperoni{\item} {item}extra cheese{\item} {\toppings} {toppings area="1"} {item}sausage{\item} {\toppings} {toppings area="2"} {item}mushrooms{\item} {\toppings} {\pizza} {pizza number="2"} {size}medium{\size} {crust}deep dish{\crust} {type}pepperoni feast{\type} {\pizza} {\order}