Nutricipe
Purpose: Provide a meal planning tool based on individual needs, preferences, and nutritional goals
Specify how it will be used and/or who the intended user community is:
Website
Create profile
Meal builder
Daily caloric intake
Food variety report
Recipe search
Meal builder
Shopping list
Food tracker
Goal tracker
Customers
Health clubs
Explain at a very high level what the product will do and what it won't do
Will do
Provide basic authentication (username and password)
Allow Nutricipe customers to create profiles
Satisfy needs of customers who do not require special diets
Satisfy needs of customers who require special diets
Recommend nutritional guidelines
Recommend a variety of foods
Offer healthy recipes
Meal builder
Provide shopping list based on customized meals
Food tracking to meet long term goals
Goal tracking
Provide Nutricipe users satisfaction survey reports
Will not do
Check the accuracy of inputted customer information
Treat diseases
Treat health issues (will try to maintain them )
Provide food combining guidelines
Be marketed as a weight loss solution
1
Test what customer learned from the produced reports
Guarantee the amount of calories in prepared meals
Guarantee nutritional information (3 rd party recipes)
Control serving size
<Note: this should be an encapsulation of the Product Description from Lab I>
Describe the application of the product, i.e., its objectives, relative benefits, and goals.
Describe, at a high level, the prototype you will use to demonstrate the product.
Include RWP and prototype comparison tables and report table (7 Tables):
Table 1.
Profile Comparison Between Real Product and Prototype
Table 2 . Database Comparison Between Real Product and Prototype
Table 3.
Algorithm Comparison Between Real Product and Prototype
Table 4.
User Access Comparison Between Real Product and Prototype
Table 5 . Additional Features Comparison Between Real Product and Prototype
Table 6.
Nutricipe Prototype Reports
<Note: This should be an encapsulation of the Prototype Description from Lab I>
See glossary posted on Google Wave (you can add it, if you need to)
See references posted on Google Wave (you can add it if you need to)
Describe what the rest of the Product Specification contains.
2
Prototype MFCD
Apache web server through the ODU CS Department
MySQL database on the ODU CS Department MySQL server
Nutricipe algorithms o PHP o MySQL queries
Website o o o o o o o
User Interface
Admin Interface
PHP
MySQL queries
HTML
CSS
JavaScript
Figure 1.
Prototype Major Functional Component Diagram
Nutricipe website
3
User types and privileges
Figure 2.
Prototype User Privileges
4
Nutricipe customers o Nutricipe process flow
Figure 3.
Nutricipe Process Flow
5
o Daily caloric needs process flow
Figure 4.
Daily Caloric Needs Process Flow
6
o Food variety process flow
Figure 5.
Food Variety Process Flow
7
o Recipe search process flow
Figure 6.
Recipe Search Process Flow
8
o Meal builder process flow
Figure 7.
Meal Builder Process Flow o Meal components
9
Figure 8 . Meal Component Diagram
2.3.1 Hardware Interfaces
No hardware interfaces are used
2.3.2 Software Interfaces
Nutricipe Database Interface (Nutricipe Database is the MySQL database accessed via SQL query)
PHP web pages
2.3.3 User Interfaces
Nutricipe website o Clean URLs o Object-oriented session & form handling
10
o jQuery, jQUI, Themeroller, and Tablesorter
User-selectable themes
Improved layout/functionality
Nutricipe site map o Authentication “unlocks” profile and meal planning pages
Figure 9 . Nutricipe Site Map
2.3.4 Communications Protocols and Interfaces
TCP/IP
HTTP
3.1.1 Database (Erik)
3.1.1.1
Database schema
Two basic divisions: USDA National Nutrient Database, and Nutricipe DB.
USDA includes information on ingredients and their nutritional value
Nutricipe Database tracks: user information, goals, likes/dislikes, recipes, user history, nutritional information.
USDA National Nutrient Database schema:
11
Nutricipe database schema:
12
3.1.1.2
Import data
Can import information from other databases directly.
13
In cases where text information only is available for recipes will write a text parser to extract the following info: o Recipe name o Ingredients list with quantities o Cooking directions
As recipes are added nutritional information (nut_facts table) will need to be populated.
3.1.2 Algorithms
3.1.2.1
Calorie Needs Algorithm (Olga)
Description
1.
The purpose of the calorie needs algorithm is to determine the daily calorie intake for the user
Provide flow chart
14
Figure 9.
Calorie needs algorithm flow chart
Functional requirements
1.
Must obtain the user profile identification from the GUI
2.
Must retrieve the user’s age, gender, and activity level from the database for the user with the provided user profile identification
15
3.
Must verify if the user’s age, gender, and activity level are valid
4.
If the user’s age, gender, and activity level are not valid, must issue an error
5.
If the user’s age, gender, and activity level are valid, must retrieve the calorie needs value from the database that corresponds to the determined user’s age, gender, and activity level
6.
Must provide the calorie needs variable to the GUI
7.
Must store the calorie needs variable into the database for the user with the provided user profile identification
3.1.2.2
Food Variety Algorithm (Erik)
Description:
1.
Create a report showing recommended amounts of basic foods (dairy, grains etc...the "Food Pyramid").
2.
Create a list of ingredients that meets the user's nutritional goals.
Functional requirements:
1.
Needs user_id from the gui
2.
Needs user_health_stats table to provide things like age, gender, weight and activity level
3.
Needs to acquire the users goals (such as lowering cholesterol)
4.
Searchs the ingredients (in the FOOD_DES table) that meet user goals.
16
3.1.2.3
Nutritional Content Calculator (Cole)
Description
Provide flow chart
Functional requirements
3.1.2.4
Recipe Selection Algorithm (Adam)
Description
Provide flow chart (almost ready, need to modify a little)
Functional requirements
3.1.2.5
Shopping List Generator (Olga)
Description
1.
The purpose of the shopping list generator is to determine what food items should be included in the shopping list for the customized meal
Provide flow chart
17
Figure 12.
Shopping list generator flow chart
18
Functional requirements
1.
Must obtain the meal identification from the GUI
2.
Must obtain the user identification from the GUI
3.
Must retrieve all the ingredients from the database for the meal with the provided meal identification
4.
Must retrieve all the ingredients from the database for every recipe that the meal with the provided meal identification consists of
5.
Must check if the retrieved ingredients are not listed among user’s available ingredients to insure their uniqueness
6.
Must check if the retrieved ingredients are not duplicated to insure their uniqueness
7.
Must combine only unique retrieved ingredients
8.
Must provide the combined ingredients and their descriptions to the GUI
3.1.2.6
Food Tracking Algorithm (Erik)
Description: Keeps a history of selected meals for tracking nutritional intake.
19
Functional requirements:
1.
Needs the user_profile_id from the gui.
2.
Accesses history table for list of meals selected along with time selected.
3.
Accesses event table for name of meal selected.
3.1.2.7
Goal Tracking Algorithm (Adam)
Description
Provide flow chart
Functional requirements
20
3.1.3 GUI Interfaces
3.1.3.1
“About us” page (Mark)
Description
Provide GUI
What functional capabilities shall be provided as part of this algorithm
3.1.3.2
“Contact us” page (Mark)
Description
Provide GUI
What functional capabilities shall be provided as part of this algorithm
3.1.3.3
User Registration (Ben)
Description
Provide GUI
Functional Requirements:
1.
Must allow a non-authenticated user make an account
2.
Must allow only one account per user
3.
Must take input from registration page and output to the user_profile table in the database
4.
Must run checks that ensure the user provided valid email/username/password
3.1.3.4
Account Maintenance (Ben)
Need to be included if registered users can change their accounts (for example, password)
Description
Provide GUI
21
Functional Requirements:
1.
Must require an account to be registered by the user before accessing a profile
2.
Must require a user to be authenticated by the system before accessing a profile
3.
Must not allow a user to edit another account other than their own
4.
Must allow a user to edit only their own account
3.1.3.5
User Authentication (Ben)
Description
Functional Requirements:
1.
Must require user to submit their username and password
2.
Must send data to web server
3.
Must retrieve user registration data (username and password) from the database
4.
Must compare the login data with the account data acquired from the database
5.
If the provided username and password are the same in the user’s account, must allow user access/authentication
6.
If the provided username and password do not match, output an error message to the user and deny access
7.
Must assign user-levels to different groups (i.e., users, healthclubs, admins)
3.1.3.6
Administrative Interface (Orsasha)
Description
Provide GUI
22
What functional capabilities shall be provided as part of this algorithm
3.1.3.7
Profile Set up and Maintenance (Ben)
Describe Nutricipe user profile
Describe pantry builder
Provide GUI
Functional Requirements:
1.
Must require user to fill out fields on a form
2.
Must take all data and write it to suitable tables in the database
3.
Must allow user to edit his/her age
4.
Must allow user to edit his/her gender
5.
Must allow user to edit his/her activity level
6.
Must allow user to edit his/her goals
7.
Must allow user to edit his/her ingredients-on-hand (pantry)
3.1.3.8
Daily Caloric Needs Display (John)
A GUI will that will show what the daily caloric needs are for a user.
Provide GUI
Functional Requirements
1.
Must show the calorie needs of the user logged in
2.
Must use the Calorie Needs Algorithm
3.1.3.9
Food Variety Display (John)
The food variety reports shows user which foods they should be eating based off their user profile. It must display how much of these foods should be ate, and which foods they can eat to achieve this.
Recommended foods description
Provide GUI
Functional Requirements
1.
Must use the Food Variety Algorithm
2.
Must display which and how much food they should eat
3.
Must give recommendations on what foods to eat for each food group
4.
Must allow user to add items to shopping list
3.1.3.10
Recipe Search Prompt (John)
The recipe search prompt allows user to search the recipe database.
Provide GUI
Functional Requirements
1.
Must use the Recipe Selection Algorithm
2.
Must have a form with a text box and two submit buttons
3.
Must have a submit button that searches for recipes based off the user profile
4.
Must have a submit button that searches for recipes using search term
23
3.1.3.11
Recipe Search Report Display (John)
Description
Functional Requirements
1.
Must display recipes returned by the Recipe Selection Algorithm
2.
Must show recipe picture, name, prep time, and short description of returned recipes
3.
Must allow user to click on the recipe to display the Detailed Recipe
Display
4.
Must allow user to add recipes to meal
5.
Must display an error message if no results are returned
6.
Should have paged results with only 10 recipes per page
7.
Should display nutritional information about the recipe
24
3.1.3.12
Description
Provide GUI
Functional Requirements
1.
Must show the recipe name, ingredients, preparation time, instructions, and nutritional value
2.
Must allow users to add recipe to meal
3.1.3.13
Nutritional Values and Percentage of Daily Goals of Selected Meal
Components Display (John)
Description
Provide GUI
Functional Requirements
1.
Must show nutritional value and percentage of daily goals of the recipes in the user’s current meal
2.
Must have a link for users to insert this meal into their meal history, and must insert meal into meal history
3.
Should provide users with a link to Detailed Recipe Display for printing
3.1.3.14
Meal Builder Display (John)
Description
Functional Requirements
25
1.
Must show recipe name and picture of recipes currently in the user’s meal
2.
Must include Recipe Search Prompt to add recipes
3.
Must display a message if meal is currently empty
4.
Must have a link to Nutritional Values and Percentage of Daily Goals of
5.
Selected Meal Components Display
Meal builder with recipes
Meal builder without recipes
3.1.3.15
Shopping List Display (Olga)
Description
1.
The purpose of the shopping list display is to allow the user to request the shopping list for the customized meal and to view its content
26
Provide screen
Screen to request the shopping list to be generated:
Screen to output the requested shopping list:
What functional capabilities shall be provided as part of this algorithm
1.
Must display the option for the user to request a shopping list
2.
Must call the Shopping List Generator to create a shopping list content when the user requests a shopping list
1.
Must pass the user profile identification and the meal identification to the Shopping List Generator
2.
Must accept the list of ingredients and their food groups descriptions from the Shopping List Generator
3.
Must display the shopping list content to the user when requested
27
3.1.3.16
User Meal History Display (Erik)
Description
Provide GUI
What functional capabilities shall be provided as part of this algorithm
3.1.3.17
User Goal Achievement Display (Adam)
Description
Provide GUI
What functional capabilities shall be provided as part of this algorithm
3.1.3.18
User Satisfaction Survey Prompt (Mark)
Description
Provide GUI
What functional capabilities shall be provided as part of this algorithm
3.1.3.19
User Satisfaction Survey Report (Mark)
Description
Provide GUI
What functional capabilities shall be provided as part of this algorithm
3.2.1 Database read/write speed
No longer than 5 seconds
3.2.2 Accounts access
No longer than 5 seconds
3.2.3 Web serving speed
No longer than 7 seconds
3.2.4 Algorithm output speed
No longer than 7 seconds
28
Describe any assumptions that have been made and that would affect the requirements if they turned out to be false. An example assumption is that a specific piece of hardware will be available before the product goes into testing.
Describe any dependencies or constraints that exist. A dependency may be that a specific subsystem, hardware, or software component exists. A constraint may be that data transfer that would normally be performed via a secure network is conducted by simulating the exchange for purposes of demonstrating the prototype.
This table is very long, so make sure you follow the format that Michael and Mrs.
Brunelle explained during the class***
Condition
One particular health club is selected as a primary customer
All Nutricipe users belong to the selected health club
The speed of a user’s Internet connection can vary widely
The Nutricipe prototype will not have user scaling issues
The domain name provided in an authentication request is valid
All meals that users consume are created within the Nutricipe system
If Nutricipe users have available ingredients, they have enough to make any recipe
When Nutricipe users indicate their likes and dislikes, they definitely like some foods that are good for them
Type Effects on Requirements
Assumption Individual web page response time will not be tested
Assumption The Nutricipe prototype will only be tested with a minimal number of registered users
Assumption Allows for minimal error checking for the purposes of developing and demonstrating the prototype
Assumption Allows for simplified report process
Assumption User’s payment information will not be verified. Access to
Nutricipe is obtained through the membership
Assumption Nutricipe users’ goal achievement report is produced by Nutricipe for the selected health club. This report will prove that Nutricipe helps people to achieve their nutritional goals. In order to produce that report, every user will be asked if he is meeting his individual goals after consuming
Nutricipe customized meals
Assumption Recipe search does not take into account the quantity of ingredients on hand
Assumption Allows for minimal error checking for the purpose of developing and demonstrating the prototype
29
When new recipe is added to the recipe database, that recipe only consists of ingredients from the
USDA National Nutrient Database
Nutricipe user follows the recipe instructions and monitors the portions on its own
Nutricipe does not provide cooking instructions for already prepared ingredients. Nutricipe user follows the preparation instructions that those ingredients offer
Before any recipe is stored to the
Nutricipe database, it is modified by the company that provided that recipe according to the Nutricipe database requirements
Data transfer that would normally be performed via an encrypted connection will be done in plain text
Only two nutritional goals are included in the prototype
Assumption Allows for minimal error checking and avoidance of adding new ingredients to the Nutricipe database
Assumption The prototype is only responsible for providing reports to the customers
Assumption The prototype only provides cooking instructions for the selected recipes
Constraint Allows for minimal error checking and easy database data loading since recipe data is presented in the suitable form
Constraint Simplifies the tasks of monitoring and demonstration
Nutricipe user profile will not include customer’s family history and diseases
Constraint While full product will have a variety of different nutritional goals, in the prototype Nutricipe customers will only be able to select their nutritional goals from the two offered choices
Constraint While full product will have fully customizable reports, the prototype will only generate reports based on user personal information, preferences, and nutritional goals
Dependency The prototype cannot be demonstrated without Internet
An Internet connection is available at the time of demonstration
ODU servers will be available to host Nutricipe components, and the necessary software can be installed
USDA nutrient database is freely available at any time
Dependency If this is not the case, personal hardware would need to be utilized or purchased
Dependency If this is not the case, the updated
USDA nutrient database would need to be purchased to incorporate most recent nutritional changes and additions
30
Table 6 . Effects of Assumptions, Dependencies, and Constraints on Requirements
3.4.1 Security
Access control
Authentication
Administration
3.4.2 Maintainability
Administrator
Database is manually populated for prototype
Web page elements automatically built where possible
3.4.3 Reliability
Access at all times
Disclaimer
Generate algorithms reports accurately and consistently
31