You are on page 1of 88

AI PERSONAL NUTRITIONIST

Muhammad Ashhar
Muhammad Sufian
Nauman Rasheed

Supervised By
Engr Muhammad Umer Haroon

Submitted for the partial fulfillment of BS Software Engineering degree to


the Faculty of Engineering & Computer Science

NATIONAL UNIVERSITY OF MODERN LANGUAGES


ISLAMABAD

OCTOBER, 2022
ABSTRACT

In the era of the 21st century, the world is progressing with every passing day. The world has
seen a revolution in the form of technology over the years. As humans around the world are
interested in measuring their weight, eating more healthy meals, and keeping off junk foods,
a system that could measure energy and nutrition in everyday food may be very useful for
keeping our fitness. Food calorie and nutrition measurement systems may be very beneficial
for dietitians and users to measure and control their day-by-day food consumption.

The developed AI-based nutritionist will help the users maintain their diet without the need to
visit a nutritionist or a dietitian. A dietitian consults a person based on his/her schedule, body
type, height, and weight. The system asks for this data from the user and processes it. It asks
about how many hours the user works, his/her height, weight, and age. The system stores and
processes this data and then calculates the nutrient value needed to fill up the user’s needs.
The system can act as your personal nutritionist while nutritionists can also get a lot of
information by using this system. The user can get details about several nutrients, and
vitamins of a fruit or vegetable. The system helps the user choose what to eat and what is
good and what will help him.

The system was tested by one of our team members and it helped him in managing his daily
diet and losing weight using the daily meal plan generated by the system.

I
CERTIFICATE
Dated: _____________

Final Approval

It is certified that project proposal titled ‘AI PERSONAL NUTRITIONIST’ submitted by


Muhammad Ashhar, Muhammad Sufian and Nauman Rasheed for the partial fulfillment
of the requirement of “Bachelor’s Degree in Software Engineering” is approved.

COMMITTEE

Dr. Basit Shahzad


Dean Engineering & CS Signature: _______________

Dr. Muzafar Khan


HoD Software Engineering Signature: _______________

Mr.Naveed Ahmed
Head Project Committee Signature: _______________

Engr Muhammad Umer Haroon

Project Supervisor Signature: __________

I
DECLARATION

We hereby declare that our dissertation is entirely our work and genuine / original. We
understand that in case of discovery of any PLAGIARISM at any stage, our group will be
assigned an F (FAIL) grade and it may result in withdrawal of our Bachelor’s degree.

Group Members Signature

1. Muhammad Ashhar ____________________

2. Muhammad Sufian ___________________

3. Nauman Rasheed ___________________

1
UNDERTAKING

We hereby undertake that we are marking this group for our final year project by our own choice. We
entirely must complete this project in time. In case of failure or underperforming, neither the
university nor the supervisor will be held responsible for unsatisfactory performance.

Group Members Signature

1. Muhammad Ashhar ____________________

2. Muhammad Sufian ____________________

3. Nauman Rasheed ____________________

1
TABLE OF CONTENTS
Chapter
Page
Chapter 1: Introduction...........................................................................................................1
1.1 Introduction..................................................................................................................2
1.2 Motivation...................................................................................................................2
1.3 Problem Description....................................................................................................2
1.4 Personal Nutritionist....................................................................................................2
1.5 Goals and Objectives...................................................................................................3
1.6 System Features...........................................................................................................3
1.6.1 Registration..................................................................................................................3
1.6.2 Diet Plan......................................................................................................................3
1.6.3 Diet Plan Guide............................................................................................................3
1.6.4 Weight Graph...............................................................................................................3
1.6.5 Integrity of Data...........................................................................................................3
1.7 Scope...........................................................................................................................3
1.8 Process Model.............................................................................................................4
1.9 Nature of the Project....................................................................................................4
1.9.1 Android Studio.............................................................................................................4
1.9.2 Flutter Framework.......................................................................................................4
1.9.3 Firebase........................................................................................................................4
1.9.4 Python..........................................................................................................................4
1.10 Overview of the Report...............................................................................................4
Chapter 2: Background and Existing Work..........................................................................5
2 Introduction.................................................................................................................6
2.1 Important Construction of the Application Domain....................................................6
2.1.1 Android application for User.......................................................................................6
2.1.2 Updating Data in Real-Time Database........................................................................6
2.2 Existing System and Their Limitations.......................................................................6
2.2.1 Personalized Nutrition.................................................................................................6
2.2.2 DNA FIT......................................................................................................................7
2.2.3 FAT Secret...................................................................................................................7
2.3 Limitations of the Existing Systems............................................................................7

i
2.3.1 Personalized Nutrition.................................................................................................7
2.3.2 DNA Fit.......................................................................................................................7
2.3.3 FAT Secret...................................................................................................................7
2.4 Comparison with the Existing System........................................................................8
2.5 Summary......................................................................................................................8
Chapter 3: Requirements Specification.................................................................................9
3 Introduction..............................................................................................................10
3.1 Developmental flow of the system...........................................................................10
3.2 Interface Requirements.............................................................................................12
3.2.1 Hardware Interface Requirements............................................................................12
3.2.2 Software Interface Requirements..............................................................................12
3.3 Functional Requirements..........................................................................................13
3.3.1 User Registration......................................................................................................13
3.3.2 Diet Planner..............................................................................................................13
3.3.3 Workout....................................................................................................................13
3.4 Use Case...................................................................................................................14
3.5 Use-Case Description...............................................................................................16
3.5.1 Registration..............................................................................................................16
3.5.2 Login........................................................................................................................16
3.5.3 Subscribe for E-mail................................................................................................17
3.5.4 Personal Info............................................................................................................17
3.5.5 Search Meal Info......................................................................................................18
3.5.6 View Food Details....................................................................................................19
3.5.7 Add Workout............................................................................................................19
3.5.8 Setting......................................................................................................................20
3.6 Non-Functional Requirements.................................................................................20
3.6.1 Efficiency.................................................................................................................20
3.6.2 Usability...................................................................................................................30
3.6.3 Consistency..............................................................................................................30
3.7 Resource Requirements............................................................................................30
3.6.4 Hardware Resources.................................................................................................30
3.6.1 Software Interface....................................................................................................31
3.7 Project Feasibility....................................................................................................31

ii
3.7.1 Technical Feasibility................................................................................................31
3.7.2 Social Feasibility......................................................................................................31
3.7.3 Economic Feasibility................................................................................................31
3.8 Summary..................................................................................................................31
Chapter 4: System Modeling.................................................................................................25
4 Introduction..............................................................................................................26
4.1 Design Approach.....................................................................................................26
4.1.1 Top-Down Design Approach...................................................................................26
4.1.2 Bottom-Up Design Approach..................................................................................26
4.2 Design Interface.......................................................................................................26
4.3 High Fidelity Prototype............................................................................................26
4.3.1 Welcome Screen.......................................................................................................27
4.3.2 Login Screen...........................................................................................................27
4.3.3 User Registration.....................................................................................................28
4.3.4 Personal info Form..................................................................................................29
4.3.5 Homepage...............................................................................................................33
4.3.6 Diet plan Screen......................................................................................................34
4.3.7 Setting screen..........................................................................................................35
4.3.8 Workout screen.......................................................................................................36
4.4 View Model of Architecture...................................................................................37
4.4.1 Logical View...........................................................................................................37
4.4.2 Process View...........................................................................................................39
4.4.3 Sequence Diagrams.................................................................................................44
4.4.4 Development View..................................................................................................50
4.4.5 Physical view...........................................................................................................51
4.5 Summary.................................................................................................................51
Chapter 5: Implementation...................................................................................................52
5 Introduction.............................................................................................................53
5.1 Modules...................................................................................................................53
5.1.1 Login Module..........................................................................................................53
5.1.2 Signup Module........................................................................................................53
5.1.3 Personal info gathering Module..............................................................................53
5.1.4 Food choices............................................................................................................53

iii
5.1.5 Diet plan..................................................................................................................53
5.1.6 Workout...................................................................................................................53
5.1.7 Dishes......................................................................................................................54
5.1.8 Graphs.....................................................................................................................54
5.2 Framework..............................................................................................................54
5.2.1 Flutter......................................................................................................................54
5.3 Libraries..................................................................................................................54
5.3.1 Firebase-database....................................................................................................54
5.3.2 Get...........................................................................................................................54
5.3.3 Path-provider...........................................................................................................54
5.3.4 Cache network images............................................................................................54
5.3.5 Front awesome flutter..............................................................................................54
5.3.5.1 Bottom Navy Bar.....................................................................................................55
5.3.5.2 Local Auth...............................................................................................................55
5.4 Summary.................................................................................................................55
Chapter 6: Result/Testing, Analysis and Validation...........................................................56
6 Introduction................................................................................................................57
6.1 Testing Methodology.................................................................................................57
6.2 Test Bed......................................................................................................................57
6.3 Test Cases...................................................................................................................57
6.3.1 Test Case of signup....................................................................................................58
6.3.2 Test Case of Login.....................................................................................................59
6.3.1 Test Case of Profile info............................................................................................60
6.3.2 Test Case of Food choices..........................................................................................61
6.3.3 Test Case of Diet plan................................................................................................62
6.3.4 Test Case of Home Screen.........................................................................................63
6.3.5 Test Case of Dishes....................................................................................................64
6.3.6 Test case of Dishes (Fixed)........................................................................................65
6.3.7 Test case of Workout..................................................................................................66
6.4 Summary....................................................................................................................67
Chapter 7: Conclusion and Future Work............................................................................68
7 Introduction................................................................................................................69
7.1 Overview of System...................................................................................................69

iv
7.2 Milestone Achieved....................................................................................................69
7.2.1 Android Based Application Development..............................................................69
7.2.1.1 Login.......................................................................................................................69
7.2.1.2 Signup.....................................................................................................................69
7.2.1.3 Personal info............................................................................................................69
7.2.1.4 Food choices............................................................................................................69
7.2.1.5 Diet plan..................................................................................................................69
7.2.1.6 Workout...................................................................................................................69
7.2.1.7 Dishes......................................................................................................................70
7.3 Limitations..............................................................................................................70
7.4 Future Work............................................................................................................70
7.5 Summary.................................................................................................................70
APPENDICES..........................................................................................................................71
Appendix I – User Manual.......................................................................................................71
Appendix II – Glossary............................................................................................................72
References

v
LIST OF FIGURES
Figures Caption Page
3.1 Flow Diagram................................................................................................................
3.2 Use Case Diagram.........................................................................................................
4.1 Welcome Screen............................................................................................................
4.2 Login Screen.................................................................................................................
4.3 User registration............................................................................................................
4.4 Age selector...................................................................................................................
4.5 Height selector...............................................................................................................
4.6 Weight selector..............................................................................................................
4.7 Homepage.....................................................................................................................
4.8 Diet plan........................................................................................................................
4.9 Settings..........................................................................................................................
4.10 Workout page................................................................................................................
4.11 Class Diagram...............................................................................................................
4.12 Activity Diagram...........................................................................................................
4.13 Login Activity diagram.................................................................................................
4.14 Signup Activity Diagram..............................................................................................
4.15 Personal info Activity Diagram.....................................................................................
4.16 Homepage activity diagram..........................................................................................
4.17 State machine diagram..................................................................................................
4.18 Login Sequence.............................................................................................................
4.19 Register Sequence.........................................................................................................
4.20 Graph Sequence.............................................................................................................
4.21 Meal Data Sequence......................................................................................................
4.22 Workout.........................................................................................................................
4.23 Share application sequence...........................................................................................
4.24 Diet plan sequence........................................................................................................
4.25 Component Diagram.....................................................................................................

vi
LIST OF TABLES
Table Caption Page
2.1 Comparison between Existing System and developed System.......................................
3.1 FR-1 User Registration...................................................................................................
3.2 Diet Planner.....................................................................................................................
3.3 Workout...........................................................................................................................
3.4 Registration Use case:....................................................................................................
3.5 Login Use Case..............................................................................................................
3.6 Subscribe for E-mail Use Case.......................................................................................
3.7 Personal Info Use Case..................................................................................................
3.8 Search Meal Info............................................................................................................
3.9 View Food Details Use Case..........................................................................................
3.10 Add Workout Use Case.................................................................................................
3.11 Setting Use Case...........................................................................................................
6.1 Test Case of Signup......................................................................................................
6.2 Test Case of Login........................................................................................................
6.3 Test Case of Signup......................................................................................................
6.4 Test Case of Location....................................................................................................
6.5 Test Case Vehicle Info..................................................................................................
6.6 Test Case Search...........................................................................................................
6.7 Test Case of Store Screen..............................................................................................
6.8 Test Case of View Product............................................................................................
6.9 Test case of Dishes (Fixed)...........................................................................................
6.10 Test case of Workout.....................................................................................................

vii
CHAPTER 1

INTRODUCTION
1.1 Introduction:
This chapter gives an overview of our system like what was the initial problem that motivated
us to create the system, how our system solves the problem, and what extra features it
provides. The technologies used to create the system are also discussed in this chapter.

1.2 Motivation:
As individuals across the globe are turning out to be keener on watching their weight, eating
better food and keeping away from lousy nourishment, a system that can quantify calories
and sustenance in consistently dinners can be exceptionally helpful for keeping up with our
wellbeing. Food Calorie and Nutrition estimation system is exceptionally advantageous for
dietitians and patients to gauge and deal with the everyday food admission. The developed
system is a responsive app, which contains the information and information with respect to
the wellness of an individual. The fundamental data identified with the wellness like how to
keep up with great wellbeing by doing a few exercises and by eating some food items which
incorporates calories, proteins and starches and so on.

1.3 Problem Description:


"Wellbeing IS WEALTH" the most known expression we as a whole know about. These
days, individuals will more often than not eat unfortunate food and their indiscreet conduct
might cause extreme illness. Then again, bustling timetable does not permit individuals to
take care of their wellbeing in better manner. Individuals are essentially uninformed with
regards to what to eat and what to do to remain fit and solid. Study demonstrates around 70%
individuals experience the ill effects of sickness because of undesirable eating routine.
Recruiting nutritionist can be exorbitant each month and hence individuals essentially try not
to go to consume less calories organizer or nutritionist. PDAs have gotten progression way of
life of individuals and they get the one hand data about all that they wish to.

1.4 Personal Nutritionist:


Ai-based personal nutritionist works as a real dietitian. Computerized reasoning is an
innovation that will assist with making collaboration between man and machine utilizing
normal language conceivable. It asks every one of his information from the client and cycles
it to give the eating regimen plan to the client. Subsequently the client does not have to visit
any dietitian, which likewise saves time. This will assist commoners to keep up with their
wellbeing in better manner with appropriate direction. Artificial intelligence area gives an
edge of producing an appropriate eating regimen plan. Consistently, changing the eating

2
routine requires ace data on food things and is a drawn-out methodology. Diet plan changes
from one individual to another, which was not remembered while growing a large portion of
system and AI applications. The application is generally imperative to keep track on
wellbeing status of the client. No need of extraordinary dietitian and no more need of
squandering cash out for looking up yourself.

1.5 Goals and Objectives:


The objective is to develop an AI based Nutritionist application which will help people to set
their diet plan according to their health and physical condition. Our system will generate daily
reports to keep them motivated to be fit.

1.6 System Features:


Features of the system are as follow;

1.6.1 Registration:
The system will get personal information from the user to get the fully functional system and
create a profile for them.

1.6.2 Diet Plan:


In this feature, the system will calculate the Diet according to user information and sets daily
food reminder, exercise reminder and generate daily report.

1.6.3 Diet Plan Guide:


In this feature, the system will guide the user to get a proper diet plan and give them some
appropriate guidance towards the plans.

1.6.4 Weight Graph:


In this feature, the system will monitor all the activities of user and represent them in Graph.
Such like how much calories are consuming or remaining would be represent in a Graph.

1.6.5 Integrity of Data:


In this feature, the system will secure all personal data and information of the user and no one
will be allowed to check or monitor the activities of user.

1.7 Scope:
The developed system is for the public to set their diet plan and live a healthy life. This
system is very free and have features like diet plans, food recipes and many more but not
have the feature to post users their experience on a timeline. In future it will have a home feed

3
in which people can share their own experiences and their own food recipes and diet plans
with other people so it also become a social app.

1.8 Process Model:


The iterative Waterfall Model will be adjusted to foster this data system for AI Personal
Nutrition. The iterative Waterfall Model will assist with fostering a system by minding each
progression of advancement, it would be not difficult to figure out blunder in the framework
during improvement, and the improvement will proceed until it is completely utilitarian.

1.9 Nature of the Project:


The project is pure Android based application. For the AI features, Python is being used. The
programming language used in the app will be Dart based on Flutter. For storage of data,
firebase is used for updating data.

1.9.1 Android Studio:


As our system is dependent on android app, so android studio is one of the best fastest
developer tools for building market-leading apps and accelerating performance.

1.9.2 Flutter Framework:


The system is developed by using flutter to develop the application. DART is utilized for
front end [1].

1.9.3 Firebase:
It is real time online application so the database which is used for it is the firebase database so
the data will be updated and generate notification in the real-time [2].

1.9.4 Python:
For the AI features Python will used at back end. Python is used for AI base programs or
features [3].

1.10 Overview of the Report:


This part is about the presentation, issue proclamation, and the individual arrangements that
will answer all that referenced, inspiration, purpose of created system, functionalities of the
system. What are assets required those are programming and equipment or Tools and
innovations that are utilized for the improvement of this application are talked about in after
section. In the subsequent Chapter, reason is talked about which behind the thought. This
Chapter additionally portrays the current system and their blemishes and functionalities,
appraisal, its examination with any remaining existing system and its restrictions are likewise

4
survived or diminished. Third Chapter is about the necessity particulars utilized for the
system. Therefore, the prerequisites canvassed in the section are useful, non-practical,
interface, and information base and asset necessities. Interface prerequisites are further
subcategorized into programming and equipment interface necessities First we foster the
utilization cases chart alongside the clarification of each utilization case for system to create
the better understanding about the undertaking. Forward section is about the framework plan
and displaying. This section is about the prerequisite data portrayal of a system.
Configuration moves toward that will be utilized (top/down or base/up), interface plan, 4+1
view models that will be talked about in this part it incorporates undeniable level view,
intelligent view, actual view, process view and the last one advancement view graphs. Fifth
Chapter depends on execution of the system. The instruments, advances and dialects are
talked about exhaustively. 6th system is about the quality confirmation exercises will be
covered, for example, testing which is applied on the created system during the period of
testing for example Testing, approval. It included Detail depiction of experiments. Last part is
about the end, further proposals. Fruition, limits, achievements that are accomplished from
the task.

5
CHAPTER 2

BACKGROUND AND EXISTINGWORK


2 Introduction:
In this Chapter, we will examine about the foundation of the created system alongside the
essential data of the current system. It incorporates the examination of elements of existing
system that are as of now created. It will depict that how our system "Android based
application for AI individual nutritionist" handles the limits of existing system. It likewise
incorporates the overall investigation of the current system.

2.1 Important Construction of the Application Domain:


“AI Personal Nutritionist” is the system, which will help people to set their diet plan
according to their health and physical condition. Our system will generate daily reports to
keep them motivated to be fit.

2.1.1 Android application for User:


There will also be an application developed for the user where user can view the diet plans.
He/she can view details, monitor, and can set diet plan by him/herself. User can also
subscribe for email notification for any updates about the diet plans.

2.1.2 Updating Data in Real-Time Database:


Using the application admin will execute the scripts and get the new updated data files that
will be used to update the Real-Time Database of the system by the setting of system and
updates made to the database will be applied to the application data due to real-time
functionality of database used for this system.

2.2 Existing System and Their Limitations:


There are some applications on play store but there are lot of flaws and limitations and they
are not much reliable to answer the problems and failed to give the accurate solution. They
are not much accurate to provide the enough information to the user about the diet plan that
are not according to the user diet.

2.2.1 Personalized Nutrition:


This application is available on the play store and it is very free you just need to download it
will give some basic information to the user about the diet and it also gather personal
information from the user.

2.2.1.1 Features:
This application will gather personal information from the user, it gives diet plans to the user,
and it provide the data integrity.
2.2.2 DNA FIT:
This application is also available on the play store and it is totally free. It also gathers
personal information from the user.

2.2.2.1 Features
This application also collects personal information about the user and it also gives diet plans
to the user that user must set it manually. It also gives data integrity to the user information or
data.

2.2.3 FAT Secret:


This is an android based application and easily available on the play store and it is easy to use
for the user it gives information about the diet plans.

2.2.3.1 Features:
In this application user must give their personal information and it gives information about
the different diet but user must set plans manually according to their diet. It gives premium
plan to the user premium feature for using the application.

2.3 Limitations of the Existing Systems:


The limitations of the current systems are as follows

2.3.1 Personalized Nutrition:


This application is time taking and less reliable and in this app user must add diet plan by
manually. It contains no graphs that shows the details about the user, it gives no guide to the
user about the diet plan, and it can be risky.

2.3.2 DNA Fit:


In this application user, get no proper guidance about the diet and their diet plans. I also less
reliable and risky. User sets diet plans manually and it has no work out plans or footsteps
counter. The data of the user can be compromised.

2.3.3 FAT Secret:


This application is less reliable and time taking and it has no representation graph of the user
activities on daily and monthly basis. It gives guidance will be Chances of misinterpretation
and it is lack of integrity of data.

2.4 Comparison with the Existing System:


The table 2.1 is comparison between existing and developed system.

8
Table 2.1: comparison between Existing system and developed system

Features System
AI Personal Personaliz DNA FIT FAT Secret
Nutritionist ed
Nutrition
Registration Fast and Time Time Time Taking and
Reliable Taking and Taking and Less
Less Less
Reliable
Reliable Reliable
Diet plan Accurate andManual Manual Premium feature
free AI based
Diet plan Effective NO proper Not Chances of
Guide Guide misinterpretation
Available
Integrity of Can’t be Can be Can be Can be easily
Data compromised
Compromised
Workout Yes No No No

2.5 Summary:
In this Chapter system foundation and the need of the system is talked about. What's more,
significant agreements that are utilized in the application space are talked about such android,
firebase data set. Existing system are likewise clarifying and correlation of their elements is
additionally finished with the forthcoming system.

9
CHAPTER 3

REQUIREMENTS SPECIFICATION
3 Introduction:
In this chapter, the UML diagrams are described. The flow diagram and use cases of the
system are described. In flow diagram, the data flows of the system are concise. The use
cases are also discussed in this chapter. Use cases are clear that shows interface with system
and user to achieve a task. System modelling describes the theoretical view of a system and a
graphical notation which are based on UML (Unified Modelling Language). It chains the
developer to work easily in every complex unit.

3.1 Developmental flow of the system:


The figure 3.1 of flow diagram of app describes whole system’s functionality. The app starts
with login after this app will gather user’s personal information like Age, Weight and Height.
After this next screen will appear where user selects food choices like Vegetarian or Non-
Vegetarian. After this, the app goes on homepage. On homepage, recommended Diet plan
will be generated. There is a dishes tab so users can select for a desired product, view it and
add it. There are also some products that are visible on the homepage and different stores are
visible so that users can easily find what they want. There is also Workout tab so user can see
workout plan on daily basis. A flow diagram is a visualization of a sequence of actions,
movements within a system and decision points. They are detailed explanation of each step in
a process, no matter the level of complexity of that process. This is a map out process, so that
you can easily communicate it to users. You can also use them to define and analyze a
process, build a step-by-step picture of it, and then standardized and improve it. When
designing and planning a process, flowcharts can help you identify its essential steps and
simultaneously offer the bigger picture of the process. It organizes the task in chronological
order and identify them by types like process, decision and data.it is used to design and
document simple processes or program. Like other types of diagrams, they help visualize the
process. Two of the many benefits are flaws and bottlenecks become apparent. Flowcharts
typically use this symbols like a process step is usually called an activity is donated as a
rectangular box and a decision is denoted as a diamond. a diagram that depicts a process,
system or computer algorithm. They are widely used in multiple field to document, study,
plan, improve and communicate often complex processes in clear and easy to understand
diagrams. Flowchart sometime spelled as flow chart, use rectangles, ovals, diamonds and
potentially numerous other shapes to define the type steps, along with connecting arrows to

11
define flow and sequence. They can range from simple, hand-drawn charts to comprehensive
computer drawn diagrams depicting multiple steps and routes.

12
Figure 3.1: Flow Diagram

13
3.2 Interface Requirements:
The main IDE interface is designed using Dart (FLUTTER). The machine-learning algorithm
are coded in python. To run the system the server must be in running state so that the server
responds as the client communicate with the server.

3.2.1 Hardware Interface Requirements:


The following hardware requirement for development and testing of the system are
Required.
• IOS/Android
• RAM (Random Access Memory) 4GB or higher
• Android version KitKat or higher
• Storage 8 GB or higher

3.2.2 Software Interface Requirements:


The required software interface requirements for the system are:

3.2.2.1 Androidstudio:
As our system is dependent on android app, so android studio is one of the best
Fastest developer tools for building market-leading apps and accelerating performance.

3.2.2.2 Flutter Framework:


Flutter is Google's free and open-source UI framework for creating native mobile
applications. It allows developers to build mobile applications for both IOS and Android with
a single codebase and programming language, which is beneficial in our case.

3.2.2.3 Firebase:
Firebase is Google's mobile database platform that helps quickly develop high-quality apps.
As firebase will easily be integrated with the android studio, so it is good for us to easily
connect it to the application.

3.2.2.4 Python:
For the AI features Python will used at back end. Python is used for AI base programs or
features. It is often used to build to website software automate task, and conduct data
analysis.

14
3.3 Functional Requirements:
Functional requirements describe a software system or its components. A function is nothing
but inputs to the software system, its behavior, and outputs. Our system functional
requirements are user registration, a Diet planner and workout. These requirements work for
user to help him reduce or gain his/her weight.

3.3.1 User Registration:


The table 3.1. Represents detailed view of User Registration functional requirement.

Table 3.1: FR-1 User Registration

Identifier FR-1
Title User Registration
Requirement E-mail, Username, Password
Source Account
Rational To collect data and register the user
Restrictions User e-mail and Password must be true
Dependencies No
Priority High

3.3.2 Diet Planner:


The table 3.2. Represents detailed view of User diet plans functional requirement.

Table 3.2: Diet Planner

Identifier FR-2
Title Diet Planner
Requirement Age, Weight and Height
Source User
Rational To collect the personal information to make plan
Restrictions User information must be true
Dependencies No
Priority High

3.3.3 Workout:
The table 3.3 represents detailed view of User workout on daily basis functional requirement.
Table 3.3: Workout

Identifier FR-4
Title Workout
Requirement User weight, height and Age

15
Source User
Rational To collect the information of user workout
Restrictions Must be specify Male or Female
Dependencies FR-2, FR-3
Priority High

3.4 Use Case:


The figure 3.1 use case is a portrayal of client's collaboration with the system. Use case is
additional ordered into two significant classifications, use case outline and completely
dressed use case. Use case chart is a realistic portrayal of the connections between
components of system and entertainer. Use case portrayal is the clarification of how both of
entertainer and components of system will interface. In basic words use graph we get data
like "who" will utilize the system and use case depiction gives essential thought of "how"
client will play out his/her objectives. Use case is graphical depiction of a user’s possible
interaction with a system. A use case diagram shows various use cases and different types of
users the system has and will often be accompanied by other types of diagrams as well. The
use cases are represented by either circles or ellipses. Due to their simplistic nature, use case
diagrams can be a good communications tools for stakeholders. Use-case diagram describes
the high level functions and scope of the system. This diagram is also identify the interactions
between the system and its actors. The use cases and actors in use-case diagrams describe
what the system does and how the actors use it, but not how the system operates internally. A
use-case is a written description of how users will perform tasks on your website. It outlines,
from a user’s point of view, ab system’s behavior as it responds to a request. Use cases add
value because they help explain how the system should behave and in the process, they also
help brainstorm what could go wrong. They provide a list of goals and this list can be used to
established the cost and complexity of the system. Anyone or anything that performs a
behavior is called actor. Someone or something with vested interests in the behavior of the
system under discussion is called stakeholders. Stakeholders who initiates an interaction with
the system to achieve a goal is called primary actors. What must be true or happen before and
after the use case runs. The event that cause the use case to be initiated is called trigger. Use
case in which nothing goes wrong is called main success scenarios. Paths are the variation on
the main theme is called alternative paths. These exceptions are what happen when things go
wrong at the system level. A use case can be written or made visual with the help of a use
case model tool. a system is the product, service, or software under discussion.

16
Figure 3.1: Use Case Diagram

17
3.5 Use-Case Description:
Use case description in as significant as use case chart, from use case outline we get data like
which entertainer will perform which task yet at the same time it is an exceptionally
ambiguous thought. To make it more justifiable use case depiction proves to be useful. Being
used case portrayal, we shortly compose the collaboration of system and entertainer. This
assists software engineers with welling nonprofessional, which can be a customer to
comprehend or get a thought how the finished result will perform.

3.5.1 Registration:
The table 3.4 illustrates meticulous depiction of Registration use case.
Table 3.4: Registration Use case:

Use Case ID: UC-01


Use Case Name: Registration
Actors: User
Description: User will give information to get register
Trigger: 1st time open the app.
Preconditions: System will take input from API’s and Components
Post conditions: System registers the user successfully
Normal Flow: User will provide the data and register through google Account
and system will checks the and ensure that the entered login
information is correct
Alternative If the user types the wrong information the system will show the
Flows: error of invalid credentials

Exceptions: User want to register to the system


Includes: Include login to user subscription
Assumptions: The user must enter the data correctly
Notes and
Issues:

3.5.2 Login:
The table 3.5 illustrates meticulous depiction of Login use case.
Table 3.5: Login Use Case

Use Case ID: UC-02


Use Case Name: Login
Actors: User
Description: This use case explains how User login in the system
Trigger: 1st time open the app.

18
Preconditions: System will display login form
Post conditions: System login the user successfully
Normal Flow: System will get user name and password to login the user

Alternative System will show the error message of invalid credentials


Flows:

Exceptions: User want to login in the system


Includes: User can also reset the password if he/she forgot the password
Assumptions: The user must login in the system successfully
Notes and
Issues:

3.5.3 Subscribe for E-mail:


The table 3.6 illustrates meticulous depiction of email use case
Table 3.6: Subscribe for E-mail Use Case

Use Case ID: UC-03


Use Case Name: Subscribe for E-mail
Actors: User
Description: This use case explain how User can subscribe to get email
notification of updates
Trigger: 1st time open the app.
Preconditions: Application is started and user login to the system
Post conditions: User subscribe the email notification successfully
Normal Flow: System navigates the user to login activity. If user is already
logged in the system navigate the user to email subscription

Alternative System will show the message if the user already subscribed
Flows:

Exceptions: User subscribe for E-mail


Includes: User can also login again to subscribed a specific account
Assumptions: Aim is to subscribe to the e-mail notification to get update emails
Notes and
Issues:

3.5.4 Personal Info:


The table 3.7 illustrates meticulous depiction of personal info use case.

19
Table3.7: Personal Info Use Case

Use Case ID: UC-04


Use Case Name: Personal Info
Actors: User
Description: This use case explain how User can give personal information just
like weight, height and age
Trigger: Once when user subscribe
Preconditions: Application is started and user is at home page
Post conditions: Personal information stored on firebase
Normal Flow: System takes the user to home page. System navigates the user to
searching page. System will show a list of foods matching entered
preferences
Alternative System will load all the foods in the result
Flows:

Exceptions: No
Includes: No
Assumptions: Aim is to user get foods as he/she search
Notes and
Issues:

3.5.5 Search Meal Inf


The table 3.8 illustrates meticulous depiction of Search meal use case
Table 3.8: Search Meal Info

Use Case ID: UC-05


Use Case Name: Search Meal Info
Actors: User
Description: This use case explain how User can search meal that he/she wants
to be add his/her in Diet
Trigger: Many times as user want
Preconditions: Application is at search page
Post conditions: A list of food will be added
Normal Flow: System takes the user to home page. System navigates the user to
searching page. System will show a list of foods matching entered
preferences. System will add meal into his/her diet plan
Alternative System will show the meals according to the his/her diet plan
Flows:

Exceptions: No
Includes: No
Assumptions: Aim is to user add meal in diet plan as he/she search

20
3.5.6 View Food Details:
The table 3.9 illustrates meticulous depiction of Food details use case.
Table 3.9: View Food Details Use Case

Use Case ID: UC-06


Use Case Name: View Food details
Actors: User
Description: This use case explain how User can view the related details of a
food details by selecting the details
Trigger: Many times as user want
Preconditions: Application is at started and user is at home page
Post conditions: User will see all the details of foods
Normal Flow: System takes the user to home page. System navigates the user to
details activity where user can view basic details of Foods

Alternative None
Flows:

Exceptions: No
Includes: No
Assumptions: Aim to get details of the foods
Notes and
Issues:

3.5.7 Add Workout:


The table 3.10 illustrates meticulous depiction of add workout use case.
Table 3.10: Add Workout Use Case

Use Case ID: UC-07


Use Case Name: Add workout
Actors: User
Description: This use case explain how User can add workout on daily and
weekly basis
Trigger: Many times as user want
Preconditions: Application is at started and user is at home page
Post conditions: User will add all his/her workout
Normal Flow: System takes the user to home page. System navigates the user to
workout activity where user can add his/her workout

Alternative None
Flows:

Exceptions: No

21
Includes: No
Assumptions: Aim to add workout on daily and weekly basis

3.5.8 Setting:
The table 3.11 illustrates meticulous depiction of setting use case.

Table 3.11: Setting Use Case

Use Case ID: UC-08


Use Case Name: Setting
Actors: User
Description: This use case is showing the setting of the application

Trigger: Many times as user want


Preconditions: Application is at started and user is at home page
Post conditions: Application’s setting showing many info
Normal Flow: System takes the user to home page. System will open setting
And show many info like rate us, logout, share.

