FoodShare is a web-based application designed to reduce food waste by connecting donors (restaurants, grocery stores, and individuals) with receivers (NGOs, shelters, and people in need). The platform provides a simple interface for donors to list surplus food items and for receivers to browse and request available donations. Administrators can manage users and donations to ensure the integrity of the system.
- User Authentication: Secure registration and login for Donors, Receivers, and Administrators.
- Food Donation: Donors can list food items with details such as name, quantity, location, and expiry date.
- Donation Browsing: Receivers can view and search available food items.
- Request System: Receivers can request donations, and donors can update the status of their listings.
- Status Tracking: Donation statuses transition through Available β Requested β Picked Up.
- Admin Panel: Administrators can view and manage all users and donations, and remove inappropriate content.
Ongoing...
- Frontend: HTML5, CSS3, Bootstrap 4, JavaScript
- Backend: PHP (Core PHP)
- Database: MySQL
- Server: Apache (via XAMPP)
- PHP 7.3 or higher
- MySQL 5.0 or higher
- XAMPP (or any LAMP/WAMP stack)
- Git
- Clone the repository
git clone https://github.com/pial-paul/foodshare.git cd foodshare - Configure the database
- Create a MySQL database named
foodshare_db. - Import the schema from
sql/foodshare_db.sqlusing phpMyAdmin or the MySQL CLI:mysql -u root -p foodshare_db < sql/foodshare_db.sql
- Create a MySQL database named
- Set up configuration
- Copy
config/config.sample.phptoconfig/config.php. - Update database credentials in
config/config.php.
- Copy
- Start the server
- Launch XAMPP and start Apache and MySQL.
- Place the project folder in the
htdocsdirectory.
- Access the application
- Open your browser and navigate to
http://localhost/foodshare.
- Open your browser and navigate to
- Register as a Donor or Receiver via the registration page.
- Login to access your dashboard.
- Donors: Navigate to the Donate page to list food items.
- Receivers: Browse available donations and request items.
- Donors: Update the status of your donations in the dashboard.
- Administrators: Log in to the Admin Panel to manage users and donations.
foodshare/
βββ css/ # Stylesheets
βββ img/uploads/ # Uploaded food images
βββ config/ # Configuration files
β βββ config.php # Database connection settings
βββ includes/ # Reusable header and footer
βββ sql/ # Database schema and seed data
β βββ foodshare_db.sql
βββ index.php # Landing page
βββ register.php # User registration
βββ login.php # User login
βββ logout.php # Logout script
βββ dashboard.php # User dashboard
βββ donate.php # Donation form
βββ browse.php # Browse donations
βββ request.php # Handle requests
βββ admin.php # Admin panel
βββ README.md # Project documentation
- users:
id,name,email,password,role,created_at - donations:
id,donor_id,food_name,quantity,location,expiry_date,image,status,created_at - requests:
id,receiver_id,donation_id,status,created_at
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature. - Commit your changes:
git commit -m 'Add some feature'. - Push to the branch:
git push origin feature/YourFeature. - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
Happy coding and happy sharing!