A web application connecting food donors with NGOs to reduce food waste and help those in need.
- User authentication for both donors and NGOs
- Real-time food listing updates using WebSocket
- Time-based listings that expire after 2 hours
- City-based search functionality
- Detailed location information with Indian state/city suggestions
- Track donation history and accepted items
- Frontend: React with TypeScript
- Backend: Express.js
- State Management: TanStack Query (React Query)
- UI Components: shadcn/ui
- Real-time Updates: WebSocket
- Form Handling: React Hook Form + Zod
- Styling: Tailwind CSS
- Node.js 20 or later
- npm or yarn package manager
-
Clone the repository:
git clone <repository-url> cd food-donation-platform
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5000
- Register as either a food donor (helper) or an NGO
- For donors:
- Create food listings with details like quantity and location
- Track your donation history
- See which NGOs accepted your donations
- For NGOs:
- Browse available food listings
- Search by city
- Accept available donations
- Track accepted donations
├── client/ # Frontend React application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utility functions and configurations
│ │ ├── pages/ # Page components
│ │ └── App.tsx # Main application component
├── server/ # Backend Express application
│ ├── auth.ts # Authentication logic
│ ├── routes.ts # API routes
│ ├── storage.ts # Data storage implementation
│ └── websocket.ts # WebSocket implementation
└── shared/ # Shared types and schemas
└── schema.ts # Database schema and types
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request