0% found this document useful (0 votes)
215 views56 pages

Cattle Farm Management App

This document describes a web application project for cattle farm management. It aims to help farmers manage data like medical records, production and feeding of different animals. The project involves problem definition, requirements analysis, design and implementation. Key features include storing animal records, generating health alerts and calculating profit/loss.

Uploaded by

irfan khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
215 views56 pages

Cattle Farm Management App

This document describes a web application project for cattle farm management. It aims to help farmers manage data like medical records, production and feeding of different animals. The project involves problem definition, requirements analysis, design and implementation. Key features include storing animal records, generating health alerts and calculating profit/loss.

Uploaded by

irfan khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

IQRA National University, Peshawar

Cattle Care Farm


(Web Application)

By

Muhammad Asif (16950) INU/SP09-BCS-xxx/ISB


Muhammad Ilyas (15392) INU/SP09-BCS-xxx/ISB

Supervisor
MR. IRFAN ULLAH KHAN

Bachelor of Science in Computer Science (2019-2023)

The candidate confirms that the work submitted is their own and appropriate
credit has been given where reference has been made to the work of others.
IQRA National University, Peshawar

Cattle Care Farm

A project presented to
IQRA National University, Peshawar

In partial fulfillment
of the requirement for the degree of

Bachelor of Science in Computer Science (2019-2023)

By

Muhammad Asif (16950) INU/SP09-BCS-xxx/ISB


Muhammad Ilyas (15392) INU/SP09-BCS-xxx/ISB

2
DECLARATION
We hereby declare that this software, neither whole nor as a part has been copied out from any
source. It is further declared that we have developed this software and accompanied report
entirely on the basis of our personal efforts. If any part of this project is proved to be copied
out from any source or found to be reproduction of some other. We will stand by the
consequences. No Portion of the work presented has been submitted of any application for any
other degree or qualification of this or any other university or institute of learning.

Muhammad Asif (16950) Muhammad Ilyas (15392)


--------------------------- ---------------------------

3
CERTIFICATE OF APPROVAL
It is to certify that the final year project of BS (SE) “Project title” was developed by
Muhammad Asif (15392) (INU/FAXX-BCS/SE/TN-000) and Muhammad Ilyas (15392)
(INU/FAXX-BCS/SE/TN-000) under the supervision of “Mr. Irfan Ullah Khan” it is fully
adequate, in scope and quality for the degree of Bachelors of Science in Software Engineering.

---------------------------------------
Supervisor

---------------------------------------
External Examiner

---------------------------------------
Head of Department
(Department of Computer Science)

4
Executive Summary

In modern life, people are faced with many problems, where the most common off is the
inability of a person to remember a large amount of data and lack of space for storing that data
in files. Cattle farms in different areas are working without properly managing their data or
without having any systematic record of data. In these farms when they don’t manage things,
they get great losses Cattle farmers are facing this problem of not having a proper system that
can help them in managing their farm activities. So, those who have animals in large numbers
usually find it difficult to track the production and performance of cattle. This surprisingly
affected the feed consumption and feed wastage ratio in these farms.

This can lead to serious consequences like decrease in production rate and loss of resources.
Other common side effects include constantly decreasing weight of animal and consistent
spread of diseases
.
The aim of this application is to facilitate farmer by calculating farm data automatically in the
system. This system will show medical record, yield and feed records of different animals.
By using this system user can store data of different animals.

Therefore, it is very important to manage that data in a systematic way that can help in
preventing losses. This system is a web-based project that will help in storing record of each
animal, generate alerts if an animal is looking unhealthy and calculate profit and loss.

5
Acknowledgement
All praise is to Almighty Allah who bestowed upon us a minute portion of His boundless
knowledge by virtue of which we were able to accomplish this challenging task.

We are greatly indebted to our project supervisor “Mr. Irfan ullah khan” Without their personal
supervision, advice and valuable guidance, completion of this project would have been
doubtful. We are deeply indebted to them for their encouragement and continual help during
this work.

And we are also thankful to our parents and family who have been a constant source of
encouragement for us and brought us the values of honesty & hard work.

Muhammad Asif (16950) Muhammad Ilyas (15392)


--------------------------- ---------------------------

6
Abbreviations
JS JavaScript

DB Database

ES7 European Computer Manufacturers Association Script

IDE Integrated Development Environment


OS Operating System
HTML Hypertext Markup Language
CSS Cascading Style Sheet

7
Table of Contents
1 Introduction .................................................................................................................... 12

1.1 Brief ......................................................................................................................... 122


1.2 Relevance to Course Modules ................................. Error! Bookmark not defined.4
1.3 Project Background ................................................................................................. 155
1.4 Literature Review ........................................................................................................ 155
1.4.1 Related work ..................................................................................................... 156
1.5 Analysis from Literature Review (in the context of your project) .......................... 199
1.6 Methodology and Software Lifecycle for This Project ............................................. 20
1.6.1 Software development life cycle .......................................................................... 20
1.6.2 Incremental model ............................................................................................... 21
1.6.3 Rationale behind Selected Methodology ............................................................. 22

2 Problem Definition ......................................................................................................... 23

2.1 Problem Statement .................................................................................................... 23


2.1.1 Proposed system................................................................................................... 23
2.1.2 Solution to the problem........................................................................................ 24
2.1.3 Goal and Objectives ............................................................................................. 24
2.1.4 Scope .................................................................................................................... 24
2.1.5 Benefits ................................................................................................................ 24

2.2 Deliverables and Development Requirements .......................................................... 25


2.3 Current System (if applicable to your project) .......................................................... 25
3 Requirement Analysis .................................................................................................... 27

3.1 Use Cases Diagram(s) ............................................................................................... 27


3.1.1 Use case Diagram for admin ................................................................................ 28
3.1.2 Use case Diagram for farmer ............................................................................... 28
3.2 Detailed Use Case ..................................................................................................... 30
3.3 Functional Requirements........................................................................................... 31
3.4 Non-Functional Requirements .................................................................................. 32
4 Design and Architecture ................................................................................................ 34

4.1 System Architecture .................................................................................................. 34


4.2 Data Representation [Diagram + Description] .......................................................... 35
4.3 Process Flow/Representation .................................................................................... 39
4.3.1 Process flow diagram for admin .......................................................................... 39
4.3.2 Process flow diagram for farmer.......................................................................... 40
4.4 Design Models [along with descriptions].................................................................. 41
5 Implementation .............................................................................................................. 42

5.2 External APIs ............................................................................................................ 42


5.3 User Interface ............................................................................................................ 42
6 Testing and Evaluation .................................................................................................. 50
8
6.1 Manual Testing .......................................................................................................... 50
6.1.1 System testing ...................................................................................................... 50
6.1.2 Unit Testing ......................................................................................................... 50
6.1.3 Functional Testing ............................................................................................... 52
6.1.4 Integration Testing ............................................................................................... 53
6.2 Automated Testing: ................................................................................................... 53
Tools used: .......................................................................................................................... 53
7 Conclusion and Future Work ....................................................................................... 54

7.1 Conclusion................................................................................................................. 54
7.2 Future Work .............................................................................................................. 54
8 References ....................................................................................................................... 55

9
List of Figures
Fig 1.1 cattle Max…………………………………………………………………………… 16
Fig 1.2 My farm livestock ....................................................................................................... 17
Fig 1.3 My farm breeders ........................................................................................................ 18
Fig 1.4 Nedap web app............................................................................................................ 19
Fig 1.5 SDLC model ............................................................................................................... 20
Fig 1.6 Incremental model ....................................................................................................... 21
Fig 2.1 CattleMax ................................................................................................................... 26
Fig 3.1 Use case admin ............................................................................................................ 27
Fig 3.2 Use Case Farmer .......................................................................................................... 28
Fig 4.1 system architecture ...................................................................................................... 34
Fig 4.2 sequence admin............................................................................................................ 35
Fig 4.3 sequence farmer first ................................................................................................... 36
Fig 2.1 sequence farmer second .............................................................................................. 37
Fig 2.1 process flow diagram for admin ................................................................................. 39
Fig 2.1 process flow diagram for farmer ................................................................................. 40
Fig 2.1 class diagram ............................................................................................................... 41
Fig 5.2 Home page .................................................................................................................. 43
Fig 5.3 Services ....................................................................................................................... 43
Fig 5.4 offers ........................................................................................................................... 44
Fig 5.5 about offers ................................................................................................................. 44
Fig 5.6 Footer .......................................................................................................................... 45
Fig 5.7 Login page ................................................................................................................... 45
Fig 5.8 registration page ........................................................................................................... 46
Fig 5.9 Farmer dashboard ........................................................................................................ 46
Fig 5.10 Add animal ................................................................................................................ 47
Fig 5.11 Animal list ................................................................................................................ 47
Fig 5.12 Edit animals .............................................................................................................. 48
Fig 5.13 Delete animals .......................................................................................................... 48
Fig 5.14 Animals details ......................................................................................................... 49
Fig 5.15 Feed list .................................................................................................................... 49
Fig 5.16 Admin dashboard ...................................................................................................... 50
10
List tables
3.1 Signup ......................................................................................................................... 30
3.2 Manage animals .......................................................................................................... 30
3.3 Scan ear tag ................................................................................................................. 30
3.4 Subscriber offer .......................................................................................................... 30
3.5 Efficiency.................................................................................................................... 32
3.6 Learnability................................................................................................................. 32
3.7 Maintainabiltiy............................................................................................................ 33
6.1 New user registration testing ...................................................................................... 50
6.2 Client login testing...................................................................................................... 51
6.3 New animal add testing .............................................................................................. 52
6.4 Admin login ................................................................................................................ 53
6.5 Automated testing tool................................................................................................ 53

11
1 Introduction
Cattle have long been a very important component of many farming systems. They are used
for the production of milk, dairy products like cheese, butter, ghee, cream, meat, etc. Which is
a very important source of good health as well as good income for a number of families.

As the population is growing very fast, this business is also growing at a very rapid rate. So,
understanding the needs of cattle farmers we have designed a website that can play a vital role
in their business. The project cattle care farm system is a web-based application that allows the
farmer to handle all the activities online like add animal feed and yield records

Using Interactive GUI anyone can quickly learn to use the complete system. Using this, the
farmer doesn’t have to sit and manage the entire activities on paper and at the same time, the
head will feel comfortable to keep check of the whole system just with the availability of the
internet. This system will give him the power and flexibility to manage the entire system from
a single online portal.

1.1 Brief
Many cattle farms in different countries are working without properly managing their data or
without having any systematic record of data. In these farms when they don’t manage things,
they get great losses. The methodology of these farmers is traditional and they are not aware
of the downfall that is caused at some stage. This not only causes loss to these farmers but also
discourages those people who are willing to have a business of cattle like them. The downfall
of large farms also causes the decrease in milk production which then results in shortage of
milk in the market and increased prices of milk.

The cattle are important for human beings because they provide us milk which is nutritious.
Therefore, it is important for the human to take care of them and keep them healthy so the
quality of the milk should not be affected. If we don’t give importance to it then it will become
a cause of spreading diseases in animals as well as low production rate. For this purpose,
different vaccines have been introduced which helps animals in not getting affected by different
diseases but injection of these vaccinations should be done on time. The profit, loss, production
and animal health are the main factors that every cattle farmer wants to monitor.
12
Cattle Care is a web-based application that is designed to assist cattle farmers in data
management of animals like goat, buffalo and cow. This system allows farmers to make their
Farm’s profile and enter all the data of their cattle, every animal will be assigned a specific ID
and that will be written on ear tag of animal. Data of animals can be entered against their id by
scanning tag or manually entering id. Farmer can also check details of animal by scanning tag
or entering id manually.

This system will use tesseract JS library to recognize digits on tags. The system is all about
management, monitoring and analysis of farm’s input and output. It allows farmers to scan tags
by using camera of any mobile, tablet or computer so the farmers can easily enter tags. Farmers
can choose the subscription of their own choice depending upon their needs and requirements.
There are three main categories of subscription i.e., Silver, Gold and Platinum. In Silver
category farmer can register only 100 animals’ data, in gold category farmer can enter 300
animals’ data and in Platinum Category farmer can register unlimited animals. First farmer
must subscribe one subscription mentioned above then he can avail facilities. Before ending
subscription, he will be notified then he can subscribe any offer again. Online payment method
available for subscription is Stripe.

This system supports two types of users, these are admin and farmer. An admin is able to view
new users to system, website traffic, sales, website performance and graphs of all these stats.
Whereas, the farmers will be able to insert add animal feed and yield records. A graphical form
of the statistics will be visible to farmer which will include feed consumption, yield production,
weight gain or loss and profit or loss.

1.2 Relevance to Course Modules


Our project is related to many courses that we studied during BCS are as follows.

1.2.1 Software engineering

Software engineering is associated with development of software product. It helps us to build


our system using well-defined scientific principles, methods and procedures. The outcome of
software engineering is an efficient and reliable software product.
13
1.2.2 Human computer interaction (HCI)

HCI focuses on designing, implementing, and evaluating interactive interfaces that enhance
user experience using computing devices. This includes user interface design, user-cantered
design, and user experience design. HCI help us to designing interactive computer interfaces
that satisfy users’ needs.

1.2.3 Project management

Project management help us in planning, scheduling, budgeting, execution, and delivery of our
software system. Project management ensure the successful completion of all software projects
and also oversee the people performing work on the projects.

1.2.4 Database

Database are used to store data, and every software has lots of data and for managing this data
we need a database. User enters data in software in unstructured form, but database will manage
this data in structured format. Database provide output in structured format. That is easy to
understand by users. We used MongoDB database for storing data. MongoDB database has a
flexible data model that enables us to store unstructured data, and it provides full indexing
support, and replication with rich and intuitive APIs

1.2.5 Software verification and validation

Due to Verification and Validation process, we investigate that a software system satisfies
specifications and standards and it fulfils the required purpose.
A few verification methods are used to check system are inspection, code review, desk-
checking, and walkthroughs. A few widely-used validation methods are black box testing,
white box testing, integration testing, and acceptance testing.

1.2.6 Software design and architecture

Software architecture exposes the structure of our system while hiding the implementation
details. Architecture also focuses on how the elements and components within a system interact
with one other. Software design delves deeper into the implementation details of the system.

14
1.2.7 Data structure

A data structure is used to store and organize data. It is a way of arranging data on a computer
so that it can be accessed and updated efficiently. A data structure is not only used for
organizing the data. It is also used for processing, retrieving, and storing data. We have used
data structure to store and organize data.

1.3 Project Background

There are a lot of cattle care management system available on the internet. Such as CattleMax,
Nedap and My Farm. These systems are very old system which store data about animals. These
application offers functionality related to cattle. However, there are still some problems faced
by the farmers these applications store a lot of unnecessary data and some applications does
not store information about yield and feed. So, we decide to build a cattle care system that
support multiple animals and store information about animals, feed and yields. Cattle care
system allow farmers to scan tag by using camera of mobile and tablets. Cattle care system will
show the progress of each animal regarding feeds and overall statistics of farm.

1.4 Literature Review


There are not many applications designed for managing cattle data, most of the applications on
internet are about farm management which includes information about crops etc. But there are
some of the applications that provide functionality related to cattle, which include CattleMax,
My Farm, Nedap etc. Most of these applications are desktop based and are old fashioned. The
applications are not user friendly and it is very difficult for new users to navigate on the system.

On the other hand, these systems gather a lot of un-necessary data and does not gather
information that is needed. Cattle Care is the system that will provide users ease of access, 24/7
availability on internet because it is web-based application, also the application will avoid
requiring un-necessary data that is not needed. The website will be user friendly and will not
require tutorials like other applications having 1+ hour tutorial for users to understand their
system.

15
1.4.1 Related work
1.4.1.1 CattleMax

Figure 1.1 CattleMax


CattleMax is a very old system which has support for cow, bull and calves’ data storing. It
stores the information about breeding and medical. The system has feature of saving
information like active or sold animals and calving etc. Unlike cattle care system the
application does not support entering data of feed and yield, showing progress of each animal
regarding these feeds and overall statistics of farm.

16
1.4.1.2 My Farm

Figure 1.2 My farmer app

17
Figure 1.3 My farmer app

My Farm is an application available on playstore which provides the functionality of storing


animal records. After installation of application, we have found that during sign up for the
application the animal type is requested which does not allow you to add records of multiple
type of animals on one account. For example, there will be separate accounts for rabbits and
goats as given in both pictures. The app does not give option for selecting cow or buffalo. The
app is more than two years old and still due to erroneous data like not working functionalities
and deletion of records by itself; it is rated 3.2 on playstore

18
1.4.1.3 Nedap

Figure 1.4 Nedap


Nedap is a desktop-based application which is used for calculating production, reproduction,
herd and health. The system is paid and requires manual installation therefore we were not able
to get an overview of the system so we have collected data from their website and some other
sources. By our research we have found that the system is supporting production side only. It
has no support for keeping health and feed records. The system supports only two types of
animals which are pigs and cows. It does not have any support for entering other animals like
goats and buffaloes.

1.5 Analysis from Literature Review (in the context of your project)
There are many applications designed for managing cattle farm. Most of the application on the
internet is about cattle farm management. These applications provide functionality related to
cattle. These applications include cattleMax, My farm and Nedap etc. Most of these
applications are old fashioned and are not user friendly it is very difficult for new user to use
the system. On the other hand, these applications gather a lot of unnecessary data. While cattle
care farm is the system that will be user friendly and provide users ease of access, 24/7
availability on internet, also the application will avoid requiring unnecessary data that is not
needed. The system is all about management, monitoring, and analysis of the farm’s input and
output. It allows farmers to scan tags by using a camera of any mobile, tablet, or computer so
the farmers can easily enter tags.

19
1.6 Methodology and Software Lifecycle for This Project
1.6.1 Software Development Life Cycle

Figure 1.5 Software development life cycle model


Software Development Life Cycle (SDLC) is a process used by the software industry
to design, develop and test high quality software. The SDLC aims to produce a high-
quality software that meets or exceeds customer expectations, reaches completion
within times and cost estimates. In our project we used Software Development Life
Cycle in our Event’s Club application, first phase is Planning phase, Second Phase is
Analysis phase, Third Phase is Design Phase, Fourth Phase is Development Phase after
Development Phase we have to test our project by Testing team and again goes through
Development phase and repeat this process again. It is repeating process. It is also
called as Software Development Process. SDLC is a framework defining tasks
performed at each step in the software development process.

1.6.2 Incremental model

We have used incremental model approach to develop this project. The reason behind
using incremental approach is: It generates working software very quickly and early
during the software development life cycle. This model is more flexible – less costly

20
to change the scope of requirements. It is easier to test and debug during a smaller
iteration. In this model customer can respond to each built [16].

Figure 1.6 Incremental Model

1.6.2.1 Requirement Analysis


Requirement elicitation was mostly done by exploring the current cattle care system
and searching for the farmer’s needs. We have discussed the functionality with different
people and with the colleagues. After we have gathered all our requirements then we
research on the implementation of those features which we wanted to be in the system.

1.6.2.2 System Design

The requirement specifications from first phase are studied in this phase and the
system design isprepared. This system design helps in specifying hardware and
system requirements and helps in defining the overall system architecture.

1.6.2.3 Coding and Implementation

With inputs from the system design, the system is first developed in small programs called
units,which are integrated in the next phase.
For the implementation of web-based application, we used node.js and express.js.

1.6.2.4 Integration
All the units developed in the implementation phase are integrated into a system.

21
1.6.2.5 Testing
Software testing is the process of evaluating the system. In testing of a software, we
detect the difference between given input and expected output. Similarly, it is also used
to access the feature of a software item. Testing assesses the quality of the product.
Software testing is done during the development cycle.

1.6.3 Rationale behind Selected Methodology

 Generates working software quickly and early during the software life cycle.
 This model is more flexible – less costly to change scope and requirements.
 It is easier to test and debug.
 In this model customer can respond to each built.
 Lowers initial delivery cost.
 Easier to manage risk because risky pieces are identified and handled during it’d iteration.

22
2 Problem Definition
Many new farmers are not aware about the real way of running and caring a cattle farm. Those
people of olden days are educated by antecedent about the cattle rising and development. This is
also due to the tradition, where the cattle caring is done by family and being thought to the young
in order to keep it as the family business. It is known fact poor cattle management results in animal
disease and high losses that affect profit of the farmer this is major problem and the why the project
seek to design the preceptive system which is desirable to support such situation

2.1 Problem Statement

Nowadays everything is digitalized and almost any work can be done by just clicking a button
on mobiles and computers. Technology is getting more value by making those manual works
easy for humans; the computers are computing every problem for us. Therefore, it is important
to help those who are unable to use technology for their benefit. Many cattle farmers are having
problems in managing, monitoring and analyzing their farm data. When the farmers don’t
manage that data correctly then it causes shortage of feed, less production, spread of diseases
and loss in business. Without monitoring of cattle farm’s economy can result in heavy loss.

2.1.1 Proposed system

Our proposed system fully designed to support farmers and uses tesseract JS to scan animal
tag. This proposed system will help cattle farmers in managing their farm activities. The system
will facilitate the farmers who are unable to keep track of their farm activities, maintain quality
production and resources (feed) by providing them a web-based environment in which they can
just login to their account and enter all details/data of every animal individually either by
manually entering tag or scanning tag. The system will automatically calculate profit/loss,
increase/decrease in production and provide data in graphical form for better understanding of
user. The system will help in cost analysis, weight projection calculation, vaccination
information, and cattle feed management.

23
2.1.2 Solution to the problem
By developing this website, we want to help cattle farmers reduce the manual work of
calculating farm activities by providing automation in almost all kinds of processes that are
required to manage a cattle farm. The system will be solving the problem of cost management,
production quality and feed management in farms. Unlike other systems this website will not
be not require manual installation and having to contact someone for an account, the user can
make an account anytime from anywhere without requiring any permission.

2.1.3 Goals and Objectives

 By developing this website, we want to help cattle farmers to track and manage
theirfarm activities easily and reduce the manual process of calculations.
 To track farm activities from anywhere in the world.
 To help cattle farmers grow their farm and earn more profit.
 To track vaccination for keeping animals healthy.
 To ensure quality milk production.
 To help cattle farmers take more advantage from the technology.

2.1.4 Scope

 Farmers can make a profile of their farm.


 They will get three subscription offers they have to choose on to start using facilities.
 They will enter the data of animals to keep record.
 They can enter the feed record which they are using.
 Farmers will enter the yield data for monitoring purpose in terms of quality and quantity.
 Farmers can also enter the health record of every animal and can update it timely.
The system will also generate health, yield and feed analysis charts.
 Farmer can view loss and profit report based on data provided.

2.1.5 Benefits
 Easy to keep track of data in large farms.
 Don’t have to remember date of last vaccination for each animal or search files.
 Accessibility to farm data from anywhere in the world.
24
 Availability through internet anytime.
 Easy to enter animal to system by scanning animal’s ear tags. The system will automatically
recognize digits on tag.
 It will increase quality and quantity of production in farms.
 Users don’t have to buy a desktop computer for using this system. All other systems are
designed for desktop users.
 It will provide ease of access because the previous built system uses the manual way of
requiring farmers to call them for installation of software on their system.

2.2 Deliverables and Development Requirements


 Admin can view website performance
 Both admin and farmer have to login to system to view all information.
 Farmer can scan tag of animal to check details and enter record against it.
 Farmer can active subscription of his choice.
 Farmer can add/remove or update record of animals against specific id.
 Farmer can enter record of three different types of animals which are cow, goat and buffalo.
 Farmer can view progress report of the farm.
 Farmer can turn on/off alerts.
 Farmer can get alert for renewal of subscription when subscription is about to end.
 Farmer can get alert for animal health and yearly vaccination.
 Farmer can view any previous day record by selecting the date.

2.3 Current System (if applicable to your project)


CattleMax is a software that used by cattle farmers. CattleMax offer a technology-based
solution that allows you to keep up in the rapidly-changing cattle business. This program was
created to meet the record keeping needs of cattle farmer. CattleMax is a very old system which
has support for cow, bull and calves. It stores the information about breeding and medical. The
system has feature of saving information like active or sold animals and calving etc. CattleMax
support all the data about the cattle management. CattleMax support and keep many adequate
data about cattle management. The number of cows can be always updated by using CattleMax
if there is any cow born or dead. CattleMax keeps the sufficient data about the cattle and its
improvement. Furthermore, the health can be monitored by CattleMax system and it will be
25
recorded in the database. CattleMax helps the farmers to keep an eye on the growth of cattle
and the development of the management. Unlike cattle care farm system the application does
not support entering data of feed and yield, showing progress of each animal regarding these
feeds and overall statistics of farm.

Figure 2.1: Sample picture

26
3 Requirement Analysis
The software requirements are description of all the features and functionalities of the system.
These convey the expectations of users from the software product.

3.1 Use Cases Diagram(s)

3.1.1 Use Case for Admin

Figure 3.1 use case admin


3.1.1.1 Login
The admin has to fill the login form on login page to enter the system.
3.1.1.1.2 Website traffic
Admin will be able to see how many users visit website.

27
3.1.1.1.3 Sales
The default admin will be able to check sales of website
3.1.1.1.4 New Users
List of all admins will be visible to every admin.
3.1.1.1.5 Performance
An admin will be able to view the website performance over a certain period of time.
3.1.1.1.6 Edit profile
Admin will be able to edit his profile which will include password, name and contact info.

3.1.2 Use Case for Farmer

Figure 3.2 use case farmer

28
3.1.2.1 SignUp
The new user will have to create an account first for using Cattle Care system. User
cannot create account on an existing email address, doing so will give an error
message.
3.1.2.2 Login

Existing user can login to system just by filling login form.

3.1.2.3 Activate Subscription

User will have to activate subscription for entering into the system.

3.1.2.4 Manage animal data

User can add, delete or update animal yield and feed etc.

3.1.2.5 Scan ear tag

User can scan animal ear tag for finding record or managing animal data.

3.1.2.6 Bulk add animals

User can add many animals at once by clicking the bulk add and filling one form only.

3.1.2.7 View previous data

User can view any previous record by just scrolling to that record.

3.1.2.8 Manage feed data

User can add, delete or update feed in the system just by clicking buttons on feed page.

3.1.2.9 Manage medicine records

Medicine records of animal will be managed by user just by visiting medicine page
andentering all required information against a specific animal’s tag in the form.
3.1.2.10 Clear all records

User will be able to clear all records, just by clicking a button. That will clear
everythingfor user.