Alternative
Flows:

Exceptions: No
Includes: No
Assumptions: Aim to show other info like logout, rate us, share
Notes and
Issues:

3.6 Non-Functional Requirements:


The system's non-functional requirements are as following:

3.6.1 Efficiency:
As our system, does a great deal of capacities continuously, so it is essential for the system to
be proficient..

1. Diet Planner module ought to be progressively with extreme 1 sec of


postponement.
2. Workout module ought to be all things considered 2 sec of difference.
3. Record Graph module ought to be a greatest 3 sec of postponement.
4. User Registration ought to be all things considered 1 sec of deferral.

22
3.6.2 Usability:
The system UI having great shading mixes and is easy to use, very straightforward, simple
and extremely straightforward in only couple of moments by the client.

3.6.3 Consistency:
System should work precisely. This necessity has a ton of significance as exactness and
consistency is key components for working continuously. The showed text ought to be 100%
precise, the circumstance ought to be great, and as needs be.

• Diet plan ought to be create with exactness of 80%.

• Notification ought to be show with precision of 95%.

• Work out subtleties ought to be show with precision of 75%.

3.7 Resource Requirements:


To finish the venture inside the given time limitations and spending plan, following
equipment and programming assets are required. .

3.7.1 Hardware Resources:


To finish the venture inside the given hardware, and programming assets are required.

3.7.1.1 Mobile Phone:


The following hardware requirement for development and testing of the system are
Required.
• Android
• RAM (Random Access Memory) 4GB or higher
• Android version KitKat or higher
• Storage 8 GB or higher

3.7.1.2 Software Interface:


Personal Nutritionist is a real time application that is why proper connectivity to the internet
is essential for the effective performance of the system.

3.7.1.3 Android Studio:


As our system is dependent on android app, so android studio is one of the best
Fastest developer tools for building market-leading apps and accelerating performance.

23
3.7.1.4 Flutter Formwork:
Flutter is Google's free and open-source UI framework for creating native mobile
applications. It allows developers to build mobile applications for both IOS and Android with
a single codebase and programming language, which is beneficial in our case.

3.7.1.5 Firebase:
Firebase is Google's mobile database platform that helps quickly develop high-quality apps.
As firebase will easily be integrated with the android studio, so it is good for us to easily
connect it to the application.

3.7.1.6 Python:
For the AI features Python will used at back end. Python is used for AI base programs or
features.

3.8 Project Feasibility:


Personal Nutritionist will provide benefits to the Users by getting diet plans according to their
diet. In addition, it will help them to get notify daily or weekly basis through graphically
representation and it will monitor footsteps.

3.8.1 Technical Feasibility:


Personal Nutritionist will be developed using Flutter framework, which is one of the most
popular platforms out there in the world. This application will be developed using Flutter.

3.8.2 Social Feasibility:


Although there are more than a thousand app, which helps the people to gain or loss weight or
set their diet plans but in our AI based application Diet plans are generated through AI and it
will give 100% result to the user.

3.8.3 Economic Feasibility:


Personal Nutritionist system is economically feasible because the cost off android application
simply need to download our system application free from the play store. Our system just
needed the smart phone having android operating system along with the internet connection.

3.9 Summary:
This Chapter gives whole necessity particular of our system. The entire system stream is
depicted what the system can do. The part additionally shortly portrays the interface
prerequisites including equipment and programming interface determinations. This Chapter
additionally covers practical and non-useful prerequisites. Use case graphs and portrayal is

24
additionally examined to comprehend the inside and out working of the system. Moreover,
equipment and programming assets are additionally referenced which are needed to create
and the test the system effectively and productively.

25
CHAPTER 4

SYSTEM MODELING
4 Introduction:
This Chapter gives completely requirement detail of our system. The entire system stream is
depicted what the system can do. The part likewise shortly depicts the interface prerequisites
including equipment and programming interface determinations. This Chapter likewise
covers useful and non-useful prerequisites. Use case graphs and depiction is likewise
examined to comprehend the inside and out working of the system. Besides, equipment and
programming assets are likewise referenced which are needed to create and the test the
system effectively and proficiently. Specialized, Social, and affordable achievability of the
system is likewise talked about for better agreement to foster the system.

4.7 Design Approach:


Normally, there are two important design approaches in software engineering, which is Top-
Down Design Approach and Bottom-Up Design Approach. These two approaches are clarify
briefly as:

4.7.1 Top-Down Design Approach:


In the Top-Down Design approach, all requirement are collect and listed, after that, system is
divided into modules well known on requirements. Top-Down Design approach license the
physical control of the system, and utilized where requirements are not properly accessible.

4.7.2 Bottom-Up Design Approach:


In the Bottom-Up Design approach, need basic knowledge of the system modules and
components, which lead us towards the product. All basic components of the system are
known in this approach; we can develop and combine them, which help us to lead near the
product.

4.8 Design Interface:


User interface indicates the visual presentation of components that customer may connect
within area or mechanical item. It may also called as the control that caches the visual display
of the application.

4.9 High Fidelity Prototype:


High fidelity prototypes often known as Hi-fi is computer-based prototypes of the interface. It
gives an idea of how user interface will be designed. It has more aesthetics and working
presentation that is why most of the requirement engineering processes collect user
preferences then designs prototypes types to give a general idea of how product will look like

27
or sometimes it also shows working too. No matter what end product you are coding whether
its web end or application of different operating systems, now a days a lot of tools are
available which allow you to design these prototypes with minimum human effort.

4.9.1 Welcome Screen:


This is a simple figure 4.1 of welcome screen for the application users.

Figure 4.1: Welcome Screen

4.9.2 Login Screen:


The figure 4.2 shows the login screen for the already registered users. This screen contains
the email and password fields for the input from user and a login button to sign in the
account. This screen shows after the main logo screen of the app. User can click on forgot
password to reset the password. The sign-up button will open the sign up page.

28
Figure 4.2: Login Screen

4.9.3 User Registration:


This is a figure 4.3 of registration screen for the new users, all the fields must be filled to
proceed further. If the fields are not filled properly user cannot sign up or register the

29
account. Email and password fields also use validation so email must be correct and password
must be six characters. The signup button is to submit the information.

Figure 4.3: User registration

4.9.4 Personal info Form:


The figure 4.4 shows the screen contains a slider for the age input from the user. The user can
select the age by sliding the digits downward or upward. The continue button will take the
user to the new screen after selecting his/her age.

30
Figure 4.4: Age selector

The figure 4.5 shows the screen is for the input of height from the user. The user can either
input the height in feet’s or in centimeters. The two radio selections or switches of ft and cm
can be used to switch the measurement scale input. The continue button will take the user to
the next screen.

31
Figure 4.5: Height selector

32
Figure 4.6: Weight selector

The figure 4.6 shows the simple screen is for the input of weight from the user. Just like the
previous height input screen user can enter the weight in kg or in lb by switching between lb
and kg switches. The default weight on the screen is 25kg which can be changed by typing
the new weight from the user using the keypad.

33
4.3.5: Homepage:
The figure 4.7 shows the homepage screen shows the name of user on the top than the
calendar and meal plan downward respectively. The meal plan contains four categories which
are breakfast, snack, lunch and dinner. The user can slide the meals on left and right. The
footer contains the buttons for other features of app and the main home button to return to the
main home screen.

Figure 4.7: Homepage

34
4.3.6: Diet plan Screen:
The figure 4.8 shows the diet plan screen contains the three categories button on top. The
main body of the screen contains the content of each category. In diet tips user can also use
the heart icon to save the diet tip into favorite list. Every tip also shows the time when it was
published. The footer in the bottom is same for the whole app.

Figure 4.8: Diet plan

35
4.3.7: Setting screen:
The figure 4.9 shows the settings screen can be opened up using the setting button in the right
corner of the footer. The settings screen contains options for a lot of other pages. The night
mode on the top can be used to switch to the dark mode. The use can also change his/her data
using the edit profile option. This screen also contains other options like notifications,
favorite and many more.

Figure 4.9: Settings

36
4.3.8: Workout screen:
The figure 4.10 shows the screen contains the two main categories option on the top than the
other options for that selected main category in the main body. These options include the
different workouts like chest, arm, leg etc.

Figure 4.10: Workout page

37
4.10 View Model of Architecture:
Planning system before now days is very mind boggling as society is turning out to be more
serious programming organizations are barring errands like necessity assembling and
planning bringing about large number of task disappointments. This issue presented
programming project the board, which permits designers to follow each progression without
squandering any occasions. 4+1 model is one of that it permits groups to chip away at various
perspectives so not all human exertion is in one undertaking various groups are relegated to it
so that organizations can deal with different errands all at once and complete them on
schedule. In 4+1 model, there are 4 distinct perspectives on system sensible view, process
view, actual view and advancement view and the center of them is that 4+1 situations which
can be use cases or little piece of utilization cases.

4.10.1 Logical View:


Logical view can also be referred as end- user view; it shows the core functionalities of
system with end user in mind. This view is classified into two main types “class diagram” and
“entity relationship diagram”

4.10.1.1 Class diagram:


The figure 4.13 shows the class diagram shows all the main modules of the application. Each
module contains the details of the variables and functions used in that module. The diagram
also shows the relation between all the modules whether it is one to one, one to many and
vice versa. The class diagram is the main building block of object-oriented modeling. It is
used for general conceptual modeling of the structure of the application and for detailing
modeling, translating the models into programing code. Class diagram is also use for data
modeling. In class diagram top compartment contains the name of the class. Is a diagram
used in designing and modeling software to describe classes and their relationships. Class
diagram enable us to model software in a high level of abstraction without having to look at
the source code. The middle compartment contains the attribute of the class. The bottom
compartment contains the operations the class can execute. Shows static structure of
classifiers in a system. Diagram provides a basic notation for other structure diagrams
prescribed by UML. The name of the class appears in the first partition. Attributes are shown
in the second partition. The attribute type is shown after the colon. Attributes map onto
member variables data members in code. Operation are shown in the third partition. they are
services the class provides. The return type of a method is shown after the colon at the end of
the mention signature. Operations map onto class method is code.

38
Figure 4.13: Class Diagram

39
4.10.2 Process View:
Process view shows the dynamic performance of system unlike other views it offerings how
system will perform, what are the constraints and how they communicate. Process view in
classified into 3 diagrams “activity”,” state machine” and lastly “Sequence”.

4.10.2.1 Activity diagram:


The figure 4.15 shows the working of application and in activity diagram every feature of
application has been discussed in the form of states. On homepage, recommended Diet plan
will be generated. There is a dishes tab so users can select for a desired product, view it and
add it. There are also some products that are visible on the homepage and different stores are
visible so that users can easily find what they want. There is also Workout tab so user can see
workout plan on daily basis. A flow diagram is a visualization of a sequence of actions,
movements within a system and decision points. They are detailed explanation of each step in
a process, no matter the level of complexity of that process. This is a map out process, so that
you can easily communicate it to users. You can also use them to define and analyze a
process, build a step-by-step picture of it, and then standardized and improve it. When
designing and planning a process, flowcharts can help you identify its essential steps and
simultaneously offer the bigger picture of the process. It organizes the task in chronological
order and identify them by types like process, decision and data.it is used to design and
document simple processes or program. Like other types of diagrams, they help visualize the
process. Two of the many benefits are flaws and bottlenecks become apparent. An activity
provides a view of the behavior
of a system by describing the sequence of actions in a process. Flowcharts typically use this
symbols like a process step is usually called an activity is donated as a rectangular box and a
decision is denoted as a diamond. Like other types of diagrams, they help visualize the
process. Two of the many benefits are flaws and bottlenecks become apparent. Flowcharts
typically use this symbols like a process step is usually called an activity is donated as a
rectangular box and a decision is denoted as a diamond. a diagram that depicts a process,
system or computer algorithm. They are widely used in multiple field to document, study,
plan, improve and communicate often complex processes in clear and easy to understand
diagrams. Flowchart sometime spelled as flow chart, use rectangles, ovals, diamonds and
potentially numerous other shapes to define the type steps, along with connecting arrows to
define flow and sequence. They can range from simple, hand-drawn charts to comprehensive

40
computer drawn diagrams depicting multiple steps and routes. They are the most common
diagrams on the planet.

41
Figure 4.15: Activity Diagram

42
4.10.2.2 Login Activity Diagram:
The figure 4.16 shows the login process of the application.

Figure 4.16: Login Activity diagram

4.10.2.3 Signup Activity Diagram


The figure 4.17 shows the login process of the application.

Figure 4.17: Signup Activity Diagram

43
4.10.2.4 Personal Info Activity Diagram:
The figure 4.18 shows the personal info process of the application.

Figure 4.18: Personal info Activity Diagram

4.10.2.5 Homepage Activity Diagram:


The figure 4.19 shows the home page activity of the application.

44
Figure 4.19: Homepage activity diagram

4.10.2.6 State machine:


The figure 4.20 shows the State machine diagram is dynamical behavior diagram that shows
the sequence state that an object or an interaction go through during its lifetime in response to
event.

45
Figure 4.20: State machine diagram

4.10.3 Sequence Diagrams:


Sequence diagrams are sequential picture of message between actor and matters. It is
illustrative representation of sensitive use cases with more details. It shows everything in a

46
sequence that is why it is named “Sequence Diagram”. It discusses more dynamic behavior of
the system and makes it more reasonable to students in figure 4.21.

4.10.3.1 Login Sequence:

The figure 4.21 shows the login sequence of the application.

Figure 4.21: Login Sequence

4.10.3.2 Register Sequence:


The figure 4.22 shows register sequence of the application.

47
Figure 4.22: Register Sequence

4.10.3.3 Graph Sequence:


The figure 4.23 shows the Sequence diagrams are sequential picture of message between
actor and matters. It is illustrative representation of sensitive use cases with more details. It

48
shows everything in a sequence that is why it is named “Sequence Diagram”. It discusses
more dynamic behavior of the system and makes it more reasonable to students.

Figure 4.23: Graph Sequence

4.10.3.4 Meal Data Sequence:


The figure 4.24 shows the Sequence diagrams are sequential picture of message between
actor and matters. It is illustrative representation of sensitive use cases with more details. It
shows everything in a sequence that is why it is named “Sequence Diagram”. It discusses
more dynamic behavior of the system and makes it more reasonable to students.

49
Figure 4.24: Meal Data Sequence

4.10.3.5 Workout Sequence:


The figure 4.25 shows the Sequence diagrams are sequential picture of message between
actor and matters. It is illustrative representation of sensitive use cases with more details. It
shows everything in a sequence that is why it is named “Sequence Diagram”. It discusses
more dynamic behavior of the system and makes it more reasonable to students. This
sequence shows the work functionality and how it works.

50
Figure 4.25: Workout sequence

4.10.3.6 Share application sequence:


The figure 4.26 shows the Sequence diagrams are sequential picture of message between
actor and matters. It is illustrative representation of sensitive use cases with more details. It
shows everything in a sequence that is why it is named “Sequence Diagram”. It discusses
more dynamic behavior of the system and makes it more reasonable to students. This
sequence shows how the application with users in.

51
Figure 4.26: share application sequence

4.10.3.7 Diet plan sequence:


The figure 4.27 shows the Sequence diagrams are sequential picture of message between
actor and matters. It is illustrative representation of sensitive use cases with more details. It
shows everything in a sequence that is why it is named “Sequence Diagram”. It discusses
more dynamic behavior of the system and makes it more reasonable to students. This
sequence shows the how this application generates the diet plans.

52
Figure 4.27: diet plan sequence

4.10.4 Development View:


Development architecture concentrate on the real software module organization in the
software development domain. Software is packed in small chunks, subsystem or program
libraries developed by one or little number of developers.

4.10.4.1 Component diagram:


The figure 4.28 shows the component diagram shows all the components of the application
like diet, info, workout and others. The diagram shows the components in a sequence of the
application flow. Every component is shown in a box and connected through lines to show
the flow of application.

53
Figure 4.28: Component Diagram

4.10.5 Physical view:


Physical view architecture takes into explanation primarily the non-functional requirements
of system such as reliability, availability, scalability, performance.

4.11 Summary:
In this Chapter, we profoundly examined 4+1 plan model and how it helps various associates
of the system. Three of these four physicals, legitimate, advancement sees are static view and
just one interaction is dynamic. This does not imply that the static perspectives are of no
utilization they come in extremely convenient in code so, it is a finished plan model with all
parts of various perspectives so it helps each one end client, designer, PC specialist and
integrators. This system additionally determines what system configuration is? Why it is
significant? What's more, for whom is planned? In this section, every one of the responses to
this Chapter can be found.

54
CHAPTER 5

IMPLEMENTATION
5 Introduction:
In this chapter, how the modules of the system are working is discussed. In this chapter each
module is discussed briefly that how it is working and how it is integrated with other modules
to make the system work correctly.
The functionality of system, libraries and their details are defined completely in this chapter.

5.1 Modules:
Modules are the main functionalities of an application. In this section the modules present in
the application are discussed. By integration, all modules together form a complete
application there are following modules used in the app.

5.1.1 Login Module:


In this module, we have the authentication of the system. In this a user must authenticate
before using the other functionalities. Users must pass the authentication process by entering
the correct email and password. User will get access after he entered the correct password and
email otherwise system won’t allow user to use the other functionalities of the system.

5.1.2 Signup Module:


If a user does not have an account in the app than this module helps the user to create an
account in the app. An email and password is requires to create an account in the app. Once
user register successfully the user will navigate to login page.

5.1.3 Personal info gathering Module:


In this user enters his basic information like age, weight, height. This module gathers the
basic information of the users.

5.1.4 Food choices:


In this module user selects his food preferences whether it is veg or non-veg and pork free
and other basic food choices

5.1.5 Diet plan:


In this module the diet plan of the user according to his preferences is generated. The diet
plan includes the breakfast, lunch and dinner.

5.1.6 Workout:
In this module user can explore the various workouts. It includes workouts for weight gain,
weight loss, chest workout, leg workout etc.

56
5.1.7 Dishes:
In this module user can explore many dishes. The dishes can help in managing diet and in
cooking a hygienic and healthy food.

5.1.8 Graphs:
In this module user can see his weight graph and the BMI graph, which help in understanding
the obesity levels.

5.2 Framework:
Frameworks are the core technologies in which an application is being developed. There are
following frameworks are used in the app.

5.2.1 Flutter:
Flutter is an open-source UI software development kit created by Google. It is used to
develop cross platform applications for Android, iOS, Linux, macOS, Windows, Google
Fuchsia, and the web from a single codebase. First described in 2015, Flutter was released in
May 2017
There are many libraries used in this system. Here are all the libraries given below.

5.3 Libraries:
In this section we discuss about the libraries of application.
5.3.1 Firebase-database:
This library is used for database integration and for using database operations in the app. It is
the library of Firebase database for android. It is available for both android and iOS.

5.3.2 Get
Get X is an extra-light and powerful solution for Flutter. It combines high-performance
state management, intelligent dependency injection, and route management quickly and
practically [4].

5.3.3 Path-provider:
A Flutter plugin for finding commonly used locations on the file system. Supports android,
iOS, Linux, MACOS and Windows. Not all methods are supported on all platforms [5].

5.3.4 Cache network images:


A flutter library to show images from the internet and keep them in the cache directory [6].

5.3.5 Front awesome flutter:

57
The Font Awesome Icon pack available as set of Flutter Icons [7].
Based on Font Awesome 6.1.0. Includes all free icons:

 Regular
 Solid
 Brands

5.3.5.1 Bottom Navy Bar:


A beautiful and animated bottom navigation. The navigation bar use your current theme, but
you are free to customize it.

5.3.5.2 Local Auth:


This Flutter plugin provides means to perform local, on-device authentication of the user.
On supported devices, this includes authentication with biometrics such as fingerprint or
facial recognition [8].

5.4 Summary:
In this chapter we have discussed about how we implemented this project and what
challenges we faced during implementation. All the modules implemented in the application
are discussed that how and for what purpose they have been implemented. What kind of
framework has been used and which type of libraries used for implementation of the system.

58
CHAPTER 6

RESULT/TESTING, ANALYSIS AND


VALIDATION
6 Introduction:
The following chapter contains the testing explanation of the system. The methodologies for
testing and techniques for testing are explained. How this system is tested and what test cases
are performed in testing. The black box, white box, and integration testing and techniques are
utilized to examine the functionality of the application. A table is made to explain a test case
briefly.

6.1 Testing Methodology:


Testing methodology is methods or techniques that will be used to perform the testing.
Testing is performed for test an application that is the application working fine or there are
some errors or bugs present to disturb the functionality of the system. In testing of this
application, the methodology is used that each functionality of the system will be test by
giving an input to each module and its output will be monitored. Each test case will have its
complete record in a table for example, when this test case is performed, what was the input
and what was the output etc. After testing each module, integration testing will be performed
by integrating each module one by one and see after integrating all modules if an error occurs
in the complete system by running the full functionality of the system.

6.2 Test Bed:


Test bed is method in which testing is performed. For performing the tests, a test bed required
and for test bed some specific software, hardware and operating systems are required. In our
case testing can be performed on a laptop or PC with windows 8 or greater, minimum 4 GB
RAM, a coding cli and android studio. It is also performed on android device greater the
android 6 and minimum 1 GB RAM.

6.3 Test Cases:


Testing of a system is important because it helps us to improve the quality of the system. To
perform the testing, we made test case of each test for testing each situation. Each test case
has different properties like test case id, test case date, revision history, environment,
objectives, and assumptions etc. When a test is performed, who perform it is also written in
its properties. Test cases also have a property called pass/fail. When a test is performed if its
functionality work fine or its expected goal is met than it called pass and if its expected goal
is not met than it called fail. So, if a test case fails, we have to check for errors or bugs to
improve the functionality.

60
6.3.1 Test Case of signup:
The table 6.1 describes Signup functionality is used for registering a new user in the app. For
registering a new user, you have to input an email and a password then click on signup
button. This test case is for simply entering the require information and registering a new
user.

Table 6.1: Test Case of Signup

ID of Test Case Reference of Quality Name


Use Case Assurance
Engineer
TestCase-01 UseCase-02 Tester of Muhammad Ashhar
software
Date of Test 1-2-2022

Revision History None

Objective User wants to sign up to the system.

Environment Android Emulator.

Assumptions User signup successfully.

Pre-Requisite Signup page is displayed.

Step No. Description of Result of Procedure


Execution

1 The following user Signup page is displayed.


clicks on create an
account link.

2 The user entered Email and password entered


correct password and successful in the text input.
email in text input.
3. User signup by Successfully sign in
Clicking on sign up
button

61
Comments

The user gets navigate to login screen.

Test case status


 Passed Failed Unexecuted

6.3.2 Test Case of Login:


The table 6.2 describes the following Test Case user must enter its password and email in the
text input and press the button of login.

Table 6.2: Test Case of Signup

ID of Test Case Reference Quality Name


of Use Assurance
Case Engineer

TestCase-02 UseCase-01 Tester of software Muhammad Ashhar

Date of Test 1-2-2022

Revision History None

Objective User wants to login to the system.

Environment Android Emulator.

Assumptions User login successfully.

Pre-Requisite User is at login page.

Step No. Description of Result of Procedure


Execution

1. The user entered Email and password entered successful


correct password and in the text input.
email in text input.

62
2. User login by Successfully logged in
Clicking on login
button

Comments

A personal info has been displayed when user logged in.

Test case status


 Passed Failed Unexecuted

6.3.1 Test Case of Profile info:


The table 6.3 describes the following Test Case app gets the personal information.
Table 6.3: Test Case of Location

ID of Test Case Reference Quality Name


of Use Case Assurance
Engineer

TestCase-03 UseCase-07 Tester of software Muhammad Ashhar

Date of Test 1-2-2022

Revision History N/A

Objective System gets the personal information from the user.

Environment Android Emulator.

Assumptions System gets user Info successfully.

Pre-Requisite A personal info has been displayed.

Step No. Description of Execution Result of Procedure

63
1. The user presses the System gets the personal information
login button to get the
personal info screen

Comments

The user navigates to Food choices page after this.

Test case status


 Passed Failed Unexecuted

6.3.2 Test Case of Food choices:


The table 6.4 describes the following test case user have select the foods category and click
on next.
Table 6.4: Test Case Vehicle Info

ID of Test Case Reference Quality Name


of Use Case Assurance
Engineer

TestCase-04 UseCase-08 Tester of software Muhammad Ashhar

Date of Test 1-2-2022

Revision History N/A

Objective The user selects the foods category and system have to save it
into database without any error.

Environment Android Emulator.

Assumptions System stores the information successfully.

Pre-Requisite A food choice displayed in user’s screen.

64
Step No. Description of Result of Procedure
Execution

1. The user selects the Information entered successfully.


foods category

2 The user clicks on next Info stored successfully in DB.


button

Comments
The user navigates to home page.

Test case status


 Passed Failed Unexecuted

6.3.3 Test Case of Diet plan:


The table 6.5 describes this user, get recommended Diet plan from home page. The user gets
his/her diet plans upon his/her personal information.
Table 6.5: Test Case Search

ID of Test Case Reference Quality Name


of Use Case Assurance
Engineer

TestCase-05 UseCase-03 Tester of software Muhammad Sufian

Date of Test 1-2-2022

Revision History None

Objective The user gets recommended Diet plan

Environment Android Emulator.

Assumptions System retrieves the result on run time.

Pre-Requisite The user is on home page

65
Step No. Description of Result of Procedure
Execution

1. The user gets diet System starts giving result on run


plan time.

Comments
The user can click on any Diet plan product, and it will open its details.

Test case status


 Passed Failed Unexecuted

6.3.4 Test Case of Home Screen:


The table 6.6 describes this user open home screen all daily and weekly Diet plans displayed
in a list.

Table 6.6: Test Case of Store Screen

ID of Test Case Reference Quality Name


of Use Case Assurance
Engineer

TestCase-06 Unknown Tester of software Muhammad Sufian

Date of Test 1-2-2022

Revision History None

Objective The user clicks on home button from tab navigation at the
bottom.

Environment Android Emulator.

Assumptions System should retrieve all stores from database.

Pre-Requisite The user is on home screen.

66
Step No. Description of Result of Procedure
Execution

1. The user clicks on System retrieves all stores from


home button. database.

Comments

The user can click on home button to see the list of Diet plans retrieve from the database.

Test case status


 Passed Failed Unexecuted

6.3.5 Test Case of Dishes:


The table 6.7 describes the following test case user click on Dishes tab from homepage to
view its details. The user can click on any workout from anywhere in the tab and it will
navigate the user to its details page.

Table 6.7: Test Case of View Product

ID of Test Case Reference Quality Name


of Use Assurance
Case Engineer

TestCase-07 UseCase-04 Tester of software Muhammad Sufian

Date of Test 1-2-2022

Revision History None

Objective The user clicks on Dishes to view its details.

Environment Android Emulator.

Assumptions System should display details of Dishes tab.

67
Pre-Requisite The user is on home screen or any screen

Step No. Description of Result of Procedure


Execution

1. The user clicks on System navigates the user to Dishes


Dishes. details page, but details was not correct.

Comments

The user navigates to details page, but it was not showing the correct details.

Test case status


Passed Failed Unexecuted

6.3.6 Test case of Dishes (Fixed):


The table 6.8 describes the previous test case app was not giving correct details of the project.
Now after fixing it is giving correct details of Dishes tab.

Table 6.8: Test case of Dishes

ID of Test Case Reference Quality Name


of Use Assurance
Case Engineer

TestCase-08 UseCase-04 Tester of software Muhammad Sufian

Date of Test 1-2-2022

Revision History N/A

Objective User clicks on Dishes to view its details.

Environment Android Emulator.

Assumptions System should display details of Dishes tab.

68
Pre-Requisite The user is on home screen or any screen.

Step No. Description of Result of Procedure


Execution

1. The user clicks on System navigates the user to Dishes


Dishes. details page with correct details.

Comments

The user navigates to details page with correct details and now user can click to add Dishes.

Test case status


 Passed Failed Unexecuted

6.3.7 Test case of Workout:


The table 6.9 describe the following test case workout test case is described. In this user click
to see work out details in the app.

Table 6.9: Test case of Workout

ID of Test Case Reference Quality Name


of Use Assurance
Case Engineer

TestCase-09 UseCase-05 Tester of software Nauman Rasheed

Date of Test 1-2-2022

Revision History None

Objective The user clicks on Workout tab to see details.

Environment Android Emulator.

69
Assumptions The user clicks on Workout tab to see details.

Pre-Requisite The user is on Workout screen or any screen where there are
workout.

Step No. Description of Result of Procedure


Execution

1. The user clicks on Work out details are shown in screen.


‘workout’ button.

Comments

The user select different workout plans on workout tab to see details.

Test case status


 Passed Failed Unexecuted

6.4 Summary:
Testing is the important part of software development. Testing improves the quality of the
system by addressing errors and bugs. In this chapter complete testing of the system is
performed. Testing is performed by testing each functionality of the system. For testing each
functionality of the system, we design test cases for each test that is performed on the system.
Each test case is briefly described in this chapter.

70
CHAPTER 7

CONCLUSION AND FUTURE WORK


7 Introduction:
In the following chapter the conclusion and future working of the project is described briefly.
It also tells that what module do what and it also tells the limitations of the system. In other
words, it is the conclusion of the whole project. It tells about what improvements will be
made in future by developers. It also tells that what system cannot do now and could done in
near future.

7.1 Overview of System:


The app starts with login after that user is asked about basic information like gender, age,
weight etc. after that user is asked about his daily life routine. In next step user is asked about
his food choices. After acquiring all this information the system generates the diet plan for
the user and go on homepage. The user can see his recommended diet plan for a week on
homepage. The dishes tab can be used to explore many new dishes. The workout tab shows
different workouts for weight loss and weight gain. The setting tab allows the user to
customize the app like dark mode ad also allow the user to change the profile information.

7.2 Milestone Achieved:


The following milestones have achieved until now.
7.2.1 Android Based Application Development:
Milestone achieved during the development of android-based application are
7.2.1.1 Login:
In this user can login the system by entering its email and password and by clicking on login
button.

7.2.1.2 Signup:
In this a new user can register in the app by inputting its details and click on signup button.
7.2.1.3 Personal info:
In this user gives his basic info like weight, height, gender.
7.2.1.4 Food choices:
In this user can select whether he wants to eat veg or non-veg and many other choices.
7.2.1.5 Diet plan:
All acquired information is used to generate the diet plan for the specific person using AI.

7.2.1.6 Workout:

72
In this tab user can see different type of workouts like workout for chest, legs, muscles etc.
The weight-losing workout, weight gaining workout, fitness workout.

7.2.1.7 Dishes:
In this different types of dishes are stored which can be used to cook food.
7.3 Limitations:
There are some limitations in the application that we developed such as it cannot handle the
diets for patients and children. The system cannot add Diet plan manually.

7.4 Future Work:


In future our app will be able to generate the diet plan for Patients specifically for heart and
blood pressure patients and it will also show workout graphs.

Our app in future will be able to contact the user with real time consultant via text or call.

7.5 Summary:
The project, android-based application for Diet Plan. The android user can easily access this
application for Diet plan. The application would provide the facility that the user can get
recommended Diet plans. This application also provides the facility of Workout option.
Limitation of this application are also discussed in this chapter and Future work including
generate the diet plan for Patients.

73
7.6 APPENDICES

7.7 Appendix I – User Manual

7.7.1 Login Page


When user open the app if he is not logged in this page is shown to the user. User can enter hi
details and click on login to login in the app.

7.7.2 Signup Page


If user want to register in the app user can enter its details and click on signup to register in
the app.

7.7.3 Personal info page


Users have to enter the personal information like age, height weight, food choices etc. and
then next to diet plan.

7.7.4 Home Page


In home page the 7 days diet plan of user is displayed and in the bottom of homepage the bar
contains the tabs of workout, dishes and setting. There is also a homepage button which can
be used to come back to the homepage. The top of the homepage also shows the calendar.

7.7.5 Workout Page


This Page contains all the workouts like weight gain, weight loose, leg workout, arm
workout. All the workouts contain the description and timer

7.7.6 Dishes
The Dishes page contain different type of dishes, which help in getting ready the diet, which
is recommended by the system.

7.7.7 Setting
This page contains all the setting of the applications like mode change. It also contains the
BMI calculator, BMR calculator and weight graph.

74
7.8 Appendix II – Glossary
Android App Development

The IDE used to develop this app is a frontend of the app is developed with dart using
the flutter framework and firebase is use as the database to configure the user data.
Process View
The process architecture views describe the system’s processes.
Firebase Database
Firebase is called a database and it is important to store data of mobile apps. This platform is
developed by google and it stores data in JSON format.
Project Feasibility

A feasibility study takes all the factors that are related to the project like budget, cost,
time, unlike the project is feasible or not within a time.
Test Bed
Test bed is method in which testing is performed. For performing the tests, a test bed required
and for test bed some specific software, hardware and operating systems are required.

75
REFERENCES
1. Google, "Home. flutter.dev.," [Online] 2015.. [Online]. Available:
https://flutter.dev/?
gclid=CjwKCAiA4veMBhAMEiwAU4XRrwX8F9BLMQ5eQ68TATe9pVni.
2. "firebase.google.com," 2011.. [Online]. Available: https://firebase.google.com/?
gclid=CjwKCAiA4veMBhAMEiwAU4XRr5BilfXs8d09t9jUBGH.
3. "python.org," 20 February 1991. [Online]. Available: https://www.python.org/.
4. Google, "pub.dev," Google, [Online]. Available: https://pub.dev/packages/get/install.
5. Google, "Pub.dev," Google, [Online]. Available: https://pub.dev/packages/get/install.
6. Google, "pub.dev," Google, [Online]. Available:
https://pub.dev/packages/cached_network_image.
7. Google, "pub.dev," Google, [Online]. Available:
https://pub.dev/packages/font_awesome_flutter.
8. Google, "pub.dev," Google, [Online]. Available: https://pub.dev/packages/local_auth.

76

You might also like