The Farmer Management System (FMS) is a web-based platform designed to simplify the management of farmers' profiles, agricultural product listings, and transaction monitoring. It offers farmers the ability to register, manage their profiles, add agro products for sale, and track system activities using real-time database triggers.
- Farmer Registration: Allows farmers to securely register, log in, and manage their personal profiles.
- Agro Product Management: Farmers can list, edit, and delete their agricultural products for sale.
- Farming Type Addition: Add various farming types that farmers can associate with their profiles.
- Triggers Log: Displays a real-time log of database actions such as insertions, updates, and deletions using SQL triggers.
- User Authentication: Secure login with password encryption to ensure safety and privacy.
- Responsive Design: The system is fully responsive and compatible with various devices.
- Frontend: HTML, CSS, Bootstrap
- Backend: Python (Flask Framework), Jinja2
- Database: MySQL with SQLAlchemy ORM
- Triggers: SQL Triggers for database event logging
- Deployment: Flask Development Server
FMS/
│
├── static/ # Static files (CSS, JS, Images)
│ ├── css/
│ │ └── style.css # Custom styles
│ └── assets/
│ └── images/ # Logo and images
│
├── templates/ # HTML templates for Flask views
│ ├── index.html
│ ├── farmer_register.html
│ ├── agro_products.html
│ ├── add_farming.html
│ └── triggers.html
│
├── app.py # Main Flask application
├── models.py # SQLAlchemy models for database
├── forms.py # Flask forms for input validation
├── triggers.sql # SQL script to create database triggers
├── db_setup.sql # SQL script to initialize database tables
├── requirements.txt # List of dependencies
└── README.md # Project documentation
- Python 3.x
- MySQL installed and running on your machine
-
Clone the repository:
git clone https://github.com/yxshee/farmer-management-system.git cd farmer-management-system
-
Create a virtual environment:
python3 -m venv env source env/bin/activate
-
Install the dependencies:
pip install -r requirements.txt
-
Set up the MySQL database:
- Run the
db_setup.sql
script in your MySQL environment to create the required tables. - Run the
triggers.sql
script to set up SQL triggers.
- Run the
-
Configure the database in
app.py
:app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://username:password@localhost/fms_db'
-
Run the Flask application:
python app.py
The app will be live at
http://localhost:5000
.
- Payment Gateway Integration: Allow buyers to purchase products directly through the platform.
- Detailed Reporting: Add advanced reporting features to track farmer sales and performance.
- State-Based Product Listings: Introduce state quotas for product availability and filtering.
Contributions are welcome! If you'd like to contribute:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a pull request
This project is licensed under the MIT License. See the LICENSE file for more information.
Designed & Developed with ❤️ by YXSHEE