29
3.1.2.11 Edit profile

User can edit his profile information. System will allow user to edit his password
andpersonal details.
3.1.2.12 View reports

User will be able to view reports of his farm just by clicking reports button.

3.2 Detailed Use Case


3.2.1 Signup
Table 3.1 Signup
Use-case name Signup
Actor Farmer
Description Farmer must register (Email, Name etc).
Pre-condition Farmer can access application online.
Post-condition Farmer should be registered to system.

3.2.2 Manage Animals


Table 3.2 Manage animals
Use-case name Manage animals
Actor Farmer
Description Farmer can manage all added animals and
their feed and yield.
Pre-condition Farmer has registered to application.
Post-condition Farmer should get the desired output.
3.2.3 Scan ear tag
Table 3.3 Scan ear tag

Use-case name Scan ear tag


Actor Farmer
Description Farmer can scan animal tags to
view animal data.
Pre-condition Farmer is a registered user.
Post-condition System should show data with that tag.

30
3.2.4 Subscribe offers

Table 3.4 Subscribe offers


Use-case name Subscribe offers
Actor Farmer
Description Farmer can select subscription of his
own choice.
Pre-condition Farmer is a registered user.
Post-condition Farmer can use all services.
3.3 Functional Requirements
3.3.1 Subscribe offer
The user shall be able to subscribe an offer by making payment using any available
payment method and get all the benefits of that subscription.
3.3.2 Add animal
The farmer shall be able to add new animals to the system on his account by filling a
formwith details about that specific animal
3.3.3 Bulk adds animals

The farmer shall be able to add animals in bulk if he has many animals and don’t want
to enter each animal individually which will take a lot of time. So, by using this option
farmercan add animals starting from a specific id and the id will increment by one for
each animaland remaining data will be the same for all.

3.3.4 Add feed

The farmer shall be able to add different feeds for animals and then select that feed
while entering animal record. The farmer shall be deleting the feed if no record is
dependent on that feed.

3.3.5 Add medication

Farmer shall be able to add medication information of animal. This will include
medicinename, dosage and date on which animal was medicated.

31
3.3.6 Add yield

Farmer shall be able to enter each animal’s yield data with time. This data will include
quantity of milk and fat. Entering fat data shall be optional.

3.3.7 Change animal status

If a farmer changes his subscription from higher to lower and he had more animals
entered than the subscription limit then the system shall ask the farmer for selecting
active animals.

3.3.8 Update record

The farmer shall be able to update existing records. For example, records related to
yield, feed and medication of animals.

3.3.9 Delete record

Farmer shall be able to delete existing records of any date that can be related to yield,
feedand medication of animal.

3.3.10 View report


The farmer shall be able to view report of his farm progress. This will include data like
average production and feed consumption, graphs showing data production rate and
feed consumption, total expenditure, revenue, profit, or loss.

3.4 Non-Functional Requirements

Non-functional requirements are those requirements that specify the quality of the
system.Following are the non-functional requirements of our system.

3.4.1 Efficiency
Table 3.5 Efficiency

Name Efficiency
Summary Efficiency means how accurate result an
application provides.
Requirement The cattle care application is efficient
because it provides accurate result like on
scanning animal tag.

32
3.4.2 Learnability
Table 3.6 Learnability
Name Learnability
Summary Learnability defines how easily user can
use the system.
Requirement The cattle care application is easy to use for
novice and expert user due to its simple
interface.

3.4.3 Maintainability
Table 3.7 Maintainability
Name Maintainability
Summary Maintainability defines the flexibility of
system means easy to make changes.
Requirement The cattle care application is easy to
maintain due to separate individual
components in react.

3.4.4 Security
Our system will be secure for user, it will not sell user information to any third-party application
and will ensure user data security by using modern hashing techniques.
3.4.5 Usability
Our system will be user friendly and easy to use so that user will not face any kind
ofdifficulty while using the application.

33
4 Design and Architecture
4.1 System Architecture

Figure 4.1 System Architecture

Given diagram shows the system architecture diagram of our project. The user will register to
system by providing required information. Then the cattle care system will ask for subscription
to the user. When these requirements are completed by user the system will allow him to add
animal data by scanning tag from any device or user can also manually enter tag id.
The system will allow management, monitoring, insights and profit analysis of cattle farm.
Farmer can enter animal records for monitoring his farm and the system will provide him all
profit analysis and detailed information.

34
4.2 Data Representation [Diagram + Description]
4.2.1 Sequence diagram for Admin

Figure 4.1 sequence admin


Description
The above given diagram is showing interaction between system and the admin. There is one
actor which is admin and two objects in the diagram. Actor can request for operation to the
system object and if there is some data to store then the system will contact with database and
view that from the database. Actor cannot directly communication with database. Actor can
only view website stats etc. and will not be able to view any personal information of users.

35
4.2.2 Sequence diagram for Farmer

Figure 4.2 Sequence farmer first

36
Figure 4.3 sequence farmer second
Description
The above given sequence diagram is showing interaction between farmer and Cattle Care
system. The cattle care system communicates with database when farmer uses database related
components. As given in diagram when farmer requests for add, edit or removal of

37
animal record; the system communicates with database by running queries for that
operation and perform the operation for farmer. Farmer can only perform these
operationswhen he has successfully logged in to system as shown in diagram. If the
login details theuser provided does not match, the user will not be able to perform
operations. Farmer canrequest for add, delete or update animal data, subscription of
offer, feed add, delete or update operations and other operations as mentioned in above
sequence diagram.

38
4.3 Process Flow/Representation
4.3.1 Process flow diagram for Admin

Figure 4.4 process flow for admin


Description

Admin after a successful login to the system admin will be able to see different stats
from dashboard. These include the statistics, performance, new users, and sales of
website. All these things will be representedin graphics form for a better understanding
of admin.

39
4.3.2 Process flow diagram for Farmer

Figure 4.5 process flow for farmer


Description
If the farmer doesn’t have an account on Cattle Care system, then first he will have to
Sign up to the system, verify their email and get subscription. While farmers that have
already created an account can login to system just by clicking login and after
authentication of data system will decide to login user or not. When user login to the
system he will be able to view a menu containing view report, add feed, view
subscription, edit profile, add animal, and animal data. By clicking these buttonsfarmer
can use specific functionality. Animal data will include view stats and add daily record
option where by clicking view stats user will be able to view average production rate,
feed consumption rate and other information of each individual animal. For adding
daily records, the farmer has to click add daily record.
40
4.4 Design Models [along with descriptions]

Figure 4.7 class diagram


Description
In above class diagram admin is able to see different stats from dashboard. These include the

statistics, performance, new users, and sales of website. Farmer can use specific functionality.

Animal data will include view stats and add daily record option where by clicking view stats

user will be able to view average production rate, feed consumption rate and other information

of each individual animal. For adding daily records, the farmer has to click add daily record.

This website has three types of subscription. Farmer can choose subscription regarding their
requirements.

41
6 Implementation
5.3 External APIs
Describe the APIs used in the following table.
Table 1 Details of APIs used in the project

Name of API Description of API Purpose of usage List down the function/class name
in which it is used
Restful A RESTful API is an Restful API are uses In 1.Function name: addanimal
architectural style for an Our website that send
application program HTTP requests to 2.Function name:
interface (API) access and use data. dailyFeedConsumption.
That data can be used
to GET, PUT, POST
3. Function name:
and DELETE data
types, which refers to dailyYieldconsumption
the reading, updating, 4. Function name: Signup
creating and deleting of
operations concerning 5. Function name: login
resources.
Stripe Stripe API is a set of Accepting payments: 1.Function name:
programming interfaces The API allows us to animal.controller.js
that allows developers to create a payment form,
process the payment, 2. Function name:
interact with the Stripe
and handle the payment
platform, which allows subscribe.controller.js
confirmation.
businesses to accept and
manage payments online. Managing
The API allows subscriptions: The API
developers to perform a allows us to create and
wide range of tasks such manage subscriptions
for recurring payments,
as creating and managing
such as monthly
customers, charges, subscriptions.
subscriptions, and
refunds, as well as Handling refunds: The
handling disputes and API allows us to
analyzing data. process refunds for
payments that have
been made.

Managing customers:
The API allows us to
create and manage
customer records,
making it easy to
process repeat
payments.

5.4 User Interface


Details about user interface with descriptions.

42
Figure 5.1 home page

Figure 5.2 services


• User can view our services on home page to know about website.

43
Figure 5.3 offers

The subscription offer pricing and benefits are listed on home page.


Figure 5.4 about offers

44
Figure 5.5 footer

• User can view benefits of choosing cattle care on home page.

Figure 5.6 login page


• Admin and farmer can login to system from login page to access their account.

45
Figure 5.7 farmer login

• New users can register through registration page after submitting details.

Figure 5.8 farmer dashboard

• Farmer dashboard has the farm growth statistics in graphical form.

46
Figure 5.9 add animals
• Farmer can add animal by filling form on add animal page.

Figure 5.10 animal list

• All the added animals will be on animal stats page.

47
Figure 5.11 edit animals

• Farmer can edit animal data by clicking edit button and filling this form.

Figure 5.12 delete animal

• Farmer can delete an animal record by clicking delete button.

48
Figure 5.13 animal detail
• By clicking animal in list farmer can view animal detail.

Figure 5.14 feed list

• Farmer can add a feed using this modal.

49
Figure 5.15 admin dashboard
• Admin can view all website statistics on dashboard.

Figure 5.16 manage farmer

• Admin can manage farmers.


50
6 Testing and Evaluation
Our motive was to design and implement the application with thorough testing.
6.1 Manual Testing
6.1.1 System testing
Once the system has been successfully developed, testing has to be performed to ensure that
the system working as intended. This is also to check that the system meets the requirements
stated earlier. Besides that, system testing will help in finding the errors that may be hidden
from the user.
6.1.2 Unit Testing
Unit Testing 1: Login as FYP Committee
Testing Objective: To ensure the login form is working correctly

Test Case #: 1 Test Case Name: Register User


System: Cattle Care Subsystem: Registration
Designed By: Muhammad Ilyas Designed Date: 11/1/2022
Short Description: Test the Cattle Care to add new user to system and save it to Mongo DB
database.
Pre-Condition:
The client is on login page of the system.

Step Action Expected Result Actual Result Pass/Fail


1 Clicked the “Register” The system should System displays Pass
button display a form for the form with all
entering user details the required
with email, password, fields.
confirm password,
phone number and
address.
2 Entered the user details System allow client to Client filled the Pass
with following data: enter details in form. form
Email Address: successfully.
farmer@gmail.com
Password: 1234567890
Confirm Password:
1234567890
Phone Number:
+923059777434

3 Click the “Signup” button System should get the System saved the Pass
on form data and save to database user in database.
and redirect client to
dashboard.
Post-Condition:
The Client is on farmer dashboard section.

51
Unit Testing 2: Edit Profile
Testing Objective: To ensure the edit profile form is working properly.

Test Case #: 2 Test Case Name: Client Login


System: Cattle Care Subsystem: Login
Designed By: Muhammad Asif Designed Date: 11/1/2022
Short Description: Test the Cattle Care to login existing users.
Pre-Condition:
The client is on the home page of the system.

Step Action Expected Result Actual Result Pass/


Fail
1 Clicked the The system should display a System displays Pass
“Login/Signup” button form for entering user details the form with all
with email and password. the required
fields.
2 Entered the user details System allow client to enter Client filled the Pass
with following data: details in form. form
Email Address: successfully.
farmer@gmail.com
Password: 1234567890

3 Click the “Start Now” System should get the data System redirect Pass
button on form and match with data in to dashboard.
database and redirect client
to dashboard if user exist in
database.

Post-Condition:
The Client is on farmer dashboard section.

6.1.3 Functional Testing


The functional testing will take place after the unit testing. In this functional testing, the
functionality of each of the module is tested. This is to ensure that the system produced meets
the specifications and requirements.

Functional Testing 1: Login with different roles

Objective: To ensure that the correct page with the correct navigation bar is loaded.

52
Test Case #: 1 Test Case Name: Add animal
System: Cattle Care Subsystem: Cattle
Designed By: Muhammad Asif Designed Date: 11/1/2022
Short Description: Test the Cattle Care to add new animal.
Pre-Condition:
The client is on farmer dashboard.

Step Action Expected Result Actual Pass/Fail


Result
1 Clicked the “Add The system should System Pass
animal” button display a form for displays the
entering animal details form with
with upload animal all the
picture, cattle id, ear tag, required
weight, age, breed type, fields.
cattle type, sex, price,
anticipation date, and
child count.
2 Entered the following System allow client to Client filled Pass
data: enter details in form. the form
Upload animal picture: successfully.
animal.jpg, Cattle id: 1
Ear tag: 1, Weight:
100kg Age: 10, Breed
Type: Afghani
Cattle Type: Cow
Sex: Female, Price:
30,000
Anticipation Date:
11/1/2022
Child Count: 2
3 Click the “Add animal” System should get the System redirect to Pass
button on form data and add in database animal stats page.
and redirect client to
animal stats page.
Post-Condition:
The Client is on animal stats page.

53
6.1.4 Integration Testing
Test Case #: 1 Test Case Name: Admin login
System: Cattle Care Subsystem: Login
Designed By: Muhammad Ilyas Designed Date: 11/1/2022
Short Description: Test the Cattle Care to login admin.
Pre-Condition:
The client is on home page.

Step Action Expected Result Actual Result Pass/Fail


1 Clicked the The system should System displays Pass
“Login/Signup” button display a form for the form with all
entering user details the required
with email and fields.
password.
2 Entered the user details System allow client to Admin filled the Pass
with following data: enter details in form. form
Email Address: successfully.
admin@gmail.com
Password: 1234567890

3 Click the “Start Now” System should get the System redirect Pass
button on form data and match with to admin
data in database and dashboard.
redirect client to admin
dashboard if user exist
in database.
Post-Condition:
The Client is on admin dashboard section.

6.2 Automated Testing:

Tools used:
Tool Name Tool Description Applied on [list of Results
related test cases / FR /
NFR]
Selenium Selenium is an open- Applied on Add feed and pass
source tool that add animals
automates web browsers.
It provides a single
interface that lets you
write test scripts in
programming languages
54
7 Conclusion and Future Work
This chapter concludes the project and highlights future work.

7.1 Conclusion

Cattle Care is a web-based application which aims to support farmers in management


of their farm. The system has different react components and functions. The application
has two modes, a farmer panel through which the users manage their farm feed,
medicine andanimals.
By using this application farmers can scan animal tags and view their data, keep track
of farm progress, yield production, usage of supplies, and monitor animal health
easily. Theadmin can view different statistics of website.

7.2 Future Work

Cattle care web app is built using React JS which can easily be converted to mobile
application. We can introduce devices for live location of animal on the map or if
animal exits the allocated area, then application will issue a warning.
We can provide option for cattle farmers to sell animals on Cattle Care and allow other
farmers and buyers to see the list of animals available for sale. The buyer will be able
to directly contact the seller on cattle care, the buyer can use filter for searching animals
in his area only. This will help buyers in searching animals at affordable price while
sitting athome. Cattle care can also provide secure platform for transactions of sales
but this will cause additional charges for services.

55
8 References
[1] Marta Hernández-Jover, Lynne Hayes, Robert Woodgate, Luzia Rast, and Jenny- Ann
"Animal Health Management Practices Among Smallholder Livestock Producers in Australia
and Their Contribution to the Surveillance System" 2009.

[2] Abdul Rehman, Luan Jingdonga, " Livestock production and population census in
Pakistan: Determining their relationship with agricultural GDP using econometric analysis”
2016.

[3] Kathie “CattlePro, The premiere herd management software” 1998

[4] Available online at https://www.cattlemax.com/

[5] Available online at <https://www.nadaplivestockmanagement.com/

[6] Wikipedia, “Requirements elicitation”, Available online at:<https://en.wikipedia.org/wiki/

Requirements elicitation/> (2021)

56

You might also like