[go: up one dir, main page]

0% found this document useful (0 votes)
64 views109 pages

Fish Farming Management System

The document presents a main project report titled 'Aqua Manage,' developed by Arjun N B as part of the Bachelor of Computer Applications program at Chinmaya College of Arts, Commerce and Science. Aqua Manage is a fish farming management system designed to enhance efficiency and productivity in aquaculture through features like inventory management, water quality monitoring, and financial tracking. The project aims to replace manual processes with a centralized digital solution, improving transparency and reducing errors in fish farming operations.

Uploaded by

kannannb789
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)
64 views109 pages

Fish Farming Management System

The document presents a main project report titled 'Aqua Manage,' developed by Arjun N B as part of the Bachelor of Computer Applications program at Chinmaya College of Arts, Commerce and Science. Aqua Manage is a fish farming management system designed to enhance efficiency and productivity in aquaculture through features like inventory management, water quality monitoring, and financial tracking. The project aims to replace manual processes with a centralized digital solution, improving transparency and reducing errors in fish farming operations.

Uploaded by

kannannb789
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/ 109

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE

Layam Road, Tripunithura – 682301

(Affiliated to Mahatma Gandhi University, Kottayam)

BACHELOR OF COMPUTER APPLICATIONS

MAIN PROJECT

ON

AQUA MANAGE

Submitted By,

ARJUN N B

Register no: 220021084849


CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE
Layam Road, Tripunithura – 682301
(Affiliated to Mahatma Gandhi University, Kottayam)

CERTIFICATE
This is to certify that the Main Project Report entitled

AQUA MANAGE
has been submitted by

ARJUN N B
Register no: 220021084849
in partial fulfillment of the requirements for the award of the degree

BACHELOR OF COMPUTER APPLICATIONS


MAHATMA GANDHI UNIVERSITY
During the academic year 2024-2025

Submitted for the University Examination held on ………….

Principal Head of the Department

External Examiner Project Guide


ACKNOWLEDGEMENT

By blessing and permission of Almighty God, I was able to complete this work successfully.
My sincere thanks to our Principal-in-charge, Mrs. Rosy Joice Lopez for her overwhelming and
moralsupport extended towards us.

I would like to thank our head of the department Mrs. Nisha Sanjay for her constant
encouragement and support for the completion of our project.

I would like to express gratitude to Mrs. Ranimol V G (project guide), for her valuable
guidance and support.

I would also like to express my sincere thanks to all my teachers, Mrs. Sharmila Francis,
Mrs. Andal V, Mrs. Remilda Rajan and Mr. Vishnu Mohanan for their timely assistance
and advice offered to us, to make this mini project a success.

Finally, I thank my parents for their boundless support and for making our lives so easy and
for helping to tackle all those difficulties in life.
nbvj

DECLARATION

I ARJUN N B, hereby declare that the Main Project entitled AQUA MANAGE FISH
FARMING MANAGEMENT SYSTEM submitted to Mahatma Gandhi University ,
Kottayam in partial fulfillment of therequirements for the Bachelor’s degree of Computer
Applications is a record of original work done by me during the period of study at Chinmaya
College Of Arts, Commerce And Science Tripunithura under the supervision and guidance of
Mrs. Ranimol V G (project guide), Department of Computer Application and that this project
work has not formed the basis for the award of any diploma/associates-ship/fellowship or
similar title to any candidate of any university.

Place: Tripunithura ARJUN N B

Date: Register No: 220021084849


SYNOPSIS
Aqua Manage is an innovative fish farming management System developed to enhance the
efficiency, productivity, and sustainability of fish farming operations. Designed to cater to both
small-scale and large-scale fish farms, Aqua Manage leverages modern technology to provide
a seamless, user-friendly, and highly functional platform for managing all aspects of fish
farming.

The core features of Aqua Manage include inventory management, water quality monitoring,
feed scheduling, health tracking, and financial management. Users can maintain detailed
records of fish stocks, monitor growth rates, and track inventory levels to ensure optimal stock
management. The application integrates with IoT devices and sensors to provide real-time data
on water quality parameters such as pH, temperature, dissolved oxygen, and ammonia levels,
enabling farmers to make informed decisions to maintain a healthy aquatic environment.

Aqua Manage also includes an advanced feed scheduling module that automates feeding
routines based on the specific needs of different fish species, promoting optimal growth and
reducing waste. Health tracking features allow users to log and monitor the health status of
their fish, manage disease outbreaks, and record treatments and medications.

The financial management module helps users keep track of expenses, income, and
profitability, providing detailed financial reports and analytics to aid in decision-making and
planning. The system is user-friendly interface, developed with Python Django, ensures a
consistent and responsive experience across various devices.
TABLE OF CONTENTS

1. Introduction 01
1.1. Project Overview 01
2. System Analysis 03
2.1. Problem Analysis 04
2.1.1. Existing System 04
2.1.2. Proposed System 05
2.1.3. Feasibility Study 05
2.1.3.1. Economic Feasibility 06
2.1.3.2. Technical Feasibility 06
2.1.3.3. Behavioral Feasibility 06
2.2. Requirement Specification 07
2.2.1. Software Requirement Specification 07
2.3. Hardware and Software Selection and justification 09
2.3.1. Hardware Specification 09
2.3.2. Software Specification 09
2.4. Use case Diagram 13
2.5. Data Flow Diagram 14
2.6. Entity Relationship Diagram 19
3. System Design 20
3.1. Structed Design methodologies 22
3.2. User Interface Design 22
3.3. Database Design 23
3.3.1. Data and Integrity Constraint 24
3.4. Output Design 25
3.5. Table Design 25
4. Coding 28
4.1. Program code preparation 29
4.2. Implementation of Security 30
4.2.1. Data Security 30
4.2.2. Users and Access Rights 30
5. System Testing 31
5.1. Unit Testing 33
5.2. Integration Testing 34
5.3. User Acceptance Testing 34
5.4. Test Case Design 34
5.5. Test Report and Debugging 35
6. System Implementation and maintenance 37
7. Scope of Project 39
8. Future Enhancement 41
9. Conclusion 43
10. Bibliography 45

Appendix I – Coding 47
Appendix II – Forms and Screenshots – Demo of Project 63
Appendix III 65
1. INTRODUCTION
AQUA MANAGE 1

1.1 PROJECT OVERVIEW

The Fish Farming Management System is a streamlined digital platform designed to simplify
aquaculture management for farmers, users, and administrators. The system is divided into
three core modules—User, Farmer, and Admin—each with specific functions tailored to their
roles. Below is the overview of the system:

1. User Module
The User Module is designed to provide a seamless experience for customers
purchasing fish. Key functions include:

a. Registration & Login


• Secure authentication for users to access the system.
b. Edit Profile
• Update personal details (e.g., name, contact information, address).
c. View Fish Purchase
• Browse available fish batches, pricing, and promotions.
• View past purchases and order history.
d. Delivery Status
• Track the status of placed orders (e.g., processing, shipped, delivered).
e. Notifications
• Receive updates on order status, promotions, and system announcements.

2. Farmer Module
The Farmer Module is designed to help farmers manage their fish farming operations
efficiently. Key functions include:

a. Inventory Management
• Track fish batches by species, age, and growth stages.
• Monitor pond/tank capacity and water quality parameters.
b. Feed Scheduling
• Create and manage feeding schedules with portion sizes and frequency.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 2

• Track feed inventory and set reorder alerts.


c. Health Records
• Log symptoms of diseases and treatments applied.
• Schedule vaccination and medication routines with reminders.
d. Financial Records
• Record expenses (feed, labor, equipment) and revenue (fish sales).
• Generate profit/loss statements and cost-benefit analysis reports.
e. View User List
• Access a list of registered users who have purchased fish.
f. View User Orders
• Track orders placed by users, including order status and delivery timelines.

3. Admin Module
The Admin Module is limited to managing farmer accounts and does not interfere
with other functions. Key function includes:

a. Add/Manage Farmers
• Register new farmers and update their details.
• Deactivate or remove farmer accounts as needed.

Database Design
The system’s database will store structured data, including:
A. Users: Personal details, purchase history, and preferences.
B. Farmers: Farm details, fish batches, feeding schedules, health records, financial
records, and sales data.
C. Admins: Farmer management data and system logs.

This system empowers farmers to manage their operations effectively, provides users with a
seamless purchasing experience, and allows admins to oversee farmer accounts without
interfering with operational functions.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 3

2.SYSTEM ANALYSIS

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 4

2. SYSTEM ANALYSIS
System analysis refers to the process of examining a situation with the intent of improving it
through better process and methods. System analysis is, therefore the process of gathering
and interpreting facts, diagnosing problem and using the information to recommend changes
in the system, in other words it means a detailed explanation of description. Before
computerizing a system under consideration, it must be analyzed. We need

to study how it functions currently, what are problems and what are the requirements that the
proposed software should meet.

• System and software requirements analysis


• Design and implementation of software
• Ensuring, verifying and maintaining software integrity

The Fish Farming Management System provides a user-friendly interface that can be easily
operated by individuals with basic computer knowledge, including farmers, users, and
administrators. It stores essential information related to fish farming operations in a well-
organized database, which can be accessed securely by all stakeholders based on their roles.
This system ensures efficient management of data, eliminates the storage of invalid or
redundant information, and streamlines the operations of fish farming businesses.

2.1 PROBLEM ANALYSIS


The initial investigation into the existing fish farming management practices has revealed
several critical issues. One key problem is the lack of a centralized system for managing fish
inventory, feeding schedules, health records, and financial transactions. Farmers often rely on
manual methods, such as paper-based records or spreadsheets, which are prone to errors,
inefficient, and difficult to maintain. Additionally, users face challenges in accessing real-
time information about fish availability, pricing, and delivery status, leading to a lack of
transparency and trust.

2.1.1 EXISTING SYSTEM


The current fish farming management practices rely heavily on manual processes, making
them inefficient and time-consuming. Farmers use paper-based records or basic spreadsheets
to manage inventory, feeding schedules, health records, and financial transactions. This

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 5

approach is prone to errors, difficult to maintain, and lacks real-time updates. Users, such as
buyers, often have to visit farms or contact farmers directly to check fish availability, place
orders, and track delivery status, leading to delays and a lack of transparency.

2.1.2 PROPOSED SYSTEM


The main objective of this project is to improve the current manual fish farming management
practices by providing a more efficient, high-quality digital solution for managing aquaculture
operations. Unlike the existing fragmented and manual processes, the proposed system
introduces key features such as centralized inventory management, automated feed scheduling,
health monitoring, and financial tracking. This system eliminates the need for farmers to rely
on paper-based records or spreadsheets, streamlining operations and reducing errors. Users,
such as buyers, will be able to browse available fish batches, place orders, and track delivery
status in real-time, eliminating the need for direct contact or farm visits. Administrators will
have better control and oversight of farmer accounts and system operations, reducing manual
tasks and improving efficiency. Farmers can effortlessly manage inventory, feeding schedules,
health records, and financial transactions through a user-friendly interface, making the entire
process faster, more transparent, and more reliable compared to the previous system. By
automating manual processes and providing real-time data access, the proposed system
enhances productivity, transparency, and profitability for all stakeholders involved in fish
farming operations.

