8000 GitHub - jayaleein/FoodWasteReductionPlatform: The Food Waste Reduction Platform is a web-based solution tackling global food waste by connecting individuals and organizations with excess food to those in need. It offers an easy-to-use interface for donating, requesting, and tracking food, promoting sustainability and community-driven waste reduction.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

The Food Waste Reduction Platform is a web-based solution tackling global food waste by connecting individuals and organizations with excess food to those in need. It offers an easy-to-use interface for donating, requesting, and tracking food, promoting sustainability and community-driven waste reduction.

Notifications You must be signed in to change notification settings

jayaleein/FoodWasteReductionPlatform

Repository files navigation

Food Waste Reduction Platform

Summary

This project involves the development of a Food Waste Reduction Platform, built using modern web technologies, with features such as:
  • Donation and Request System: Users can donate surplus food or request food supplies based on availability.
  • Inventory Tracking: Helps both donors and recipients manage the food items, reducing unnecessary waste.
  • User Authentication: Secure login and user management to facilitate trusted interactions.
  • Notifications: Automated alerts for available food and requests.
The project encourages collaboration between individuals, businesses, and non-profit organizations to combat food waste while improving community support.

Introduction

The Food Waste Reduction Platform is an innovative web-based solution aimed at addressing the global issue of food waste. This platform connects individuals and organizations with excess food to those in need, helping to minimize waste while promoting sustainability and food security. It provides a seamless and user-friendly interface where users can donate, request, and track food supplies, fostering a community-driven approach to waste reduction.

Functional requirements

FR – 01: Users Registration:

B2DD
    Registration:Users must have the ability to create accounts on the platform by providing their name, email, password, and selecting the user type (i.e., retailers, consumers, or charitable organizations).
    AuthenticationThe platform must have to login/logout of the functionality

FR – 02: Retailers:

    Inventory Management: Retailers must have the capability to manage their inventory of food items, including adding new items, updating quantities, and setting expiration dates for each item.
    Surplus Food Identification: Retailers should be able to identify and flag surplus food items that are nearing expiration or are in excess of demand. Surplus items are those with expiry dates within the next one week.
    Listing Surplus Food Items: Retailers must have the functionality to list surplus food items on the platform for donation or sale at a discounted price. An item is up for Donation or for sale at a reduced price is determined by the Retailer.

FR- 03: Charitable Organization:

    Claim Food: Charitable organizations such as Food Banks/Missions should be able to claim the food item listed by retailers available for donation.
    Update Inventory: The retailer inventory must be updated accordingly once a particular food item is claimed by a Charitable Organization.

FR-04: Consumers:

    a. Purchase: Consumers of the platform should be able to purchase (not real transaction) the items listed by the retailers at a given discount rate.
    Update Inventory: The retailer inventory must be updated accordingly once a particular food item is purchased by a consumer.

FR-05: Surplus Food Alert:

    User Subscription: Users can subscribe to receive surplus food alerts based on their location, communication method (email or phone) and food preferences
    Automatic Notifications: Whenever retailers list surplus food items on the platform, users subscribed to alerts receive automatic notifications via email or phone

Application Architecture

Food Waste Reduction Platform

Front-end (Presentation Layer)

The front-end of the FWRP comprises JSP (JavaServer Pages) for dynamic web page generation and user interaction. JSP pages provide the user interface for registration, login/logout, browsing surplus food items, and managing user subscriptions. Servlets act as our controller, it is responsible for being the mediary between our Model and View.

Back-end (Business Logic Layer)

Back end is composed of java code that will act as the model in the MVC pattern. Model will interact with the Servlet to talk with the front end JSP’s. The Java code will be dealing with all our logic, for example providing the sale price of items that have a discount on them or providing prepared statements to store data in the DB. We plan to implement different design patterns during our implementation like abstract factory for generating users, builder pattern for initializing users, singleton class for validation, and DAO for CRUD operations for our database.

Database (Data Layer)

The FWRP relies on a relational database management system (RDBMS), named FWRP, for data storage and management. MySQL can be utilized as the underlying RDBMS to store information related to users, retailers, food items, subscriptions, and transactions. The database schema includes entities (tables) such as ‘users’, ‘transaction’, ‘charity_inventory’, ‘user_inventory’, ‘item’, and ‘user_account’ structured to support the platform's functionalities.

Integration

Integration between the front-end and back-end is achieved through HTTP requests and responses. JSP pages communicate with Servlets using HTTP protocols, exchanging data and triggering server-side actions. Servlets interact with the database using JDBC (Java Database Connectivity), executing SQL queries to retrieve, update, and manipulate data.

Business Architecture

Food Waste Reduction Platform

Registration:

  1. Retailers: Retailers play a crucial role in our platform by managing surplus food items. They have the ability to add new items, update quantities, set expiration dates, and specify whether the items are available for donation or sale at a reduced price. Additionally, retailers can easily flag surplus food items that are nearing expiration or are in excess of demand. Once flagged, these surplus items can be promptly listed on the platform for donation or sale.
  2. Charitable Organization: Charitable organizations are empowered to seamlessly claim surplus food items listed by retailers and promptly update their inventory accordingly. By simply selecting the desired items, charitable organizations can efficiently claim the available surplus food, ensuring that it reaches those in need.
  3. Consumers: Consumers have the opportunity to purchase surplus food items at discounted prices through this system. By browsing the available listings, consumers can easily identify and select items they wish to purchase at reduced rates.

Database Structure

Food Waste Reduction Platform

Our database shall have 6 tables

  1. Users: This table has general user details like name, email, phone, location, and password along with the user type (charity, consumer, retailer), and user preferences for subscription.
  2. Item:This table has details about food items and their category (poultry, dairy, etc.).
  3. User_inventory: This table contains the details about retailer’s inventory. It has details regarding batch number, batch expiry date, quantity, unit price, and final price.
  4. Transaction: This table shall concern the transactions that take place once a consumer buys from a retailer. The quantity purchased shall be decreased from the retailer’s inventory.
  5. Charity inventory:This table shall contain details of the stock held by charities to be given as donation.
  6. UserAccountThis table contains details about the account balance of customers.

Security Architecture

  • Users will have an account with a balance, we will perform validity checks on their stored, store credit to make sure that purchases are valid.
  • The passwords are stored in a plain text format in the database. Ideally, they should be encoded to safeguard user information. However, outsiders can’t access our database without credentials.
  • SQL statements are prepared using preparedStatement() so that users cannot SQL inject to pry at, or manipulate our database.
  • Users will only interact with the GUI and won’t have any interaction with the JAVA code.

Deployment Architecture

Food Waste Reduction Platform

  • Laptop with Java: A device running a Java application.
  • Web Server with a Website: A server hosting a website, which can be accessed by the user client.
  • DB Server with MySQL DB: The database server running MySQL, which stores and manages data for the website.
  • User Client with an HTML Browser: A user’s device with a web browser, used to access the website hosted on the web server.

Created By

  • Mayank Arora
  • Andres Porras
  • JingYi Li
  • Aaron Thompson

High Level Design : https://docs.google.com/document/d/1SkjawkOkLsN35J8bnhqSzhr_HtTyTBvO67HUS49Nnhg/edit?usp=sharing

About

The Food Waste Reduction Platform is a web-based solution tackling global food waste by connecting individuals and organizations with excess food to those in need. It offers an easy-to-use interface for donating, requesting, and tracking food, promoting sustainability and community-driven waste reduction.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
0