Farm Management
Farm Management
Dishani Haldar
12th Grade/12/2025
Delhi Public Secondary School
INDEX
S.No. Particulars Page.No. Signature Remarks
1 Introduction 3
2 Objectives 4
3 Preliminary System Analysis 05~06
4 Project Category 07~08
5 Software and Hardware Requirement 9
Specification
6 Detailed System Analysis 10~12
7 Source Code & Output 13~18
8 Conclusion 19~20
9 Bibliography 21
INTRODUCTION
The Farm Management System is a software application developed using
Python for its simplicity and versatility, and SQL for efficient database
management. This project aims to provide a streamlined and user-friendly
platform to manage farming-related activities, including user registration,
product listing, and browsing.
In today’s digital era, the agricultural sector faces challenges in managing data
and connecting farmers with buyers effectively. A farm management system
addresses these needs by offering a centralized platform to organize
information, enhance productivity, and foster better communication between
farmers and buyers.
2. Objectives
• To create a digital platform for farmers to list their products and buyers to
browse and purchase them.
• To provide a role-based system for user registration, profile management,
and secure authentication.
• To reduce dependency on intermediaries, promoting direct interactions
between farmers and buyers.
3. Feasibility Study
• Technical Feasibility: The system is built using Python, a powerful and
versatile programming language, and SQL for database management.
These technologies are widely used, well-supported, and suitable for this
project.
• Operational Feasibility: The system's user-friendly interface ensures it is
accessible to users with basic computer knowledge. Farmers can easily
list products, while buyers can browse and select items.
• Economic Feasibility: The project is cost-effective, requiring minimal
resources, as it uses open-source tools and technologies.
4. System Requirements
• Hardware Requirements:
• A computer system with basic configurations.
• Adequate storage for the SQLite database.
• Software Requirements:
• Python 3.x for application development.
• SQLite for database operations.
5. Functional Requirements
• User Registration and Login:
• Farmers and buyers can register with unique credentials.
• Secure authentication using hashed passwords.
• Product Management:
• Farmers can list, update, and delete products.
• Buyers can browse available products with details.
• Profile Management:
• Users can update or delete their profiles.
• Role-Based Access:
• Farmers can list products, while buyers have browsing privileges.
6. Non-Functional Requirements
• Scalability: The system should allow the addition of more features, such
as payment gateways or advanced search filters, in the future.
• Security: User data, including passwords, must be stored securely.
• Usability: The interface should be intuitive and straightforward for all
users.
• Performance: The system should handle database queries efficiently.
8. Limitations
• Limited to basic product listing and browsing functionalities in the current
version.
• No integration with advanced features like payment gateways or delivery
tracking.
• Requires internet access for future scalability to a cloud-based system.
Project Category
A category of project is web-based application named “Library Management
System”. Login Form and Main Window are designed by using Python
language with Tkinter module. MySQL are used for the database connection
with python. Programming Language and Database Connectivity Used In
Project:
Operating System:
Windows10
Detailed System
Analysis
Modules used in Project:
import sqlite3
# Database setup
connection = sqlite3.connect('farm_management1.db')
cursor = connection.cursor()
# Create tables
cursor.execute('''CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
role TEXT NOT NULL
)''')
connection.commit()
# Helper Functions
def hash_password(password):
"""Simple password hashing."""
return password[::-1] # Reverse the password (for
simplicity)
# User Authentication
def register_user():
print("\n--- Register ---")
name = input("Enter your name: ")
email = input("Enter your email: ")
password = input("Enter your password: ") # Visible
password input
role = input("Enter your role (farmer/buyer): ").lower()
try:
cursor.execute("INSERT INTO users (name, email,
password, role) VALUES (?, ?, ?, ?)",
(name, email, hash_password(password), role))
connection.commit()
print("Registration successful!")
except sqlite3.IntegrityError:
print("Error: Email already exists.")
def login_user():
print("\n--- Login ---")
email = input("Enter your email: ")
password = input("Enter your password: ") # Visible
password input
# User Operations
def update_profile(user):
print("\n--- Update Profile ---")
name = input(f"Enter your new name (current: {user[1]}): ")
or user[1]
email = input(f"Enter your new email (current: {user[2]}): ")
or user[2]
try:
cursor.execute("UPDATE users SET name = ?, email = ?
WHERE id = ?", (name, email, user[0]))
connection.commit()
print("Profile updated successfully!")
except sqlite3.IntegrityError:
print("Error: Email already exists.")
def delete_profile(user):
print("\n--- Delete Profile ---")
confirmation = input("Are you sure you want to delete your
account? (yes/no): ").lower()
if confirmation == "yes":
cursor.execute("DELETE FROM users WHERE id = ?",
(user[0],))
connection.commit()
print("Your account has been deleted successfully.")
return True
else:
print("Account deletion canceled.")
return False
# Product Operations
def list_product(user):
print("\n--- List a Product ---")
name = input("Enter product name: ")
description = input("Enter product description: ")
category = input("Enter product category: ")
price = float(input("Enter product price: "))
def browse_products():
print("\n--- Browse Products ---")
cursor.execute("SELECT p.id, p.name, p.description,
p.category, p.price, u.name FROM products p JOIN users u ON
p.farmer_id = u.id")
products = cursor.fetchall()
if products:
for product in products:
print(f"ID: {product[0]}, Name: {product[1]},
Description: {product[2]}, Category: {product[3]}, Price:
{product[4]}, Farmer: {product[5]}")
else:
print("No products available.")
while True:
print("\nOptions:")
print("1. Register")
print("2. Login")
print("3. Update Profile")
print("4. Delete Profile")
print("5. List a Product")
print("6. Browse Products")
print("7. Logout")
print("8. Exit")
if choice == "1":
register_user()
elif choice == "2":
user = login_user()
elif choice == "3" and user:
update_profile(user)
elif choice == "4" and user:
if delete_profile(user):
user = None
elif choice == "5" and user and user[4] == "farmer":
list_product(user)
elif choice == "6":
browse_products()
elif choice == "7" and user:
print(f"Goodbye, {user[1]}!")
user = None
elif choice == "8":
print("Exiting the system. Goodbye!")
break
else:
print("Invalid choice or action not allowed. Please try
again.")
if __name__ == "__main__":
main()
OUTPUT
1) Listing Products: The farmer(user) can list their product in this way:
2) Browsing Products: The farmer or the buyer can browse their
products in this way:
3) Updating Profile : The user can update their profiles in this way:
4) Deleting Profile: The user can delete their profile in this way:
CONCLUSION
The Farm Management System is a comprehensive software application
designed to address the challenges faced by farmers and buyers in the
agricultural sector. By utilizing Python for programming and SQL for database
management, this project successfully integrates modern technology into a
traditionally manual and fragmented industry. The system facilitates better
connectivity between farmers and buyers, allowing for efficient product listing,
browsing, and transactions.
The project demonstrates the potential of digital transformation in agriculture
by creating a streamlined and user-friendly platform. Farmers now have an
accessible tool to showcase their products directly to buyers, eliminating
intermediaries and ensuring fair pricing. This empowers farmers, providing
them with better control over their products and fostering transparency in
transactions. For buyers, the system simplifies the process of sourcing
agricultural goods by offering detailed product descriptions and direct access to
farmers.
Key Outcomes
1. Enhanced Accessibility: Both farmers and buyers benefit from an
intuitive interface that simplifies the complexities of product listing and
browsing.
2. Improved Efficiency: The system reduces time and effort required for
managing farming operations and purchasing activities.
3. Data Security: Secure authentication and database management ensure
user information is protected.
4. Role-Based Functionality: The system caters to the specific needs of
farmers and buyers, making it versatile and adaptable.
Through this project, a significant step has been taken toward modernizing
agricultural practices. The combination of Python's robust programming
capabilities and SQL's efficient data management ensures that the system is
reliable, scalable, and maintainable. Moreover, the system's architecture
provides a foundation for future enhancements, such as incorporating payment
gateways, delivery tracking, and analytics.
Benefits to Stakeholders
• Farmers: Gain a platform to market their products directly, reducing
dependency on middlemen and increasing profitability.
• Buyers: Access a wide range of agricultural goods directly from
producers, ensuring quality and transparency.
• Community: Promotes local trade and strengthens the agricultural
ecosystem.
Future Scope
While the current system offers essential functionalities, there is immense
potential for expansion. Features like product search filters, advanced analytics
for farmers, online payment integration, and logistics support can significantly
enhance the system. Additionally, transitioning to a web-based or mobile
application format would increase accessibility and reach a larger audience.
BIBLIOGRAPHY
Websites References:
https://www.tutorialspoint.com/index.htm
https://www.javatpoint.com
https://www.w3schools.com
Books References: