The Farmers Marketplace Application is designed to connect farmers directly with consumers, facilitating the sale and purchase of agricultural products through a digital platform. This project aims to enhance direct market access for farmers, improve the efficiency of agricultural sales, and provide consumers with access to fresh produce.
- Online Marketplace: Farmers can list their products, and buyers can purchase them directly.
- User Onboarding Panels: Separate onboarding processes for farmers and buyers to register and manage their profiles.
- Product Panels: Display available products in a card format with options to buy and specify quantities.
- Dynamic Order Management: Supports creating, updating, and tracking orders in real-time.
- Payment and Review Systems: Secure payment gateway and a system for buyers to review products.
- Quality Assurance and Tracking: Ensures product quality and allows users to track order statuses.
- Frontend: Java Swing for the graphical user interface.
- Backend: Java with JDBC for database interaction.
- Database: MySQL for storing all application data.
- Java JDK 11 or newer.
- MySQL Server 8.0 or newer.
- An IDE like IntelliJ IDEA or Eclipse for Java development (optional but recommended).
- Create Database:
CREATE DATABASE farmers_market;
- Import Schema:
- Navigate to your MySQL command line or use a GUI like MySQL Workbench to import the initial database schema provided in the SQL file.
-
Compile the Java Code:
- If using the command line:
javac -d bin src/*.java
- If using an IDE, build the project using the IDE's build tools.
- If using the command line:
-
Run the Application:
java -cp bin Main
- Start by selecting either "Farmer" or "Buyer" to navigate to the respective onboarding panel.
- New users can register by filling out their details.
- Existing users can update or delete their profiles.
- Login to move to the Product Panel for Buyers.
- Browse available products.
- Select quantity and click "Buy" to proceed to the Payment Panel.
- Review your order details.
- Confirm payment which then redirects to the Order Tracking Panel.
- Track the status of your order once payment is confirmed.
- After receiving your order, you can leave a review for the product.
- Farmers can register, manage their product listings, and update or delete existing entries.
- Ensure that the JDBC connection settings in
DatabaseConnection.java
are configured according to your MySQL setup. - The system assumes a simple security model; consider enhancing authentication and authorization for production use.
Contributions to the Farmers Marketplace Application are welcome! Please fork the repository, make your changes, and submit a pull request.