Skip to content

Requirements Page

mtdang edited this page Nov 15, 2018 · 26 revisions

Requirements

Functional Requirements

REQUIREMENT ID REQUIREMENT DEFINITION
F1 The system shall allow users without an account to search for recipes
F2 The system shall allow users to create accounts
F3 The system shall allow users with an account to store preferences for their accounts
F4 The system shall allow users to search for recipes with custom filtering
F5 The system shall allow users with accounts to pin their favourite recipes
F6 The system shall allow users with accounts to rate recipes
F7 The system shall allow users with accounts to review recipes

Non-Functional Requirements

REQUIREMENT ID REQUIREMENT DEFINITION DESIGN ANALYSIS
NF1 The system shall store user account information in encrypted form We will be using b-crypt as well as salting
NF2 The system shall log user queries We will be using ELK (Elasticsearch, Logstash, Kibana)
NF3 The system shall have a 99.9% loading time with partial functionality of under 0.5 seconds with load of 100 users Keep API end points functionally modular and query caching on the front end side

Testable Definitions
The requirements will be tested using integration, UI, unit and performance testing. We will be using Mocha and Chai for unit and integration testing as well as artillery.io for load testing and Jest for UI testing.


Test Data

The following is an example of the data that we will be using to test and verify the system throughout the project lifecycle.

{
   email: "[email protected]",
   name: "user",
   password: "1234"
}

Critical Scenarios

Critical Scenario 1: Searching

Requirements that are addressed by Searching:

  1. The system shall allow users without an account to search for recipes
  2. The system shall allow users with an account to store preferences for their accounts
  3. The system shall allow users to search for recipes with custom filtering
  4. The system shall allow users with accounts to pin their favourite recipes

Actors it is relevant to Searching:

  • User with an account
  • User without an account

Preconditions: The user must have the application open.
Restrictions: The user must be connected to the internet.

Normal flow of interactions with the system:
Sign In if user has an account:

  1. The user fills in username field with their credentials
  2. The user fills in password field with their password
  3. The user clicks the Log In button
  4. The system checks if the credentials are correct
  5. The user will get signed into their account if the credentials are correct
  6. The system will give an error message on Sign In page if the credentials are incorrect

Search:

  1. The user navigates to the search tab
  2. The user types in the search bar and clicks Search button
  3. The system returns and displays results from the database that matches the user’s search

Exceptions that must be handled:

  • No search results when user is trying to search: There will be a doodle informing the user that there were no such results for what they are searching.

Example data:

[
   {
      "id":152211,
      "ingredients":[
         {
            "ingredientID":4544,
            "displayValue":"1 spaghetti squash, halved lengthwise and seeded",
            "grams":700.0,
            "displayType":"Normal"
         },
         {
            "ingredientID":3814,
            "displayValue":"1/4 cup toasted pine nuts",
            "grams":34.0,
            "displayType":"Normal"
         }...
      ],
      "title":"Spaghetti Squash with Pine Nuts, Sage, and Romano",
      "nutrition":{
         "calories":{
            "name":"Calories",
            "amount":150.2581,
            "unit":"kcal",
            "displayValue":"150",
            "percentDailyValue":"8",
            "hasCompleteData":true
         },
         "fat":{...},
         "cholesterol":{...},
         "sodium":{...},
         "carbohydrates":{...},
         "protein":{...},
         "folate":{...},
         "magnesium":{...}...
      },
      "servings":4,
      "prepMinutes":10,
      "cookMinutes":50,
      "readyMinutes":0
   } ...
]

When searching for a recipe, based on what the user searches for, the above excerpt is the data that will be parsed to return the most accurate results for what the user is searching for.


Critical Scenario 2: Meal Planning

Requirements that are addressed by Meal Planning:

  1. The system shall allow users to create accounts
  2. The system shall allow users with an account to store preferences for their accounts
  3. The system shall allow users with accounts to rate recipes

Actors it is relevant to Meal Planning:

  • User with an account

Preconditions: The user must have an account in the system
Restrictions: The user cannot use this feature without an account and the user must be connected to the internet

Normal flow of interactions with the system:
Sign In:

  1. The user fills in username field with their credentials
  2. The user fills in password field with their password
  3. The user clicks the Log In button
  4. The system checks if the credentials are correct
  5. The user will get signed into their account if the credentials are correct
  6. The system will give an error message on Sign In page if the credentials are incorrect

Change Account Settings:

  1. The user navigates to the profile tab
  2. The user navigates to the preferences page
  3. The user changes the fields they desire to change (dietary restrictions, weight, height, physical activity level, weight goal, meals/day, macros, etc.)
  4. The user clicks the Save button
  5. The system saves the changes and displays a verification message

Meal Planning:

  1. The user will input the amount of calories they want to intake daily (or a number is preset based on their weight goals provided in account preferences)
  2. The user will input the amount of meals they would like to make per day (x)
  3. The system recommends x amount of meals that the user can choose from, all within the caloric intake amount

Exceptions that must be handled:

  • The user puts in daily caloric intake that is too restrictive where the system will not be able to recommend any meals: There will be a message informing user that they must change the caloric intake amount.
  • Dietary restrictions are too restrictive: When recommending recipes or when the user selects a recipe, a warning that an ingredient in their restrictions list is in the listed ingredients.
Clone this wiki locally