Commit 6502d8c5 authored by Mohammed Ahmed's avatar Mohammed Ahmed
Browse files

Updated README

parent 8b1e8144
......@@ -9,28 +9,51 @@ This application we have created allows users to monitor the food intake. Users
4.Requirement 4 Login, test with the username you registered in requirement 3-Complete:(/views/login.html):This contains the login HTML content. When the form is filled, it checks the main.js and sees if we have a user called user1.
5.Requirement 5 Add food page-Complete:(/views/addfood.html):Html page whch has a form. When a logged in users adds food, it is stored into the ingridients database
5.Requirement 5 Add food page-Complete:(/views/addfood.html/Line:..):Html page whch has a form. When a logged in users adds food, it is stored into the ingridients database
6.Requirement 8 List page-Complete:(/views/list.html):This page list all food added to the ingridients database;
7.Requirement 11 database back-end, check list page, can you see recently added (or updated or deleted) food in the list page?-Complete:(/views/updatefood.html):this page includes two form which adds and removes and updated food from the daatabase;
8.Requirement 6 Update food page, test with the recipe you added in requirement 5, check list page and remark requirement 11 if necessary-Complete:(/views/updatefood.html):This HTML page can be found in the views folder. This page updates food. Code to updating can be found in main.js "app.post(updatefood)"
8.Requirement 6 Update food page, test with the recipe you added in requirement 5, check list page and remark requirement 11 if necessary-Complete:(/views/updatefood.html/routes/main.js/Line 110):This HTML page can be found in the views folder. This page updates food. Code to updating can be found in main.js "app.post(updatefood)"
9.Requirement 7 Delete food page, test with the recipe you added in requirement 5, check list page and remark requirement 11 if necessary-Complete:(/views/updatefood.html):HTML page used to delte food. This is also linked to the update food form which is called when the user deletes food using the form
9.Requirement 7 Delete food page, test with the recipe you added in requirement 5, check list page and remark requirement 11 if necessary-Complete:(/views/updatefood.html or /routes/main.js/line:107):HTML page used to delte food. This is also linked to the update food form which is called when the user deletes food using the form
10.Requirement 9 form-validation, such as checking email address or length of password or username-Complete:(/routes/main.js):This can be found in the main.js. All forms have a "IsEmpty()" validation,IsLength() and isEmail() when Email is needed.
10.Requirement 9 form-validation, such as checking email address or length of password or username-Complete:(/routes/main.js/Lines 41,79,112,157,188,219,254,294):This can be found in the main.js. All forms have a "IsEmpty()" validation,IsLength() and isEmail() when Email is needed.
11.Requirement 10 suitable feedback messages to user when an operation is successful or unsuccessful-Complete:(/routes/main.js):Found in the main.js, All submission will include a output message to user display operation result.
11.Requirement 10 suitable feedback messages to user when an operation is successful or unsuccessful-Complete:(/routes/main.js,Line 95,138,175,203,241,278):Found in the main.js, All submission will include a output message to user display operation result.
12.Requirement 13 sessions, access control add, update and food pages are available only to logged-in users-Complete:(/routes/main.js)
12.Requirement 13 sessions, access control add, update and food pages are available only to logged-in users-Complete:(/routes/main.js/Line 107)
13.Requirement 14 hashed password, check code in main.js file, search for 'bcrypt' and see if hashed password is saved in registered route in the database (insertOne function)-Complete:(/routes/main.js)
13.Requirement 14 hashed password, check code in main.js file, search for 'bcrypt' and see if hashed password is saved in registered route in the database (insertOne function)-Complete:(/routes/main.js/Line 250)
14.Requirement 15 Logout-Complete:(/routes/main.js)&&:(/views/logout.html):Logout can be found in views.html aswell as main.js
14.Requirement 15 Logout-Complete:(/routes/main.js/Line 290)&&:(/views/logout.html):Logout can be found in views.html aswell as main.js
15.Requirement 16 api-Complete:(/routes/main.js);2 API's including the weather and food API
15.Requirement 16 api-Complete:(/routes/main.js/Line 399);2 API's including the weather and food API
16.Requirement 17 link all pages to home page-Complete:All pages are linked by having navigation
16.Requirement 17 link all pages to home page-Complete(Line 3-5 on All pages(views Folder)):All pages are linked by having navigation
DATA MODEL FOR LISTUSERS:
This database contains all the information related to the user. When a user register, information after vaidation will be inputted into the corosponding fields. Each entity wil have its on primary key field,firstname fields,lastname ect. When a user logs in user information which has already been added to listuserdb, main.js .... will check if information is valid to proceed.
listuserdb:
PK-ID
firstname-name
surname-name
adress-Home Address
phone Number-int
Hashed Password;
DATA MODEL FOR INGRIDIENTS:
This database contains all informtaion regrading ingridients, when a user is logged in, users are able to add food using /addfood routes and submit the information . There are also validation to insure valid information is added forinstance, name requires to be text format and not integer. Fields are also required to have data entry and cannot be left blank.
FK-ID
PK-Ingridient name
value-VAlue per kg
Carbs-carbs of item
Protein-Protein in item
salt-salt in item
sugar-sugar in item
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment