diff --git a/Use-Case-Specification:-Add-New-Products.md b/Use-Case-Specification:-Add-New-Products.md new file mode 100644 index 0000000..89f0a1b --- /dev/null +++ b/Use-Case-Specification:-Add-New-Products.md @@ -0,0 +1,23 @@ +# Use-Case Specification: Add New Products +## 1. Use-Case: Add New Products +### 1.1 Brief Description +Users should be able to add new products to the page. This is done by enabling the user to enter an Amazon link of a product he wants to have crawled. + +## 2. Flow of Events +### Activity Diagram +![activity diagram](https://github.com/Mueller-Patrick/Betterzon/raw/master/doku/AC_AddProducts.png) + +After the user searched for a product and hasn't found what he was looking for, he is presented a button saying 'Add new product'. When he clicks the button, he is prompted to enter the Amazon link of the product he wants crawled. When he clicks 'Search', the crawling process is started in the background. When the link he provided is invalid of the product can't be found on Amazon, the user is presented an error message. Otherwise, he is prompted to reload the page a few seconds later. When the product details have been crawled successfully from Amazon, the crawler searches for the product at all known vendors and saves the details to SQL when the product can be found at a vendor. + + +## 3. Special Requirements +Existing products must not be added again. This can be done by checking the Amazon ASIN number. The crawling process for this specific use case also has to be very fast as the user expects to see the results relatively soon, meaning a few seconds after he entered the link. To avoid abuse of this function, it might be worth considering to limit this process to a few request per minute per IP address. + +## 4. Preconditions +### 4.1 The user has searched for a product and is currently on the search result page + +## 5. Postconditions +N/A + +## 6. Function Points +[tbd] \ No newline at end of file