2.1.3 FEASIBILITY STUDY

Feasibility is conducted to identify the best system that meets all the requirements for managing
fish farming services. It is both necessary and important to evaluate the feasibility of the project
at the earliest possible stage. A feasibility study includes identifying and describing the
proposed system, evaluating it, and selecting the best system for the job. This ensures that the
proposed system will not become a burden to the yoga studio. The feasibility study should be
relatively quick and inexpensive, providing results that inform the decision of whether to
proceed with a more detailed analysis. Understanding the major requirements of the system is
essential during this phase.
• Economic feasibility
• Technical feasibility

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 6

• Behavioural feasibility

2.1.3.1 ECONOMIC FEASIBILITY

Economic feasibility is the most frequently used method for evaluating the
effectiveness of the candidate system. It is very essential because the main goal of the
proposed system is to have economically better result along with increased efficiency. A cost
evaluation is weighed against the ultimate income or product. Economic justification is
generally the bottom-line consideration that includes cost benefit analysis, long term
corporate income strategies, and cost of resources needed for development and potential
market growth. When compared to the advantage obtained from implementing the system its
cost is affordable. Proposed system was developed with available resources. Since cost input
for the software is almost nil the output of the software is always a profit. Hence software is
economically feasible

2.1.3.2 TECHNICAL FEASIBILITY


The study of function, performance, and constraints is crucial for developing a robust system,
with technical feasibility being a key challenge in the product engineering process. This
feasibility focuses on evaluating whether the project's requirements can be met with current
hardware and software. The study found that the existing equipment and technology are
sufficient, making the proposed system technically viable. The system is designed with
minimal requirements, ensuring it can run on almost any Windows computer with low system
resources. Unlike the current manual processes, the proposed system will automate tasks,
allowing for efficient data management and easy report generation using database management
software. This makes the system not only feasible but also user-friendly and capable of
addressing the inefficiencies of the existing manual system, ensuring smooth operations.

2.1.3.3 BEHAVIOURAL FEASIBILITY


People are inherently resistant to change and computer is known for facilitating the
changes.an estimate should be made of how strongly the user; staff reacts towards the
development of the computerized system. In the existing system more manpower is required
and time factor is more. The more manpower for managing many files for dynamic data
replication and more time for search through these files is needed. but in the proposed system,

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 7

both manpower and time factors are reduced and also unnecessary burden is reduced. thus,
the remaining people are made to engage in some other important work. also, there is no need
to wait in case of downloading the data for the users therefore, the system is feasible

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 8

2.2 REQUIREMENT SPECIFICATION

Requirement analysis involves studying the current system to find out how it works and where

improvements could be made. A clear idea about the existing system is a must formaking

improvements where it is required. Proper planning and collection of data serves the purpose.

The requirement engineering process should normally involve writing


requirements definition and then expanding this into a requirement
specification. The requirement definition is targeted at a managerial level and
requirements specification at the technicalstaff. The software design is based
directly on the requirements specification.

System analysis includes two main procedures. They are: -

1. Preliminary analysis
2. Detailed analysis

The preliminary analysis stage begins when someone encounters a problem or


limitationin an existing system, desires a modification to the existing system.
The modification may be either change in existing system or proposing an entire
new system. Detailed analysis expands the preliminary analysis to include a
complete analysis of all possible alternative solutions to the problem and a
complete explanation of what appears to be themost practical solution.

2.2.1 SOFTWARE REQUIREMENT SPECIFICATION

This documentation aims to define the overall software requirements for the Fish Farming
Management System. Efforts have been made to accurately specify all necessary requirements.
The final product will only include the features mentioned in this document, and no
assumptions about additional features should be made by any parties involved in developing,
testing, implementing, or using the product. If additional features are required, a formal change
request must be submitted, after which a new release of both the document and the product will
be produced.

The Fish Farming Management System is designed to manage all details related to fish farming
operations, including inventory, feeding schedules, health records, financial transactions, and

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 9

user orders. The system provides farmers, users, and administrators with an easy, less complex
way to perform their tasks, minimizing redundancy. This ensures that all stakeholders
accessing the system can achieve maximum efficiency and rely on it for accurate, desired
results.

There are 3 users in the system:


1. Admin
2. Farmer
3. User

The Admin is the superuser and primary controller of the Fish Farming Management System.
The admin has full access to the system, enabling them to manage all aspects of the platform's
operations. Key responsibilities include adding and managing farmer accounts, overseeing
system settings and configurations, generating reports on fish farming operations, sales, and
financial performance, and ensuring data security and system integrity. The admin plays a
critical role in maintaining the overall functionality and security of the system, ensuring that it
runs smoothly and efficiently for all users.

The Farmer is responsible for managing fish farming operations through the system. Key
features include inventory management, where farmers can track fish batches, pond/tank
details, and water quality parameters. Farmers can also create and manage feeding schedules,
track feed inventory, and set reorder alerts through the feed scheduling feature. Health records
allow farmers to log symptoms of diseases, treatments applied, and vaccination schedules,
while financial records enable them to record expenses (feed, labor, equipment) and revenue
from fish sales. Additionally, farmers can access a list of registered users who have purchased
fish and track orders placed by users, including order status and delivery timelines.

The User represents customers who purchase fish from farmers. Key features include
registration and login for secure authentication to access the system. Users can edit their
profiles to update personal details such as name, contact information, and address. They can
browse available fish batches, pricing, and promotions through the view fish purchase feature.
Users can also track the status of placed orders, such as processing, shipped, or delivered, and
receive notifications for updates on order status, promotions, and system announcements. This
ensures a seamless and transparent purchasing experience for users.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 10

2.3 HARDWARE AND SOFTWARE SELECTION AND


JUSTIFICATION

2.3.1 HARDWARE SPECIFICATION


The selection of hardware is very important in the existence and proper working of any
software. When selecting hardware, the size and capacity requirements are also
important. Below are some of the hardware that is required by the system.

Processor: Intel core i5 and above

RAM: Minimum 4 GB RAM

Speed:1.60GHz

Input Devices: Mouse, Keyboard

Output Devices: Monitor

2.3.2 SOFTWARE SELECTION AND JUSTIFICATION


We require much different software to make the application which is in making to work
efficiently. It is very important to select the appropriate software so that the software works
properly.

Below are the software requirements.

Operating System: Windows 7 or higher versions

Front End: HTML, JavaScript, CSS

Back End: Django, MySQL

Web Browser: Internet Explorer/Google Chrome/Firefox

Web Server: XAMPP Server

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 11

WINDOWS 11
Windows 11 is a major release of the Windows NT operating system developed by Microsoft, serving
as the successor to Windows 10. It was officially announced on June 24, 2021, and released to the general
public on October 5, 2021. Windows 11 introduces a refreshed user interface, improved performance,
and new features designed to enhance productivity, gaming, and creativity.

One of the standout features of Windows 11 is its redesigned Start Menu and Taskbar, which are now
centered by default, providing a more modern and streamlined look. The operating system also
introduces Snap Layouts and Snap Groups, which allow users to organize and multitask with multiple
windows more efficiently. Additionally, Windows 11 integrates Microsoft Teams directly into the
Taskbar, making communication and collaboration more seamless.

Windows 11 follows the Windows-as-a-Service model, receiving regular updates and new features
through Windows Update. These updates are available at no additional cost to users, with enterprise
customers having the option to opt for long-term support channels that prioritize stability and security
updates.

Microsoft aims to make Windows 11 the most inclusive and accessible version of Windows, with
features like improved accessibility settings, voice typing, and touchscreen optimizations. As of 2023,
Windows 11 is steadily gaining adoption, with millions of devices upgrading from Windows 10.
However, Windows 10 remains widely used due to its compatibility with older hardware and its
established user base.

PHP

Django is a high-level, open-source web framework written in Python that enables developers to build robust,
scalable, and secure web applications quickly. It follows the Model-View-Template (MVT) architectural pattern
and emphasizes the DRY (Don't Repeat Yourself) principle, making it an excellent choice for developing
complex web applications like the Fish Farming Management System. Django was first released in 2005 and has
since become one of the most popular web frameworks due to its simplicity, flexibility, and extensive feature
set. Django is particularly well-suited for projects that require rapid development, such as content management
systems, e-commerce platforms, and data-driven applications. It is a MUST for students and working
professionals aiming to become skilled Software Engineers, especially in the web development domain. Below
are some of the key advantages of using Django for your Fish Farming Management System is a recursive
acronym for "PHP: Hypertext Pre-processor".

Key Features of Django

1. ORM (Object-Relational Mapping): Django’s ORM allows developers to interact with the database
using Python code instead of SQL, simplifying database operations.

2. Admin Interface: Django automatically generates a powerful admin interface, which can be
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 12

customized to manage farmers, users, and other data in your Fish Farming Management System.

3. REST Framework: Django REST Framework (DRF) makes it easy to build APIs for your system,
enabling seamless communication between the frontend and backend.

4. Template Engine: Django’s template engine allows developers to create dynamic HTML pages by
combining templates with data.

5. Middleware Support: Django’s middleware components enable developers to add functionality like
authentication, session management, and security checks to the request/response cycle.

Characteristics of Django

• Simplicity
• Efficiency
• Security
• Flexibility
• Familiarity

MYSQL

MySQL was created by a Swedish company, MySQL AB, founded by David Axmark, Allan
Larsson and Michael "Monty" Widenius. Original development of MySQL by Widenius and
Axmark began in 1994. The first version of MySQL appeared on 23 May 1995. It was initially
created for personal usage from MySQL based on the low-level language ISAM, which the
creators considered too slow and inflexible. They created a new SQL interface, while keeping
the same API as MySQL. By keeping the API consistent with the MySQL system, many
developers were able to use MySQL instead of the (proprietarily licensed) MySQL antecedent.

MySQL can be built and installed manually from source code, but it is more commonly
installed from a binary package unless special customizations are required. On most Linux
distributions, the package management system can download and install MySQL with minimal
effort, though further configuration is often required to adjust security and optimization
settings.
Though MySQL began as a low-end alternative to more powerful proprietary databases, it has
gradually evolved to support higher-scale needs as well. It is still most commonly used in small

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 13

to medium scale single-server deployments, either as a component in a LAMP-based web


application or as a standalone database server. Much of MySQL's appeal originates in its
relative simplicity and ease of use, which is enabled by an ecosystem of open-source tools such
as phpMyAdmin. In the medium range, MySQL can be scaled by deploying it on more
powerful hardware, such as a multi-processor server with gigabytes of memory.

There are, however, limits to how far performance can scale on a single server ('scaling
up'), so on larger scales, multi-server MySQL ('scaling out') deployments are required to
provide improved performance and reliability. A typical high-end configuration can
include a powerful master database which handles data write operations and is replicated
to multiple slaves that handle all read operations. The master server continually pushes
binlog events to connected slaves so in the event of failure a slave can be promoted to
become the new master, minimizing downtime. Further improvements in performance
can be achieved by caching the results from database queries in memory using
Memcached, or breaking down a database into smaller chunks called shards which can
be spread across a number of distributed server clusters.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 14

2.4 USE CASE DIAGRAM

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 15

2.5 DATAFLOW DIAGRAM


The DFD also known as bubble chart. It is a simple graphical formalism that can be used to
represent a system in terms of the input data to the system, various processing carried out on
these data and the output data generated by the system.

Data flow diagram (DFD) is used to show how data flows through the system and the processes
that transform the input data into output. Data flow diagrams are a way of expressing system
requirements in a graphical manner. Four simple notations are used to complete a DFD. The
notations are given below:

a. DATA FLOW

A directed arc or an arrow is used as a Data Flow Symbol. This represents the data
flow occurring between two processes or between an external entity and a process;
in direction of the Data Flow Arrow. Data flow Symbols are annotated with
corresponding data names.

b. PROCESS

A function is represented using a circle. This symbol is called a process or a bubble.


Bubbles are annotated with the names of corresponding functions.

c. EXTERNAL ENTITY

An external entity such as a user, project manager etc. is represented by a rectangle.


The external entities are essentially those physical entities external to the application
system, which interact with the system by inputting data to the system or by
consuming the data produced by the system. In addition to the human users the

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 16

external entity symbols can be used to represent external hardware and software such
as application software.

d. DATA STORE

A Data Store represents a logical file; it is represented using two parallel lines. A
logical file can represent either Data Store Symbol, which can represent either data
structure or a physical file on disk. Each data store is connected to a process by means
of a Data Flow Symbol. The direction of the Data Flow Arrow shows whether data
is being read from or written into a Data Store. An arrow flowing in or out of a data
store implicitly represents the entire area of the Data Store and hence arrows
connecting to a data store need not be annotated with the names of the corresponding
data-item

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 17

a. ZERO-LEVEL DFD

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 18

b. FIRST LEVEL DFD

1. USER

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 19

2.ADMIN

Fig 2.2: First level Diagram for admin

3.FARMER

Fig 2.3: First level Diagram of Farmer

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 20

2.6 ENTITY RELATIONSHIP DIAGRAM

Fig 2.5: ER Diagram

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 21

3. SYSTEM DESIGN

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 21

3. SYSTEM DESIGN

The most creative and challenging phase of the system development is system design, is
a solution to how to approach to the creation of the proposed system. It refers to the
technical specification that will be applied. It provides the understanding and procedural
details necessary for implementing the system recommended in the feasibility study.
Design goes through the logical and physical stages of development. At an early stage in
designing a new system, the system analyst must have a clear understanding of the
objectives, which the design is aiming to fulfil. The first step is to determine how the
output is to be produced and in what format. Second, input data and master files
(database) have to be designed to meet the requirements of the proposed output. The
operational (processing) phases are handled through program construction and testing.

It is to be developed in a way that three users can access Admin and User with different
permissions. It is a solution to a “how to” approach compared to system analysis which
is a “what is” orientation. It translates the system requirements into ways of making them
operational. The design phase focuses on the detailed implementation of the system
recommended in the feasibility study.

3.1 STRUCTURED DESIGN METHODOLOGIES

Design methodology refers to the development of a system or method for a unique


situation. Design methodology stresses the use of brainstorming to encourage innovative
ideas and collaborative thinking to work through each proposed idea and arrive at the best
solution. Meeting the needs and requirements of the end user is the most critical concern.
To employ design methodology, various analyses and testing have been done so as to
meet the desired user needs. Every input that the user input is being tested in this software.
That means the validity of each data is being checked and if found invalid necessary
warning and prompting messages are displayed. The output forms are also tested in detail
to see whether the desired output is met or not. Also, the output forms aremade clearer
and more meaningful for the user to understand.

3.2 USER INTERFACE DESIGN


User interface design is a crucial aspect of developing the Fish Farming Management
System. Understanding the users' needs is essential, as they are the ones who will interact
with the system. Therefore, it is important to address user requirements before the
development process begins. The system is designed to be user-friendly, ensuring
accessibility for users with minimal technical knowledge and those unfamiliar with fish
farming operations.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 22

The input forms used for data entry are intuitive and easy to understand. Whenever users enter
data, the system checks for validity, and if any incorrect or incomplete information is found,
meaningful prompts and warning messages are displayed. This feature enhances the user
experience, making interactions with the system smooth and efficient. Additionally, to ensure
security, users must log in with a valid username and password before accessing the system.
This authentication process safeguards sensitive data and prevents unauthorized access.

Login: This form allows users to enter their login credentials, including username and password, to gain
access to the system securely.
Registration: This form collects basic user details required to create an account in the system.
Fish Ordering: This form enables users to select and order the type and quantity of fish they want to
purchase.

3.3 DATABASE DESIGN

Database design is one of the most important parts of the system design phase. In a database
environment common data are available and are used by several users. Instead
of each program managing its own data, authorized users share data across application with
the database software managing the data as an entity. The primary objective of a database
design is fast response time to enquiries, more information at low cost, control of redundancy,
clarity and ease of use, date and program independence, accuracy and integrity of the system,
fast recovery and availability of powerful end-user languages. The theme behind a database is
to handle information as an integrated whole thus the main objective is to make information as
access easy, quick, inexpensive and flexible forthe users.

Data directory specifies the major element in the system, and care should be taken while
designing, in order to avoid unnecessary duplication of data. The entire package dependson
how the data are maintained in the system. Several tables are maintained in the systemto store
data that are required for the processing of various data as well as storing intermediate or final
processed results.
Database design mainly aims at handling large volumes of information, involving the
definitions for the structure of storage and provisions for the manipulation of information,
providing safety of information despite of system crashes due to unauthorized access.
Some conditions are satisfied in database design stage.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 23

3.3.1 DATA AND INTEGRITY CONSTRAINTS

The primary of a database design is fast response time to inquiries, more information at
low cost, control of redundancy, clarity and ease of use, accuracy and integrity of the
system, fast recovery and availability of powerful end-user languages. The theme behind
a database is to handle information as an integrated whole thus the main objective is to
make information as access easy, quick, inexpensive and flexible for the users. In this
project, we mainly concentrated into relational databases.

Relational database stores data in tables, which is turn, are composed of rows also known
as records, columns also known as fields. The fields in the relational model are: -

Primary Key: The key which is uniquely identify records. They also notify the not null
constraints.
Foreign Key: The key which references the primary key, is the data inserted in the primary
key column of the table.
Normalization

After the conceptual level, the next level of process of database design to organize the
database structure into a good shape called Normalization. The normalization simplifies
the entries, removing redundancies from the system data and finally builds a data
structure, which is both flexible and adaptable to the system. The different normal forms
obtained during the database design are given below:

In the database design, we create a database with different tables that is used to store the
data. We normalize the data in the table. Database normalization is the process of
organizing the fields and tables in a relational database to minimize redundancy and
dependency. Normalization usually involves dividing large tables into smaller (and less
redundant) tables and defining relationships between them. The objective is to isolate data
so that additions, deletions, and modifications of a field can be made in just one tableand
then propagated through the rest of the database via the defined relationships.

In the project I have made used of the 3rd normal form, Third Normal Form (3NF) is a
property of database tables. A relation is in third normal form if it is in Second Normal
Form and there are no functional (transitive) dependencies between two (or more)
nonprimary key attributes. The overall objective in the development of database
technology has been to treat data as an organizational resource and as an integrated whole.
Database Management System allows data to be protected and organized separately from
other resources. Database is an integrated collection of data. This is the difference
between logical and physical data.
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 24

3.4 OUTPUT DESIGN

The output design of the Fish Farming Management System ensures that information is presented
efficiently and in a user-friendly manner. The results of various processes should be clear and well-
structured to enhance decision-making and usability. Well-designed output improves system
performance and helps users effectively interact with the system.

The output design phase focuses on converting system-processed data into meaningful and easily
understandable formats for users. Efficient and well-structured output enhances user experience,
making system interaction seamless and improving decision-making in fish farming management.The
major output forms are as follows:
1. View Inventory – Users can view fish stock and feed inventory details, including quantity, type,
and availability.
2. View Sales Report – Users can check sales records, including details of buyers, quantity sold,
and revenue generated.
3. View Expenses Report – Displays details of all expenditures, including feed purchases,
maintenance costs, and labor wages.
4. View Farmer Activities – Admin can monitor actions taken by farmers, such as stock additions
and updates.
5. View Performance Analytics – Graphical and tabular representations of farm performance,
including growth rate and profit trends.

3.5 TABLE DESIGN

Database name: Project


TABLE NAME TABLE DESCRIPTION

user_farmer Stores details about farmers managing fish


farms.
user_fishstock Records stocked fish details (species,
quantity, stocking date).
user_healthrecords Stores health records of fish (diseases,
treatments, checkups).
user_inventory Manages fish farm tools, equipment, and
resources.
user_financialrecord Tracks financial transactions related to the
fish farm.
user_order Stores customer order details (buyer, status,
date).
user_orderitem Tracks individual items (fish) in an order.

user_cart Stores customer shopping cart data.

user_cartitems Stores individual items added to a user's cart.

user_creditcardpayment Tracks payments made via credit cards.

user_feedschedule Manages fish feeding schedules (time, type of


feed, quantity).

Fig 3.1: table overview


CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 25

Table no: 1
Table name: user_farmer
Table Description: Stores farmer details.
Column Name Data Type Constraints

PRIMARY KEY,
Id INT AUTO_INCREMENT

user_id INT FOREIGN KEY REFERENCES user_user(id)

farm_name VARCHAR (225) NOT NULL

location VARCHAR (225) NOT NULL

contact VARCHAR (20) NOT NULL

Fig 3.2: table user_farmer

Table no: 2
Table name: user_fishstock
Table Description: Manages stocked fish details.

Column Name Data Type Constraints


PRIMARY KEY,
Id INT AUTO_INCREMENT
FOREIGN KEY REFERENCES
Farmer_id INT user_farmer(id)

species VARCHAR(255) NOT NULL

quantity INT NOT NULL

stocking_date DATE NOT NULL

Fig 3.3: table user_fishstock

Table no: 3
Table name: user_feedschedule
Table description: Contains all the details of admin add new plans
Column Name Data Type Constraints
PRIMARY KEY,
Id INT AUTO_INCREMENT
FOREIGN KEY REFERENCE user_fishstock (id)
fish_stock_id INT

feed_type VARCHAR (225) NOT NULL

quantity_kg FLOAT NOT NULL

feeding_time TIME NOT NULL

feeding_date DATE NOT NULL

Fig 3.4: table plan

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 26

Table no: 4
Table name: user_healthrecord
Table Description: Logs fish health information.
Column Name Data Type Constraints
PRIMARY KEY,
Id INT AUTO_INCREMENT
FOREIGN KEY REFERENCE
fish_stock_id INT user_fishstock (id)

Disease VARCHAR (225) NULL

treatment TEXT NULL

checkup_date DATE NOT NULL

Fig 3.5: table user_healthrecord


Table no: 5
Table name: user_ inventory
Table Description: Tracks farming resources and tools.

Column Name Data Type Constraints


PRIMARY KEY,
Id INT AUTO_INCREMENT
FOREIGN KEY REFERENCES
farmer_id INT user_farmer(id)

item_name VARCHAR (225) NOT NULL

quantity INT NOT NULL

purchase_date DATE NULL

Fig 3.6: table user_inventory


Table no: 6
Table name: user_ financialrecord
Table Description: Tracks farm financial transactions.
Column Name Data Type Constraints
PRIMARY KEY,
Id INT AUTO_INCREMENT
FOREIGN KEY REFERENCES
Farm_id INT user_farmer(id)

Transaction_type ENUM ('expense', 'income') NOT NULL

Amount DECIMAL (10,2) NOT NULL

Description TEXT NULL

Transaction_date DATE NOT NULL

Fig 3.7: table user_financialrecord

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 27

Table no: 7
Table name: user_ order
Table Description: Manages customer orders

Column Name Data Type Constraints


PRIMARY KEY,
Id INT AUTO_INCREMENT
FOREIGN KEY REFERENCES
farmer_id INT user_farmer(id)

order_date DATE NOT NULL


ENUM('pending', 'completed',
Status 'cancelled') DEFAULT 'pending'

Fig 3.8: table user_order

Table no: 8
Table name: user_ orderitem
Table Description: Tracks items sold in each order.

Column Name Data Type Constraints


PRIMARY KEY,
Id INT AUTO_INCREMENT
FOREIGN KEY REFERENCES
Order_id INT user_order(id)
FOREIGN KEY REFERENCES
Fish_stock_id INT user_fishstock(id)

Quantity INT NOT NULL

Price_per_unit DECIMAL (10,2) NOT NULL

Fig 3.9: table user_orderitem

Table no: 9
Table name: user_ cart
Table Description: Stores customer cart data before order placement.
Column Name Data Type Constraints
PRIMARY KEY,
Id INT AUTO_INCREMENT
FOREIGN KEY REFERENCES
user_id INT user_user(id)
DEFAULT
Created_at TIMETAMP CURRENT_TIMESTAMP

Fig 4.0 table user_cart

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 28

Table no: 10
Table name: user_ cartitem
Table Description: Tracks items in a user’s cart.

Column Name Data Type Constraints


PRIMARY KEY,
Id INT AUTO_INCREMENT
FOREIGN KEY REFERENCES
Order_id INT user_order(id)
FOREIGN KEY REFERENCES
Fish_stock_id INT user_fishstock(id)

Quantity INT NOT NULL

Fig 4.1: table user_cartitem

Table no: 11
Table name: user_ cartitem
Table Description: Records payment

Column Name Data Type Constraints


PRIMARY KEY,
Id INT AUTO_INCREMENT
FOREIGN KEY REFERENCES
Order_id INT user_order(id)

Amount_paid DECIMAL (10,2) NOT NULL

Payment_date DATE NOT NULL

Fig 4.2 : table user_creditcardpayment

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 29

4.CODING

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 30

4.1 PROGRAM CODE PREPARATION

When considered as a step-in software engineering, coding is viewed as a natural consequence


of design. However, programming language characteristics and coding style can profoundly
affect software quality and maintainability. The coding step translates a detail design
representation into a programming language realization. The translation process continues
when a compiler accepts source code as input and produces machine-independent object code
as output. The initial translation step in detail design to programming language is a primary
concern in the software engineering context. Improper interpretation of a detail design
specification can lead to erroneous source code. Style is an important attribute of source code
and can determine the intelligibility of a program. The elements of a style include internal
documentation, methods for data declaration, procedures for statement construction, and I/O
coding and declaration. In all cases, simplicity and clarity are key characteristics. An offshoot
of coding style is the execution time and/or memory efficiency that is achieved. Coding is the
phase in which we actually write programs using a programming language. In the coding phase,
design must be translated into a machine-readable form. If design is performed in a detailed
manner, coding can be accomplished mechanistically. It was the only recognized development
phase in early or unsystematic development processes, but it is just one of several phases in a
waterfall process. The output of this phase is an implemented and tested collection of modules.

In my project I have made use of the python to code the whole project and have made use of
MySQL to act as a database to store the results of the processed data which is the output of the
project

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 29

4.2 IMPLEMENTATION OF SECURITY


The software quality assurance is comprised of a variety of tasks associated with five major
activities.

• Application of technical methods


• Conduct of formal technical reviews.
• Software testing.
• Enforcement of standard.
• Record keeping and recording.

The quality begins with a set of technical methods and tools that help the analyst to
achieve high quality specification and the designer to develop high quality design. The
next activity involves assessment for quality for the design that is created which is the
formal technical review. Software testing combines a multi-step strategy with a series of
test case design methods that help to ensure effective error detection. To enforce data
integrity, you can constrain or restrict the data values that users can insert, delete, or
update in the database. Recordkeeping refers to the entire range of functions involved in
creating and managing records throughout their life cycle. It includes: creating / capturing
adequate records. maintaining them in trustworthy recordkeeping systems for defined
retention periods.

4.2.1 DATA SECURITY


The software maintains a well-organized database for storing the details that are provided
by the user. This helps us to eliminate the entering of invalid data. Data is not accessible
to unauthorized users. The system analyst will provide the test data, specially designed
to show that the system will operate successfully in all its aspects and produce expected
results under expected conditions. Preparation of test data and the checking of results
should be carried out in conjunction with the appropriate users and operational
departments. Also, the extent to which the system should be tested must be planned.

4.2.2 USER AND ACCESS RIGHTS

Admin: Allows the admin to manage farmer accounts and monitor farm activities without
making direct changes.

Farmer: Grants farmers full control over farm operations, including managing fish stock,
feeding schedules, inventory, financial records, and customer orders.

Users: Enables customers to browse fish stock, place orders, make payments, track purchases, and
communicate with farmers.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 30

5. SYSTEM TESTING

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 31

5.SYSTEM TESTING

System testing is the stage of implementation highly aimed at ensuring that the system works
accurately and efficiently before the live operation commences. Testing is vital to the success
of the system. The primary objective of testing is to derive a set of tests that has the highest
likelihood for uncovering defects in then software. The system test in implementation should
conform that all is correct and an opportunity to show the users that the system works as
expected. It accounts the largest percentage of technical effort in the software development
process. Testing phase in the development cycle validates the code against the functional
specification.

There are mainly two approaches of testing namely, functional testing and structural testing.
Functional testing is based on the functionality of the program and not the structure of the
program. The test cases are solely on the basis of specification or requirements of the program.
This type of testing is also called as black box testing. Structural testing is also called as white
box testing or glass box testing. Here the internal structure of the program is tested.
Test cases are designed by examining the logic of the program. “Online Service Booking
System” focuses on the functionality of the system and hence it mainly does the
functional/black box testing. The test cases of this system are completely based on the
specifications of the system.

The application was tested and found to be working as expected. There was no abnormal
behavior reported during the testing of the program. Testing is a method by which we try
reducing the testing efforts and bringing out the maximum output. Testing helps us in knowing
whether the logical assumptions that we have taken for the system are correct, and if they are
correct, we have obtained our goal. We test the system to know the errors, to check the validity
of the information, to also group the modules with the aim that we meet the system
requirements according to the system needs.

Testing is vital to the success of the system. System testing makes logical assumption that if all
the parts of the system are correct, we have achieved the mission successfully. System testing
is the stage of implementation that is aimed at assuring that the system works accurately and
efficiently before the live operation commences.
Testing includes several levels of testing. They are:
4.2 Unit Testing
4.3 Integration Testing
4.4 System Testing
4.5 Acceptance Testing

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 32

Client-Side Validation
Client-side validation is something that will happen on users' browser. The validation will
occur before the data gets posted back to server. It is a good idea to have client-side
validation as the user gets to know what needs to be changed immediately, i.e., no trips to
servers are made. JavaScript is most widely used to perform client-side validation.

Server-Side Validation
Server-side validation occurs at server. The benefit of having server-side validation is that
if the user somehow bypasses the client-side validation (accidentally or deliberately), then
we can catch the problem on the server side. So, having server-side validation provides
more security and ensures that no invalid data gets processed by the application. Server-
side validation is done by writing our custom logic for validating all the input.

The different types of testing are as follows:

5.1 Unit Testing


Unit testing is the first level of testing. In this process the code produced during the coding
phase is verified. The goal is to test the internal logic of the modules. Each unit was found
to be working satisfactorily. This testing is carried out during the programming stage
itself. In this testing step, each module is found to be working satisfactorily as regards to
the expected output from the module. Using a method called white box testing in which
the software tester has knowledge of the inner workings, structure and language of the
software, or at least its purpose and where each module or component of the software is
tested individually. In the unit test case, we will be testing the separate modules of the
Software. We will test the components by passing data through it and we will be
monitoring data to find the errors. We will be looking for entry and exit conditions of the
data. We will make sure that all the components work without any troubles.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 33

Function Test Condition Expected Actual Results Status


Tested Results

Username and Invalid Access Denied Access Denied Pass


Password Username and
Password
Logout Invalid Access Denied Access Denied Pass
Function Infiltration with
wrong
credentials

5.2 Integration Testing


After splitting the program into units, the units were tested together to see the defects between
each module and function. It is testing two or more modules or functions together with the
intent of finding interface defects between the modules or functions. Testing completed at as
part of unit or functional testing, and sometimes, becomes its own standalone test phase. On a
larger level, integration testing can involve putting together groups of modules and functions
with the goal of completing and verifying that the system meets the system requirements.

5.3 User Acceptance Testing


The Fish Farming Management System was tested by farmers and customers to ensure it met
the required functionality and operations. Users provided feedback, confirming the system was
satisfactory and met their needs. During testing, the system was evaluated against the initial
requirements, and necessary improvements were made for better usability, efficiency, and
reliability. Continuous feedback was gathered throughout development to refine the system and
ensure user acceptance.

This was done regard to the following point:

• Input screen design

• Output screen design

5.4 Test Case Design


Test case design refers to how you set-up your test-cases. It is important that your tests are
designed well, or you could fail to identify bugs and defects in your software during testing.
Designing good test cases ensure that every aspect of your software gets tested so that you can
find and fix any issues.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 34

Function Test Condition Expected Actual Result Status


Tested Result

Name Entered non- Not allowed Not allowed Pass


Characters
Phone Number Entered more Not allowed Not allowed Pass
than 10 digits
Login Invalid email id Not allowed Not allowed Pass
or password

E-mail Entered invalid Not allowed Not allowed Pass


email

5.5 Test Report and Debugging


Testing means verifying correct behavior. Testing can be done at all stages of module
development: requirements analysis, interface design, algorithm design, implementation, and
integration with other modules. In the following, attention will be directed at implementation
testing. Implementation testing is not restricted to execution testing. An implementation can
also be tested using correctness proofs, code tracing, and peer reviews, as described below.

Debugging is a cyclic activity involving execution testing and code correction. The testing that
is done during debugging has a different aim than final module testing. Final module testing
aims to demonstrate correctness, whereas testing during debugging is primarily aimed at
locating errors. This difference has a significant effect on the choice of testing strategies.

Report error conditions immediately - Much debugging time is spent zeroing in on


the cause of errors. The earlier an error is detected, the easier it is to find the cause. If
an incorrect module state is detected as soon as it arises then the cause can often be
determined with minimal effort. If it is not detected until the symptoms appear in the
client interface then may be difficult to narrow down the list of possible causes.

Maximize useful information and ease of interpretation - It is obvious that


maximizing useful information is desirable, and that it should be easy to interpret. Ease
of interpretation is important in data structures. Some module errors cannot easily be
detected by adding code checks because they depend on the entire structure. Thus, it is

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 35
important to be able to display the structure in a form that can be easily scanned for
correctness.

Minimize useless and distracting information - Too much information can be as


much of a handicap as too little. If you have to work with a printout that shows entry
and exit from every procedure in a module then you will find it very difficult to find
the first place where something went wrong. Ideally, module execution state reports
should be issued only when an error has occurred. As a general rule, debugging
information that says "the problem is here" should be preferred in favour of reports that
say "the problem is not here".

Avoid complex one-use testing code - One reason why it is counterproductive to add
module correctness checks for errors that involve the entire structure is that the code to
do so can be quite complex. It is very discouraging to spend several hours debugging a
problem, only to find that the error was in the debugging code, not the module under
test. Complex testing code is only practical if the difficult parts of the code are reusable.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 36

6. SYSTEM IMPLEMENTATION
AND MAINTENANACE

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 37

6.SYSTEM IMPLEMENTATION AND MAINTENANCE


Implementation is an activity that is contained throughout the development phase. It is the
process of bringing a developed system into operational use and turning it over to the user. The
new system and its components are to be tested in a structured and planned manner. A
successful system should be delivered and users should have the confidence that the system
would work efficiently and effectively. The more complex the system being implemented the
more involved will be the system analysis and design effort required for implementation.
Implementation is the stage of the system when the theoretical design is turned into working
system. The implementation involves careful planning investigation of the current system and
its constraints on implementing, design of methods to achieve the changeover, training of user
over procedure and evaluation change over method.
There are three types of implementations:

• Implementation of a computer system to replace a manual system. The problems


involved are converting files, training users, creating accurate files, and verifying
printouts for integrity.

• Implementation of a new computer system to replace an existing one. This is usually a


difficult conversion. If not properly planned, there can be many problems. Some larger
systems have taken as long as a year to convert.

• Implementation of a modified application to replace an existing one using the same


computer. This type of conversion is relatively easy to handle, provided there are no
major changes in files.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 38

7. SCOPE OF PROJECT

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 39

7.SCOPE OF PROJECT

The Fish Farming Management System simplifies farm management by efficiently handling fish stock,
feeding schedules, inventory, financial records, and customer orders. It ensures seamless interaction between
farmers, customers, and the admin while enhancing overall productivity and decision-making.

• To streamline the process of managing fish stock, feeding schedules, and sales.
• The system generates valuable reports that can be used for various purposes.
• It satisfies the requirements of farmers, customers, and administrators.
• Be easy to understand and use for all users.
• Be simple to operate with minimal training.
• Have an intuitive and user-friendly interface.
• Be scalable for future expansions and additional features.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 40

8.FUTURE ENHANCEMENTS

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 41

8.FUTURE ENHANCEMENTS

The Fish Farming Management System can be enhanced by integrating IoT-based water quality
monitoring to automatically track parameters like temperature, pH levels, and oxygen levels,
ensuring optimal fish health. Additionally, incorporating AI-driven predictive analytics can help
farmers anticipate fish growth rates, disease outbreaks, and ideal harvesting times, improving
efficiency and profitability. A mobile application can also be developed to allow farmers and
customers to access the system anytime, improving convenience and accessibility.

Future upgrades may include automated feeding systems that dispense the right amount of feed
at scheduled times, reducing waste and ensuring proper nutrition for the fish. Expanding the
system with blockchain-based traceability can help in tracking fish from farm to market,
enhancing transparency and trust among buyers. Integration with e-commerce platforms will
allow farmers to sell fish online, reaching a larger customer base and boosting sales. These
enhancements will make the system more intelligent, efficient, and scalable for the growing
needs of the aquaculture industry.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 42

9.CONCLUSION

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 43

9.CONCLUSION

Our project is a humble initiative aimed at simplifying fish farm management for farmers and
customers. By streamlining processes such as fish stock management, feeding schedules,
financial tracking, and customer orders, the system enhances efficiency and productivity in
aquaculture. User-friendly features and an intuitive interface ensure that farmers can easily
monitor and manage their operations, while customers can seamlessly place orders and track
purchases.

This system serves as a powerful tool to meet the growing needs of the fish farming industry.
The structured software planning and continuous improvements will enable scalability and
adaptability for future enhancements. By providing a well-organized and efficient solution, the
Fish Farming Management System ensures that users can effectively manage their farms and
make informed decisions, ultimately contributing to a more sustainable and profitable
aquaculture industry.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 44

10.BIBLIOGRAPHY

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 45

10. BIBLIOGRAPHY

www.beginwebprogramming.com

www.stackoverflow.com

www.W3Schools.com

www.tutorialspoint.com

BOOK OF STUDY

Software Engineering (3rd ed.) By K.K. Aggarwal & Yogesh Singh

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 46

APPENDIX I – CODING

Views.py

from django.shortcuts import render, redirect, get_object_or_404


from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login, logout
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.auth import get_user_model
import re
from user.models import *
from user.forms import *
from django.views.decorators.cache import never_cache
from django.contrib.auth.decorators import user_passes_test
from django.http import JsonResponse
import json
from django.views.decorators.csrf import csrf_exempt
User = get_user_model()
from django.urls import reverse_lazy
from django.http import JsonResponse
from django.http import JsonResponse, HttpResponseBadRequest
from django.conf import settings
from django.views import View
from django.utils.decorators import method_decorator
from django.contrib.auth.hashers import check_password
from datetime import datetime
from django.db.models import Sum

# Create your views here.

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 47
################################################ User
######################################################

# signup view for users.


@never_cache
def signup(request):
if request.user.is_authenticated:
return redirect('home')

if request.method == 'POST':
username = request.POST['username']
address = request.POST['address']
phone = request.POST['phone']
image = request.FILES.get('image')
email = request.POST['email']
password = request.POST['pass']
confirm_password = request.POST['re_pass']

if password != confirm_password:
messages.error(request, "Passwords do not match.")
return redirect('signup')

if not re.match(r'^(?=.*[A-Z])(?=.*\W)(?=.*\d).{8,}$', password):


messages.error(
request,
"Password must be at least 8 characters long, contain one uppercase letter, one
special character, and one digit."
)
return redirect('signup')

if User.objects.filter(username=username).exists():
messages.error(request, "Username already exists.")
return redirect('signup')
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 48

if User.objects.filter(email=email).exists():
messages.error(request, "Email already registered.")
return redirect('signup')

user = User.objects.create_user(username=username, email=email,


address=address, phone=phone, image=image, password=password)
user.save()
login(request, user)
messages.success(request, f"Welcome, {user.username}! Your account has been
created successfully.")
return redirect('home')

return render(request, 'user/signup.html')

# login view for users.


@never_cache
def signin(request):
if request.user.is_authenticated:
return redirect('home')

if request.method == 'POST':
username = request.POST['username']
password = request.POST['password']

user = authenticate(request, username=username, password=password)

if user is not None:


login(request, user)
messages.success(request, f"Welcome, {user.username}!")
return redirect('home')
else:
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 49
messages.error(request, "Invalid username or password.")
return redirect('signin')

return render(request, 'user/signin.html')

# signout view for users.


@login_required
def signout(request):
logout(request)
messages.success(request, "You have been logged out.")
return redirect('home')

# home page.
def home(request):
fish_stocks = FishStock.objects.all() # Fetch all fish stock records
context = {
'fish_stocks': fish_stocks,
}
return render(request, "user/index.html", context)

# add to cart view.


@csrf_exempt
def add_to_cart(request):

if not request.user.is_authenticated:
return JsonResponse({"success": False, "message": "You need to be logged in to
add items to the cart.", "redirect_to": "signin"})

if request.method == "POST":
try:
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 50
data = json.loads(request.body)
fish_id = data.get("fish_id")
quantity = int(data.get("quantity"))

if quantity <= 0:
return JsonResponse({"success": False, "message": "Quantity must be greater
than 0."})

# Fetch Farmer from FishStock


try:
fish = FishStock.objects.get(id=fish_id)
farmer = fish.farmer # Assuming FishStock is linked to Farmer
except FishStock.DoesNotExist:
return JsonResponse({"success": False, "message": "Fish stock not found."})

if quantity > fish.quantity:


return JsonResponse({"success": False, "message": "Not enough stock
available."})

# Fetch or create cart


cart, created = Cart.objects.get_or_create(user=request.user)

# Fetch or create cart item


cart_item, created = CartItem.objects.get_or_create(cart=cart, fish_stock=fish,
farmer=farmer)
if not created:
cart_item.quantity += quantity
else:
cart_item.quantity = quantity
cart_item.save()

return JsonResponse({"success": True, "message": "Item added to cart."})

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 51
except json.JSONDecodeError:
return JsonResponse({"success": False, "message": "Invalid JSON format."})
except Exception as e:
return JsonResponse({"success": False, "message": f"Error: {str(e)}"})

return JsonResponse({"success": False, "message": "Invalid request method."})

# cart page.
def cart_page(request):
if not request.user.is_authenticated:
messages.error(request, "You need to be logged in to add items to the cart.")
return redirect("signin")
cart, created = Cart.objects.get_or_create(user=request.user)
cart_items = CartItem.objects.filter(cart=cart)
total_price = sum(item.get_total_price() for item in cart_items)

return render(request, 'user/cart.html', {


'cart_items': cart_items,
'total_price': total_price
})

# remove the cart items.


def remove_from_cart(request, id):
if not request.user.is_authenticated:
messages.error(request, "You need to be logged in to add items to the cart.")
return redirect("signin")
cart_item = get_object_or_404(CartItem, id=id)
cart_item.delete()
return redirect('cart')

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 52
# checkout view.
def checkout_view(request):
if not request.user.is_authenticated:
messages.error(request, "You need to be logged in to proceed to checkout.")
return redirect("signin")

cart, created = Cart.objects.get_or_create(user=request.user)


cart_items = CartItem.objects.filter(cart=cart)
total_price = sum(item.get_total_price() for item in cart_items)

if request.method == "POST":
card_holder_name = request.POST.get("card_holder_name")
card_number = request.POST.get("card_number")
payment_status = "Initiated" # Default status

if len(card_number) < 4:
messages.error(request, "Invalid card number. Please enter a valid card
number.")
return redirect("checkout")

card_number_last4 = card_number[-4:]

payment = CreditCardPayment.objects.create(
user=request.user,
card_holder_name=card_holder_name,
card_number_last4=card_number_last4,
amount_paid=total_price,
status=payment_status,
)

try:
payment.status = "Success"
payment.save()
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 53

order = Order.objects.create(
user=request.user,
CreditCardPayment=payment,
order_number="ORDER" + str(payment.id),
order_total=total_price,
status="Pending"
)

for cart_item in cart_items:


OrderItem.objects.create(
user=request.user,
order=order,
CreditCardPayment=payment,
fish_stock=cart_item.fish_stock,
farmer=cart_item.farmer,
quantity=cart_item.quantity,
price=cart_item.get_total_price(),
)

fish_stock = cart_item.fish_stock
fish_stock.quantity -= cart_item.quantity
fish_stock.save()

cart_items.delete()

messages.success(request, "Payment successful! Your order has been placed.")


return redirect("order_complete")

except Exception as e:
print(f"Error during payment processing: {str(e)}")
payment.status = "Failed"
payment.save()
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 54
messages.error(request, "Payment failed. Please try again.")
return redirect("checkout")

return render(request, "user/checkout.html", {'total_price': total_price })

# order complete view.


def order_complete(request):
return render(request, 'user/order_complete.html')

# about page.
def about(request):
return render(request, 'user/about.html')

# user profile page.


def profile(request):
if not request.user.is_authenticated:
return redirect('signin')

current_user = request.user
orders = OrderItem.objects.filter(user=request.user).order_by('-created_at')

context = {
'orders': orders,
'profile': current_user,
}
return render(request, 'user/profile.html', context)

# edit user profile.


def edit_user_profile(request):
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 55
user = request.user

if request.method == 'POST':
username = request.POST.get('username')
email = request.POST.get('email')
address = request.POST.get('address')
phone = request.POST.get('phone')
image = request.FILES.get('image')

# Validate if the username or email is already taken (except by the current user)
if User.objects.exclude(id=user.id).filter(username=username).exists():
messages.error(request, "This username is already taken.")
return redirect('edit_user_profile')

if User.objects.exclude(id=user.id).filter(email=email).exists():
messages.error(request, "This email is already in use.")
return redirect('edit_user_profile')

# Update User and Profile


user.username = username
user.email = email
user.address = address
user.phone = phone
user.save()

if image:
user.image = image

user.save()

messages.success(request, "Your profile has been updated successfully!")


CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 56
return redirect('profile')

return render(request, 'user/edit_profile.html', {'profile': user})

################################################### Farmer
####################################################################

# farmer login view.


@never_cache
def farmer_login(request):
print("farmer login")
if request.method == 'POST':
name = request.POST['username']
password = request.POST['password']
print("farmer post", name, password)

try:
# Fetch the farmer object based on the username (or name field)
farmer = Farmer.objects.get(name=name)
print("try block", farmer)

# Check if the password is correct


if check_password(password, farmer.password):
print("pass")
# Store the farmer ID in the session
request.session['farmer_id'] = farmer.id
request.session['farmer_name'] = farmer.name
request.session['image'] = farmer.image.url if farmer.image else None
print("request.session", request.session['farmer_id'])
request.session.save()

# If password matches, login the farmer


CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 57
request.session['farmer_id'] = farmer.id
return redirect("dashboard")
else:
messages.error(request, "Username or password is incorrect.")
return redirect('farmer_login')
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

return render(request, "farmer/farmer_login.html")

# add fish stock.


def add_fish_stock(request):
farmer_id = request.session.get('farmer_id')
if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
return redirect('farmer_login') # Redirect to login page if farmer ID not found in
session

try:
# Fetch the farmer object from the database using the farmer ID
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmerrrr details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

# Handle form submission for adding fish stock


if request.method == 'POST':
form = FishStockForm(request.POST, request.FILES)
if form.is_valid():
fish_stock = form.save(commit=False)
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 58
fish_stock.farmer = farmer
fish_stock.save()
messages.success(request, "Fish stock record added successfully!")
return redirect('dashboard')
else:
messages.error(request, "Please correct the errors below.")
else:
form = FishStockForm()

return render(request, 'admin/add_fish_stock.html', {'form': form})

# view the orders of user.


def farmer_orders(request):
farmer_id = request.session.get('farmer_id')

if farmer_id:
try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
farmer = None
messages.error(request, "Farmer not found in session.")
else:
farmer = None
# orders = OrderItem.objects.all().order_by('-created_at')

if request.user.is_superuser:
orders = OrderItem.objects.all()
elif farmer:
orders = OrderItem.objects.filter(farmer=farmer).order_by('-created_at')
else:
orders = OrderItem.objects.none()
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 59

if request.user.is_superuser:
context = {'orders': orders, 'view_only': True, 'farmer': farmer}
else:
context = {'orders': orders, 'view_only': False, 'farmer': farmer}

return render(request, 'farmer/orders.html', context)

# edit orders.
def edit_order(request, id):
farmer_id = request.session.get('farmer_id')

if not farmer_id:
messages.error(request, "Session expired. Please log in again.")
return redirect("farmer_login")

try:
farmer = Farmer.objects.get(id=farmer_id)
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect("farmer_login")

try:
# Ensure the farmer can only edit their own orders
order = Order.objects.get(pk=id)
print(order)
except OrderItem.DoesNotExist:
messages.error(request, "Order not found or you do not have permission to edit this
order.")
return redirect("farmer_orders")

if request.method == "POST":
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 60
status = request.POST.get("status")
if status:
order.status = status
order.save()
messages.success(request, f"Order status updated to {status}.")
else:
messages.error(request, "Invalid status value.")

return redirect("farmer_orders")

################################################ Admin
#####################################################################

# admin login page


@never_cache
def admin_login(request):
if request.user.is_superuser:
return redirect('dashboard')

if request.method == 'POST':
username = request.POST['username']
password = request.POST['password']
user = authenticate(username=username, password=password)

if user is not None and user.is_superuser:


login(request,user)
return redirect("dashboard")
else:
messages.error(request,"User name or password is incorect")
return redirect('admin_login')
return render(request,"admin/admin_login.html")
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 61

# admin logout
def admin_logout(request):
logout(request)
request.session.flush()
messages.success(request, "logged out succesfully")
return redirect('home')

# list the users who are registered.


def list_registered_users(request):
users = User.objects.filter(is_superuser=False)
context = {
'users': users,
}
return render(request, 'admin/list_user.html', context)

# list the farmers.


@user_passes_test(lambda u: u.is_superuser, login_url='/admin_login')
def farmer(request):
farmers = Farmer.objects.filter(role='farmer')
context = {
'farmers': farmers
}
return render(request, 'admin/farmer.html', context)

# add farmers.
@user_passes_test(lambda u: u.is_superuser, login_url='/admin_login')
def add_farmers(request):
if request.method == 'POST':
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 62
form = FarmerForm(request.POST, request.FILES)
if form.is_valid():
form.save()
messages.success(request, "Fish stock record added successfully!")
return redirect('farmer')
else:
messages.error(request, "Please correct the errors below.")
else:
form = FarmerForm()

return render(request, 'admin/add_farmers.html', {'form': form})

# farmer profile.
def farmer_profile(request):
farmer_id = request.session.get('farmer_id')
try:
farmer = Farmer.objects.get(id=farmer_id)
except Farmer.DoesNotExist:
farmer = None
messages.error(request, "Farmer not found in session.")

return render(request, 'farmer/profile.html', {'farmer': farmer})

# edit farmer profile.


def edit_farmer_profile(request, id):
farmer = get_object_or_404(Farmer, id=id)

if request.method == 'POST':
farmer.name = request.POST.get('name', farmer.name)
farmer.email = request.POST.get('email', farmer.email)
farmer.address = request.POST.get('address', farmer.address)
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 63
farmer.phone = request.POST.get('phone', farmer.phone)

# Handle image upload


if 'image' in request.FILES:
farmer.image = request.FILES['image']

farmer.save()
messages.success(request, "Farmer details updated successfully!")
return redirect('farmer_profile') # Redirect to farmer list or details page

return render(request, 'farmer/edit_profile.html', {'farmer': farmer})

# admin dashboard view.


def dashboard(request):
print(request.user)
farmer_id = request.session.get('farmer_id')
print("Session ID:", request.session.session_key)
print(f"Session ID from request: {request.COOKIES.get('sessionid')}")
print(farmer_id)

if farmer_id:
try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
farmer = None
messages.error(request, "Farmer not found in session.")
else:
farmer = None

if request.user.is_superuser:
fish_stocks = FishStock.objects.all()
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 64
elif farmer:
fish_stocks = FishStock.objects.filter(farmer=farmer)
else:
fish_stocks = FishStock.objects.none()

context = {
'fish_stocks': fish_stocks,
'view_only': request.user.is_superuser,
'farmer': farmer
}

return render(request, 'admin/dashboard.html', context)

# edit the fish stock.


def edit_fish_stock(request, stock_id):
farmer_id = request.session.get('farmer_id')
if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
return redirect('farmer_login') # Redirect to login page if farmer ID not found in
session

try:
# Fetch the farmer object from the database using the farmer ID
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

fish_stock = get_object_or_404(FishStock, id=stock_id)

if request.method == 'POST':
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 65
form = FishStockForm(request.POST, instance=fish_stock)
if form.is_valid():
form.save()
messages.success(request, "Fish stock record updated successfully!")
return redirect('dashboard')
else:
messages.error(request, "Please correct the errors below.")
else:
form = FishStockForm(instance=fish_stock)

return render(request, 'admin/edit_fish_stock.html', {'form': form, 'fish_stock':


fish_stock})

# list the inventory items.


# @user_passes_test(lambda u: u.is_superuser, login_url='/admin_login')
def inventory_list(request):
farmer_id = request.session.get('farmer_id')

if farmer_id:
try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
farmer = None
messages.error(request, "Farmer not found in session.")
else:
farmer = None

# Filter inventory items based on user type


if request.user.is_superuser:
# Superuser can view all inventory items
inventory_items = Inventory.objects.all()
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 66
elif farmer:
# Regular farmers can only view their own inventory items
inventory_items = Inventory.objects.filter(farmer=farmer)
else:
# No items if the farmer is not identified
inventory_items = Inventory.objects.none()

context = {
'inventory_items': inventory_items,
'view_only': request.user.is_superuser
}

return render(request, 'admin/inventory.html', context)

# add inventory items.


def add_inventory(request):
farmer_id = request.session.get('farmer_id')

if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
return redirect('farmer_login') # Redirect to login page if farmer ID not found in
session

try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

if request.method == 'POST':
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 67
form = InventoryForm(request.POST)
if form.is_valid():
inventory_item = form.save(commit=False) # Don't save yet
inventory_item.farmer = farmer # Link to the logged-in farmer
inventory_item.save() # Now save the item
messages.success(request, "Inventory item added successfully!")
return redirect('inventory')
else:
messages.error(request, "Please correct the errors below.")
else:
form = InventoryForm()

return render(request, 'admin/add_inventory.html', {'form': form})

# edit the inventory items.


def edit_inventory(request, inventory_id):
farmer_id = request.session.get('farmer_id')
if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
return redirect('farmer_login') # Redirect to login page if farmer ID not found in
session

try:
# Fetch the farmer object from the database using the farmer ID
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

inventory_item = get_object_or_404(Inventory, id=inventory_id)


CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 68

if request.method == 'POST':
form = InventoryForm(request.POST, instance=inventory_item)
if form.is_valid():
form.save()
messages.success(request, "Inventory item updated successfully!")
return redirect('inventory') # Redirect to the dashboard or appropriate page
else:
messages.error(request, "Please correct the errors below.")
else:
form = InventoryForm(instance=inventory_item) # Pre-populate the form with
existing data
return render(request, 'admin/edit_inventory.html', {'form': form, 'inventory_item':
inventory_item})

# feed schedule view.


def feed_schedule_view(request):
farmer_id = request.session.get('farmer_id')

if farmer_id:
try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
farmer = None
messages.error(request, "Farmer not found in session.")
else:
farmer = None

if request.user.is_superuser:
# Superusers can see all fish stocks
feed_schedule = FeedSchedule.objects.all()
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 69
elif farmer:
# Regular farmers can only see their own fish stocks
feed_schedule = FeedSchedule.objects.filter(fish_stock__farmer=farmer)
else:
feed_schedule = FeedSchedule.objects.none()

if request.user.is_superuser:
context = {'feed_schedule': feed_schedule, 'view_only': True}
else:
context = {'feed_schedule': feed_schedule, 'view_only': False}

return render(request, 'admin/feed_schedule.html', context)

# add feed schedule.


def add_feed_schedule(request):
farmer_id = request.session.get('farmer_id')
if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
return redirect('farmer_login') # Redirect to login page if farmer ID not found in
session

try:
# Fetch the farmer object from the database using the farmer ID
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

if request.method == 'POST':
form = FeedScheduleForm(request.POST)
if form.is_valid():
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 70
form.save()
messages.success(request, "Feed Schedule added successfully!")
return redirect('feed_schedule')
else:
messages.error(request, "Please correct the errors below.")
else:
form = FeedScheduleForm()

return render(request, 'admin/add_feed_schedule.html', {'form': form})

# edit feed schedule.


def edit_feed_schedule(request, id):
farmer_id = request.session.get('farmer_id')
if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
return redirect('farmer_login') # Redirect to login page if farmer ID not found in
session

try:
# Fetch the farmer object from the database using the farmer ID
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

feed_schedule = get_object_or_404(FeedSchedule, id=id)

if request.method == 'POST':
form = FeedScheduleForm(request.POST, instance=feed_schedule)
if form.is_valid():
form.save()
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 71
messages.success(request, "Inventory item updated successfully!")
return redirect('feed_schedule') # Redirect to the dashboard or appropriate page
else:
messages.error(request, "Please correct the errors below.")
else:
form = FeedScheduleForm(instance=feed_schedule) # Pre-populate the form with
existing data

return render(request, 'admin/edit_inventory.html', {'form': form, 'feed_schedule':


feed_schedule})

# health record view.


def health_record_view(request):
farmer_id = request.session.get('farmer_id')

if farmer_id:
try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
farmer = None
messages.error(request, "Farmer not found in session.")
else:
farmer = None

if request.user.is_superuser:
# Superusers can see all fish stocks
health_record = HealthRecord.objects.all()
elif farmer:
# Regular farmers can only see their own fish stocks
health_record = HealthRecord.objects.filter(fish_stock__farmer=farmer)
else:
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 72
health_record = HealthRecord.objects.none()

if request.user.is_superuser:
context = {'health_record': health_record, 'view_only': True}
else:
context = {'health_record': health_record, 'view_only': False}

return render(request, 'admin/health_record.html', context)

# add health record.


def add_health_record(request):
farmer_id = request.session.get('farmer_id')
if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
return redirect('farmer_login')

try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

farmer_id = request.session.get('farmer_id')
if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
return redirect('farmer_login')

try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 73
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

if request.method == 'POST':
form = HealthRecordForm(request.POST)
if form.is_valid():
form.save()
messages.success(request, "Feed Schedule added successfully!")
return redirect('health_record')
else:
messages.error(request, "Please correct the errors below.")
else:
form = HealthRecordForm()
return render(request, 'admin/add_health_record.html', {'form': form})

# edit health record.


def edit_health_record(request, id):
farmer_id = request.session.get('farmer_id')
if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
return redirect('farmer_login')

try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

farmer_id = request.session.get('farmer_id')
if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 74
return redirect('farmer_login')

try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

feed_schedule = get_object_or_404(HealthRecord, id=id)

if request.method == 'POST':
form = HealthRecordForm(request.POST, instance=feed_schedule)
if form.is_valid():
form.save()
messages.success(request, "Inventory item updated successfully!")
return redirect('health_record')
else:
messages.error(request, "Please correct the errors below.")
else:
form = HealthRecordForm(instance=feed_schedule)

return render(request, 'admin/edit_health_record.html', {'form': form, 'feed_schedule':


feed_schedule})

# financial record view.


def financial_record_view(request):
farmer_id = request.session.get('farmer_id')

if farmer_id:
try:
farmer = Farmer.objects.get(id=farmer_id)
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 75
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
farmer = None
messages.error(request, "Farmer not found in session.")
else:
farmer = None

# Filter financial records based on user role


if request.user.is_superuser:
# Superuser can view all financial records
financial_record = FinancialRecord.objects.all()
elif farmer:
# Regular farmers can only view their own records
financial_record = FinancialRecord.objects.filter(farmer=farmer)
else:
# No records if no farmer is identified
financial_record = FinancialRecord.objects.none()

context = {
'financial_record': financial_record,
'view_only': request.user.is_superuser
}

return render(request, 'admin/financial_record.html', context)

# add financial record.


def add_financial_record(request):
farmer_id = request.session.get('farmer_id')

if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 76
return redirect('farmer_login') # Redirect if no farmer is logged in

try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

if request.method == 'POST':
form = FinancialRecordForm(request.POST)
if form.is_valid():
financial_record = form.save(commit=False) # Delay saving to assign the
farmer
financial_record.farmer = farmer # Link the record to the logged-in
farmer
financial_record.save() # Save the record
messages.success(request, "Financial record added successfully!")
return redirect('financial_record')
else:
messages.error(request, "Please correct the errors below.")
else:
form = FinancialRecordForm()

return render(request, 'admin/add_financial_record.html', {'form': form})

# edit financial record.


def edit_financial_record(request, id):
farmer_id = request.session.get('farmer_id')
if not farmer_id:
messages.error(request, "You must be logged in as a farmer to access this page.")
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 77
return redirect('farmer_login')

try:
farmer = Farmer.objects.get(id=farmer_id)
print(f"Farmer details: {farmer.name}, {farmer.email}")
except Farmer.DoesNotExist:
messages.error(request, "Farmer not found.")
return redirect('farmer_login')

feed_schedule = get_object_or_404(FinancialRecord, id=id)

if request.method == 'POST':
form = FinancialRecordForm(request.POST, instance=feed_schedule)
if form.is_valid():
form.save()
messages.success(request, "Inventory item updated successfully!")
return redirect('financial_record')
else:
messages.error(request, "Please correct the errors below.")
else:
form = FinancialRecordForm(instance=feed_schedule)

return render(request, 'admin/edit_health_record.html', {'form': form, 'feed_schedule':


feed_schedule})

viewplan.php

<!-- View Plans Page (viewplans.php) -->


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 78
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>View Plans</title>
<link rel="stylesheet" type="text/css" href="viewplans.css">
</head>
<body>
<div class="container">
<?php
// Include the database connection
include 'connect.php';

// Fetch all plans from the database


$query = "SELECT * FROM plan"; // No LIMIT here, fetch all 10 plans
$result = mysqli_query($conn, $query);

if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
$planname = $row['planname'];
$description = $row['description'];
$image = $row['image'];

echo '
<div class="plan-item">
<div class="plan-image">
<img src="' . $image . '" alt="Plan Image">
</div>
<div class="plan-content">
<h3 class="plan-title">' . htmlspecialchars($planname) . '</h3>
<p class="plan-description">' . htmlspecialchars($description) . '</p>
<form action="getplan.php" method="get">

<button type="submit" class="read-more">Get Plan</button>


</form>

</div>
</div>';
}
} else {

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 79
echo "<p>No plans available</p>";
}

// Close connection
mysqli_close($conn);
?>
</div>

<!-- footer section starts -->

<footer class="footer">

<section class="box-container">

<div class="box fade-up">


<h3>contact us</h3>
<a href="tel:1234567890"><i class="fas fa-angle-right"></i><span>+123-456-7890</span></a>
<a href="mailto:info@gamil.com"><i class="fas fa-angle-
right"></i><span>info@gamil.com</span></a>
<a href="#"><i class="fas fa-angle-right"></i><span>mumbai, india - 123 456</span></a>
</div>

<div class="box fade-right">


<h3>follow us</h3>
<a href="#"><i class="fab fa-youtube"></i><span>youtube</a>
<a href="#"><i class="fab fa-whatsapp"></i><span>whatsapp</a>
<a href="#"><i class="fab fa-github"></i><span>github</a>
<a href="#"><i class="fab fa-linkedin"></i><span>linkedin</a>
</div>

</section>

<div class="credit">&copy; copyright @ 2024 by <span>saranya</span>| all rights reserved!</div>

</footer>
<!-- footer section ends -->
</body>

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 80
</html>

<?php
// db_connect.php

$servername = "localhost";
$username = "root"; // Use your database username
$password = ""; // Use your database password
$dbname = "project"; // Your database name

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);

// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>

getplan.php

<?php
include 'connect.php';
session_start();

if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Collect form data
$firstName = $_POST['firstName'];
$lastName = $_POST['lastName'];

$email = $_POST['email'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$gender = $_POST['gender'];
$height = $_POST['height'];
$weight = $_POST['weight'];
$goal = $_POST['goal'];

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 81
$medicalConditions = $_POST['medical'];
$plan = $_POST['yogaPlan'];
//$paymentMethod = $_POST['paymentMethod'];

// Escape special characters to prevent SQL injection


$firstName = mysqli_real_escape_string($conn, $firstName);
$lastName = mysqli_real_escape_string($conn, $lastName);
$email = mysqli_real_escape_string($conn, $email);
$phone = mysqli_real_escape_string($conn, $phone);
$address = mysqli_real_escape_string($conn, $address);
$gender = mysqli_real_escape_string($conn, $gender);
$height = mysqli_real_escape_string($conn, $height);
$weight = mysqli_real_escape_string($conn, $weight);
$goal = mysqli_real_escape_string($conn, $goal);
$medicalConditions = mysqli_real_escape_string($conn, $medicalConditions);
$plan = mysqli_real_escape_string($conn, $plan);
//$paymentMethod = mysqli_real_escape_string($conn, $paymentMethod);

// SQL query to insert data into the 'book' table


$sql = "INSERT INTO book (first_name, last_name, email, phone, address, gender, height, weight,
goal, medical_condition, plan, payment_method)
VALUES ('$firstName', '$lastName', '$email', '$phone', '$address', '$gender', '$height',
'$weight', '$goal', '$medicalConditions', '$plan', '$paymentMethod')";

if (mysqli_query($conn, $sql)) {
$book_id=mysqli_insert_id($conn);
header("Location: payment.php?book_id=$book_id");
exit;

}
else{
echo "Error:" .$sql. "<br>" .mysqli_error($conn);
}
mysqli_close($conn);
}
?>

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 82
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Yoga Membership Form</title>
</head>
<body>
<div class="container">
<h2>Booking Plans</h2>
<form action="#" method="POST" id="membershipForm">
<!-- Personal Information -->
<h3>Personal Information</h3>
<label for="firstName">First Name:</label>
<input type="text" id="firstName" name="firstName" required>

<label for="lastName">Last Name:</label>


<input type="text" id="lastName" name="lastName" required>

<label for="email">Email :</label>


<input type="email" id="email" name="email" required>

<label for="phone">Phone:</label>
<input type="tel" id="phone" name="phone" required>

<label for="address">Address:</label>
<input type="text" id="address" name="address" required>

<label for="gender">Gender:</label>

<select id="gender" name="gender" required>


<option value="">Select Gender</option>
<option value="male">Male</option>
<option value="female">Female</option>
<option value="other">Other</option>
</select>
<!-- Health & Fitness Information -->

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 83
<h3>Health & Fitness Information</h3>
<label for="height">Height (cm):</label>
<input type="number" id="height" name="height" required>

<label for="weight">Weight (kg):</label>


<input type="number" id="weight" name="weight" required>

<label for="goal">Goals:</label>
<select id="goal" name="goal" required>
<option value="">Select Goal</option>
<option value="weight-loss">Weight Loss</option>
<option value="flexibility">Flexibility</option>
<option value="stress-relief">Stress Relief</option>
<option value="general-fitness">General Fitness</option>
</select>

<label for="medical">Medical Conditions (if any):</label>


<textarea id="medical" name="medical"></textarea>

<!-- Yoga Plan Details -->


<h3>Yoga Plan Details</h3>
<label for="plan">Select Yoga Plan:</label>
<select id="plan" name="yogaPlan" required>
<option value="">Select Plan</option>
<option value="yoga">Yoga</option>
<option value="meditation">Meditation</option>
<option value="philosophy">Yoga Philosophy & Lifestyle Classes</option>
<option value="therapeutic">Therapeutic Yoga</option>
<option value="corporate">Corporate & Group Yoga</option>

<option value="fitness-oriented">Fitness-Oriented Yoga</option>


</select>

<label for="schedule">Preferred Class Schedule:</label>


<select id="schedule" name="schedule" required>
<option value="">Select Schedule</option>
<option value="morning">Morning</option>

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 84
<option value="morning">AfterNoon</option>
<option value="evening">Evening</option>
</select>

<!-- Payment Information


<h3>Payment Information</h3>
<label for="paymentMethod">Payment Method:</label>
<select id="paymentMethod" name="paymentMethod" required>
<option value="">Select Payment Method</option>
<option value="credit-card">Credit Card</option>
<option value="paypal">PayPal</option>
<option value="paypal">GPay</option>
<option value="bank-transfer">Bank Transfer</option>
</select>-->

<button type="submit">Submit</button>
</form>
</div>
</body>
</html>

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 85

Dashboard.html[Admin]

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Datum | CRM Admin Dashboard Template</title>

<!-- Favicon -->


<link rel="shortcut icon" href="../assets/images/favicon.ico" />

<link rel="stylesheet" href="/static/css/backend-plugin.min.css">


<link rel="stylesheet" href="/static/css/backend.css?v=1.0.0">
</head>
<body class=" ">
<!-- loader Start -->
<div id="loading">
<div id="loading-center">
</div>
</div>
<!-- loader END -->
<!-- Wrapper Start -->
<div class="wrapper">
<div class="iq-sidebar sidebar-default ">
<div class="iq-sidebar-logo d-flex align-items-end justify-content-between">
<a href="../backend/index.html" class="header-logo">
<img src="/static/assets/images/logo.png" class="img-fluid rounded-normal light-
logo" alt="logo">
<img src="/static/assets/images/logo-dark.png" class="img-fluid rounded-normal d-
none sidebar-light-img" alt="logo">
<span>Aqua</span>

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 86
</a>
<div class="side-menu-bt-sidebar-1">
<svg xmlns="http://www.w3.org/2000/svg" class="text-light wrapper-menu"
width="30" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6
18L18 6M6 6l12 12" />
</svg>
</div>
</div>
<div class="data-scrollbar" data-scroll="1">
<nav class="iq-sidebar-menu">
<ul id="iq-sidebar-toggle" class="side-menu">
<li class="active sidebar-layout">
<a href="{% url 'dashboard' %}" class="svg-icon">
<i class="">
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-
width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-
1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
</i>
<span class="ml-2">Dashboard</span>
</a>
</li>

<li class=" sidebar-layout">


<a href="{% url 'inventory' %}" class="svg-icon">
<i class="">
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 87
0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
</i>
<span class="ml-2">Inventory</span>
</a>
</li>
<li class=" sidebar-layout">
<a href="{% url 'feed_schedule' %}" class="svg-icon">
<i class="">
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6
0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
</i>
<span class="ml-2">Feed Schedule</span>
</a>
</li>
<li class=" sidebar-layout">
<a href="{% url 'health_record' %}" class="svg-icon">
<i class="">
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6
0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
</i>
<span class="ml-2">Health Record</span>
</a>
</li>
<li class=" sidebar-layout">
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 88
<a href="{% url 'financial_record' %}" class="svg-icon">
<i class="">
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6
0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
</i>
<span class="ml-2">Financial Record</span>
</a>
</li>
<li class=" sidebar-layout">
<a href="{% url 'list_users' %}" class="svg-icon">
<i class="">
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6
0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
</i>
<span class="ml-2">Users List</span>
</a>
</li>
<li class=" sidebar-layout">
<a href="{% url 'farmer_orders' %}" class="svg-icon">
<i class="">
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6
0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 89
</svg>
</i>
<span class="ml-2">Orders</span>
</a>
</li>
{% if request.user.is_superuser %}
<li class=" sidebar-layout">
<a href="{% url 'farmer' %}" class="svg-icon">
<i class="">
<svg xmlns="http://www.w3.org/2000/svg" width="18" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6
0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
</svg>
</i>
<span class="ml-2">Farmers</span>
</a>
</li>
{% endif %}
</ul>
</nav>
<div class="pt-5 pb-5"></div>
</div>
</div>
<div class="iq-top-navbar ">
<div class="iq-navbar-custom mt-2">
<nav class="navbar navbar-expand-lg navbar-light p-0">
<div class="side-menu-bt-sidebar">
<svg xmlns="http://www.w3.org/2000/svg" class="text-secondary wrapper-
menu" width="30" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4
6h16M4 12h16M4 18h16" />
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 90
</svg>
</div>
<div class="d-flex align-items-center">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-
target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-
label="Toggle navigation">
<svg xmlns="http://www.w3.org/2000/svg" class="text-secondary"
width="30" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 6h16M4 12h16m-7 6h7" />
</svg>
</button>
{% if not request.user.is_superuser %}
<a href="{% url 'farmer_profile' %}" class="svg-icon">
<img src="{{ request.session.image }}" class="img-fluid avatar-rounded"
style="height:40px; width:40px;" alt="user">
<span class="mb-0 ml-2 user-name font-weight-bold text-capitalize"
style="color: #3B0404;">{{request.session.farmer_name}}</span>
</a>
{% else %}
<img src="/static/assets/images/user/1.jpg" class="img-fluid avatar-rounded"
style="height:40px; width:40px;" alt="user">
<span class="mb-0 ml-2 user-name font-weight-bold text-capitalize"
style="color: #3B0404;">{{request.user}}</span>
{% endif %}

<div class="collapse navbar-collapse ml-3" id="navbarSupportedContent" >


{% comment %} <img src="/static/assets/images/user/1.jpg" class="img-fluid
avatar-rounded" style="height:40px; width:40px;" alt="user">
<span class="mb-0 ml-2 user-name font-weight-bold text-capitalize mr-3"
style="color: #3B0404;">{{request.session.farmer_name}}</span> {% endcomment %}
<a href="{% url 'admin_logout' %}" class="btn btn-primary btn-
sm">Logout</a>
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 91
</div>
</div>
</nav>
</div>
</div>
<div class="content-page">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 mb-4 mt-1">

</div>

<div class="col-lg-12 col-md-12">


<div class="card">
<div class="card-header d-flex justify-content-between">
<div class="header-title">
<h4 class="card-title">Fish Stock</h4>
</div>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table mb-0">
<thead class="table-color-heading">
<tr class="text-secondary">
<th scope="col">Image</th>
<th scope="col">Species</th>
<th scope="col">Quantity</th>
<th scope="col">Price</th>
<th scope="col">Date Added</th>
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 92
{% if not view_only %}
<th scope="col">Action</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for stock in fish_stocks %}
<tr class="white-space-no-wrap">
<td><img src="{{ stock.Image.url }}" alt="Product Image"
class="product-image rounded-circle" style="width: 80px; height: 80px;"></td>
<td>{{ stock.species }}</td>
<td>{{ stock.quantity }}</td>
<td>{{ stock.Price }}</td>
<td>{{ stock.date_added }}</td>
{% if not view_only %}
<td><a href="{% url 'edit_fish_stock' stock.id %}" class="btn btn-
warning btn-sm" >Edit</a></td>
{% endif %}
</tr>
{% empty %}
<tr>
<td colspan="4" class="text-center">No fish stock records found.</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="d-flex justify-content-end align-items-center border-top-table p-3">
{% if not view_only %}
<a href="{% url 'add_fish_stock' %}" class="btn btn-secondary btn-sm">Add
Record</a>
{% endif %}
</div>
</div>
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 93
</div>
</div>
</div>

</div>
<!-- Page end -->
</div>
</div>
</div>
<!-- Wrapper End-->
<footer class="iq-footer">
<div class="container-fluid">
<div class="row">
<div class="col-lg-6">
<ul class="list-inline mb-0">
<li class="list-inline-item"><a href="../backend/privacy-policy.html">Privacy
Policy</a></li>
<li class="list-inline-item"><a href="../backend/terms-of-service.html">Terms
of Use</a></li>
</ul>
</div>
<div class="col-lg-6 text-right">
<span class="mr-1">
Copyright
<script>document.write(new Date().getFullYear())</script>© <a href="#"
class="">Datum</a>
All Rights Reserved.
</span>
</div>
</div>
</div>
</footer> <!-- Backend Bundle JavaScript -->
<script src="/static/assets/js/backend-bundle.min.js"></script>
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 94
<!-- Chart Custom JavaScript -->
<script src="/static/assets/js/customizer.js"></script>

<script src="/static/assets/js/sidebar.js"></script>

<!-- Flextree Javascript-->


<script src="/static/assets/js/flex-tree.min.js"></script>
<script src="/static/assets/js/tree.js"></script>

<!-- Table Treeview JavaScript -->


<script src="/static/assets/js/table-treeview.js"></script>

<!-- SweetAlert JavaScript -->


<script src="/static/assets/js/sweetalert.js"></script>

<!-- Vectoe Map JavaScript -->


<script src="/static/assets/js/vector-map-custom.js"></script>

<!-- Chart Custom JavaScript -->


<script src="/static/assets/js/chart-custom.js"></script>
<script src="/static/assets/js/charts/01.js"></script>
<script src="/static/assets/js/charts/02.js"></script>

<!-- slider JavaScript -->


<script src="/static/assets/js/slider.js"></script>

<!-- Emoji picker -->


<script src="/static/assets/vendor/emoji-picker-element/index.js" type="module"></script>

<!-- app JavaScript -->


<script src="/static/assets/js/app.js"></script> </body>
</html>
CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS
AQUA MANAGE 95

APPENDIX II

Login form

Signup form

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 96

Add/Manage Fish Stock

Add/Manage Inventory

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 97

Appendix III

User page

View Fish

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS


AQUA MANAGE 98

Order Status Page

CHINMAYA COLLEGE OF ARTS, COMMERCE AND SCIENCE DEPARTMENT OF COMPUTER APPLICATIONS

You might also like