Skip to content

About

A Java Servlet-based Digital Agriculture Management System with farmer management, crop management, AI-assisted crop recommendations, disease detection, weather information, reporting, and administrative dashboards.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Digital Agro System

   _____  _                ____  _             _
  / ____|| |              / __ \| |           | |
 | |    | |__   ___ _ __| |  | | | ___   ___ | |_ 
 | |    | '_ \ / _ \ '__| |  | | |/ _ \ / _ \| __|
 | |____| | | |  __/ |  | |__| | | (_) | (_) | |_ 
  \_____|_| |_|\___|_|   \____/|_|\___/ \___/ \__|

Digital Agro System is a modern Java-based agricultural management platform designed to help farmers and administrators manage crops, weather information, disease detection, AI-assisted crop recommendations, reports, and user accounts in a simple web-based experience.

Project Overview

This repository contains a Java Maven web application built with Servlets, JSP, DAO classes, service layers, and MySQL persistence. It provides a practical example of a full-stack web application for agricultural operations and administration.

Motivation

The project was created to support small-scale agricultural management by combining web-based interfaces with core business workflows such as registration, crop tracking, reports, disease detection, and AI-driven crop guidance.

Key Features

  • Secure authentication and user login
  • Farmer registration and profile management
  • Admin dashboard and farmer management
  • Crop management for administrators and farmers
  • AI-assisted crop recommendations
  • Disease detection through image upload and analysis
  • Weather information and forecasting views
  • Reports and analytics for agricultural insights
  • Notice and announcement management
  • Responsive JSP-based web interfaces

Technology Stack

  • Java 11
  • JSP
  • Servlet API
  • Maven
  • MySQL
  • HTML, CSS, and JavaScript
  • Apache Tomcat
  • JDBC and DAO-based data access

Project Architecture

The application follows a traditional MVC-style structure:

  • Controller: Servlet classes handle requests and route users to the appropriate JSP pages.
  • DAO: Data access objects encapsulate database operations for users, crops, notices, and reports.
  • Model: Plain Java classes represent domain entities such as Farmer, Admin, Crop, Notice, and Settings.
  • Service: Business-oriented services handle external integrations such as weather forecasting and AI recommendations.
  • Resources: Configuration files and database scripts live under the resources and project root.
  • Webapp: JSP pages, static assets, and web configuration are served from the web application directory.

Repository Structure

AgroSyst/
├── src/
│   ├── main/
│   │   ├── java/
│   │   │   └── com/mycompany/agrosystem/
│   │   │       ├── controller/
│   │   │       ├── dao/
│   │   │       ├── model/
│   │   │       ├── service/
│   │   │       └── util/
│   │   ├── resources/
│   │   │   └── META-INF/
│   │   └── webapp/
│   │       ├── WEB-INF/
│   │       ├── css/
│   │       └── *.jsp
│   └── test/
├── database_setup.sql
├── pom.xml
└── README.md

Installation

Prerequisites

  • Java 11 or newer
  • Apache Maven 3.9 or newer
  • Apache Tomcat 10.x
  • MySQL 8.x

Steps

  1. Clone the repository:

    git clone <repository-url>
    cd AgroSyst
  2. Create a MySQL database and import the SQL script:

    mysql -u root -p < database_setup.sql
  3. Update the database credentials in the JDBC utility class:

  4. Build the project:

    mvn package
  5. Deploy the generated WAR file to Tomcat.

    • The build output is packaged as AgroSystem.war.

Database Setup

The project includes a database initialization script at database_setup.sql.

It creates:

  • The agro_system_db database
  • Users, farmers, admins, crops, farmer_crops, and notices tables
  • Sample admin data and sample crop records

The application currently uses JDBC via src/main/java/com/mycompany/agrosystem/util/DBConnection.java. The persistence configuration file at src/main/resources/META-INF/persistence.xml is present as a placeholder for future JPA-based expansion.

Usage Guide

  1. Open the application in a browser.
  2. Register a farmer account or log in as the sample admin account.
  3. Use the admin dashboard to manage farmers, crops, notices, and reports.
  4. Farmers can view their dashboard, manage crops, view weather data, and request AI suggestions.
  5. Upload a crop image for disease detection and review the AI analysis response.

Screenshots

The following sections are placeholders for future screenshots:

  • Login
  • Dashboard
  • Farmer Panel
  • Crop Management
  • Disease Detection
  • Weather
  • Reports
  • AI Suggestion

Example placeholder:

![Login Screen](docs/screenshots/login.png)

Future Improvements

Potential enhancements for future iterations include:

  • Password hashing and stronger authentication
  • Role-based permission refinement
  • Better exception handling and logging
  • REST API support for mobile clients
  • Enhanced reporting dashboards
  • Docker-based deployment automation
  • CI/CD integration for GitHub Actions
  • Internationalization and accessibility improvements

License

This project is licensed under the MIT License. See LICENSE for details.

Authors

  • Project Maintainer: Digital Agro System contributors
  • Architecture and Development: Java Servlet/JSP application team
  • Documentation and Repository Preparation: Open-source contributors

Acknowledgements

This project was developed as a practical agricultural management system and is intended for educational, portfolio, and professional presentation use. Special appreciation goes to the open-source Java, Maven, Tomcat, and MySQL communities for their continued support.

Repository Metadata

  • Repository Description: A Java Maven web application for smart agriculture management.
  • GitHub Topics: java, maven, jsp, servlet, tomcat, mysql, agriculture, web-app
  • Suggested About Section: Smart agriculture management system for farmers and administrators.

Release Notes

v1.0.0 - Initial Stable Release

  • Added secure user authentication and registration flows
  • Implemented admin and farmer dashboards
  • Added crop, notice, and report management
  • Added AI-based crop suggestion and disease detection views
  • Added weather information integration
  • Added Maven-based build and deployment preparation

About

A Java Servlet-based Digital Agriculture Management System with farmer management, crop management, AI-assisted crop recommendations, disease detection, weather information, reporting, and administrative dashboards.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages