FoodShare is a cutting-edge web application developed for the Walmart Hackathon 2025 to tackle the critical issues of food waste and hunger in India. By leveraging technology, we connect food businesses with surplus food to non-profit organizations, ensuring that perfectly good food reaches those who need it most.
In India, nearly 40% of food goes to waste while 190 million people go hungry. At FoodShare, we believe this is a solvable problem. Our mission is to create a sustainable network to combat food waste and hunger by rescuing edible surplus food and redistributing it to local hunger relief organizations.
- 🤖 AI-Powered Chatbot: An intelligent assistant to guide users through food safety protocols and donation guidelines, making the process seamless and secure.
- 🤝 Partnership Platform: A dedicated portal for NGOs to register, manage food requests, and track their impact, fostering a strong community of partners.
- 📊 User-Specific Dashboards: Tailored dashboards for NGOs, Admins, and Cafes to manage their activities, view real-time statistics, and monitor recent activities.
- 🔄 Donation Matching: An automated system that intelligently matches food donations with requests from our partner NGOs, ensuring efficient distribution.
- 🔐 Secure Authentication: A robust and secure login and registration system for all user types, ensuring data privacy and security.
- 📈 Impact Tracking: The platform provides detailed statistics on the amount of food distributed and the number of meals provided, offering transparency and accountability.
This project is built with a modern, scalable, and efficient technology stack:
- Framework: Next.js
- Language: TypeScript
- Styling: Tailwind CSS
- Animations: Framer Motion
- Backend & Database: Supabase
- Icons: Lucide React
To get a local copy up and running, follow these simple steps.
- Node.js (v18.18.0 or later)
- npm
- Clone the repo:
git clone [https://github.com/snpathaks/foodshare.git](https://github.com/snpathaks/foodshare.git)
- Navigate to the project directory:
cd foodshare - Install NPM packages:
npm install
- Set up your environment variables:
Create a
.envfile in the root and add your Supabase credentials:NEXT_PUBLIC_SUPABASE_URL=YOUR_SUPABASE_URL NEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY
- Run the development server:
npm run dev
- Open your browser: Navigate to http://localhost:3000 to see the application in action.
The application supports three user roles: NGO, Admin, and Cafe. You can use the following demo credentials to log in and explore the various dashboards and features:
- NGO:
- Username:
ngo@gmail.com - Password:
ngo123
- Username:
- Admin:
- Username:
admin@gmail.com - Password:
admin123
- Username:
- Cafe:
- Username:
cafe@gmail.com - Password:
cafe123
- Username:
The application exposes a set of well-defined RESTful API endpoints under the /api/v1/ prefix:
/ai/chat: Handles all AI chat interactions./ai/donation-form: Submits the food donation form./ai/guidelines: Fetches the latest food safety guidelines./donate: Initiates the food donation process./health: Checks the health and status of the database connection./partner/login: Processes partner login attempts./partnership/food-requests: Manages food requests from partner NGOs./partnership/match-donations: Intelligently matches donations with requests./partnership/overview: Provides a comprehensive overview of the partnership program./partnership/partners: Fetches a list of all registered NGO partners./partnership/register: Handles new partner registrations.
Our database is powered by Supabase and includes the following tables to manage the application's data efficiently:
donation_logspartner_loginschat_interactionsai_responsesfood_donationsngo_partnersfood_requestspartnershipsdonation_matcheshealth_check
For a more detailed schema, please refer to the src/lib/database.ts file.
This project is licensed under the MIT License. See the LICENSE file for more details.
We would like to thank the organizers of the Walmart Hackathon 2025 for providing us with the platform to build this project and contribute to a cause we are passionate about. We also extend our gratitude to the open-source community for the amazing tools and libraries that made this project possible.
