A comprehensive web application designed to bridge the gap between food donors and those in need. This platform facilitates food donations, requests, volunteer management, and administrative oversight to ensure efficient food distribution.
- Donation Management: Donors can list available food items.
- Request Management: Individuals or organizations can request food.
- Volunteer Dashboard: Volunteers can view and accept delivery tasks.
- Admin Panel: Manage users, donations, requests, and verify documents.
- Real-time Tracking: Track donations and deliveries (integrated with maps).
- Responsive Design: Built for both desktop and mobile users.
- Framework: React (v19)
- Build Tool: Vite
- Styling: Tailwind CSS
- Routing: React Router DOM
- HTTP Client: Axios
- Maps: Leaflet / React-Leaflet
- Framework: Spring Boot (v3.5.7)
- Language: Java 17
- Database: MySQL
- ORM: Hibernate / Spring Data JPA
- Security: Spring Security, JWT (JSON Web Tokens)
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher) & npm (or pnpm)
- Java Development Kit (JDK) 17
- MySQL Server (v8.0 recommended)
- Maven (optional, as
mvnwwrapper is included)
The application uses MySQL. You need to have a MySQL server running locally.
-
Open your MySQL client (Workbench, CLI, etc.).
-
Create a database named
foodandhunger(optional, the app is configured to create it if it doesn't exist).CREATE DATABASE IF NOT EXISTS foodandhunger;
-
Important: The application is configured to use the following credentials by default:
- Username:
root - Password:
root - Port:
3306
If your MySQL configuration differs, update the
backend/src/main/resources/application.propertiesfile:spring.datasource.username=YOUR_USERNAME spring.datasource.password=YOUR_PASSWORD
- Username:
- Navigate to the backend directory:
cd backend - Install dependencies and build the project:
(On Windows, use
./mvnw clean install
mvnw.cmd clean install) - Run the application:
Or if you have Maven installed globally:
./mvnw spring-boot:run
The backend server will start onmvn spring-boot:run
http://localhost:8080.
- Open a new terminal and navigate to the frontend directory:
cd frontend - Install dependencies:
npm install # OR if you use pnpm pnpm install - Start the development server:
The frontend will be available at
npm run dev
http://localhost:5173(or the port shown in the terminal).
A Postman collection is included in the repository to help you test the API endpoints.
- File:
backend/foodandhunger.postman_collection.json(or check root directory) - Import this file into Postman to see all available endpoints and example requests.
We welcome contributions! Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m "Add some amazing feature" - Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.