FeediFy
FeediFy is a food donation app that makes sharing surplus food easy connect donors, volunteers, and organizers in a seamless flow to reduce waste and help the hungry. ๐ฒโค๏ธ
Install / Use
/learn @vallabhatech/FeediFyREADME
๐ฒ FeediFy (Food Donation App)
A minimal, frontend-focused humanitarian food donation app built with React and TypeScript. This application serves as a Minimum Viable Product (MVP) to demonstrate the core user flows of collecting donation posts, allowing admins to manage operations, and enabling volunteers to handle pickups.
โจ Key Features
- Donor Portal: A simple, public-facing form for donors to submit food donation details.
- Admin Dashboard: A protected area for administrators to manage volunteers, view donation statuses, and assign pickups.
- Simulated AI Assistant: A component demonstrating how AI can help admins optimize routes or manage tasks.
- Volunteer Dashboard: A dedicated view for volunteers to see their assigned tasks, update pickup statuses, and manage their workflow.
- Map Integration: An optional map view (
react-leaflet) to visualize donation locations. - Client-Side Persistence: Utilizes React Contexts and Local Storage to simulate a database for a seamless demo experience.
๐ ๏ธ Tech Stack
- Framework: React + TypeScript + Vite
- Styling: Tailwind CSS
- Routing: React Router
- State Management: React Context API
- Mapping:
react-leaflet&leaflet
๐ Project Structure
The project follows a standard React application structure, separating components, pages, and state logic for clarity and scalability.
/
โโโ public/
โโโ src/
โ โโโ components/
โ โ โโโ DonationForm.tsx # Form for donors to submit food donations.
โ โ โโโ SearchBar.tsx # Reusable search input component.
โ โ โโโ admin/
โ โ โโโ AIAssistant.tsx # Simulated AI helper for admin tasks.
โ โ โโโ VolunteerManagement.tsx # UI for admins to manage volunteers.
โ โ
โ โโโ contexts/
โ โ โโโ AuthContext.tsx # Manages user authentication and session.
โ โ โโโ DonationContext.tsx # Manages the state for all donations.
โ โ โโโ VolunteerContext.tsx # Manages the state for all volunteers.
โ โ
โ โโโ pages/
โ โ โโโ AdminDashboard.tsx # Main dashboard for the admin user.
โ โ โโโ AdminLogin.tsx # Login page for administrators.
โ โ โโโ Available.tsx # Page displaying all available donations.
โ โ โโโ MapView.tsx # (Optional) Page with map integration.
โ โ โโโ VolunteerDashboard.tsx # Dashboard for logged-in volunteers.
โ โ โโโ VolunteerLogin.tsx # Login page for volunteers.
โ โ
โ โโโ App.tsx # Main app component, sets up routing.
โ โโโ main.tsx # Entry point of the application.
โ
โโโ index.html
โโโ package.json
โโโ tailwind.config.js
๐๏ธ Data Models
Data is represented using simple TypeScript interfaces and managed within React Contexts.
Donation
{
id: string;
donor: string;
organizationType: string;
foodType: string;
quantity: string; // e.g., "10 meals"
location: { lat: number, lng: number };
phone: string;
expiryTime: Date;
urgency: 'High' | 'Medium' | 'Low';
status: 'Pending' | 'Assigned' | 'In Transit' | 'Completed';
assignedVolunteer?: string; // volunteer ID
specialInstructions?: string;
}
Volunteer
{
id: string;
name: string;
email: string;
phone: string;
status: 'Active' | 'Inactive' | 'Suspended';
availability: string[]; // e.g., ["Weekdays", "Mornings"]
rating: number; // e.g., 4.5
stats: { completedPickups: number };
}
๐ Getting Started
Follow these instructions to get the project running on your local machine.
Prerequisites
- Node.js (v18 or later)
- npm or yarn
Installation & Setup
-
Clone the repository:
git clone https://github.com/vallabhatech/Food cd Food -
Install dependencies:
npm install -
(Optional) If using the map feature, install Leaflet:
npm install react-leaflet leafletThen, add the Leaflet CSS to your
index.htmlfile in the<head>section:<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/>
Running the Development Server
- Start the Vite dev server:
npm run dev - Open your browser and navigate to
http://localhost:5173(or the port specified in your console).
๐งญ User Flows & Testing Guide
๐ค Admin Flow
- Navigate to
/admin/login. - Log in with the demo credentials:
- Email:
admin - Password:
admin123(Note: The initialAdminLoginpage might useadmin@foodbank.org/demo123. This needs to be unified with the credentials seeded inAuthContext.)
- Email:
- You will be redirected to the Admin Dashboard (
/admin/dashboard). - Here you can view the
VolunteerManagementandAIAssistantcomponents. - Navigate to the
/availablepage to see all "Pending" donations. You can assign these donations to a volunteer.
๐งโ๐คโ๐ง Volunteer Flow
- Navigate to
/volunteer. - Enter a demo volunteer identifier (e.g., name or ID from the seeded data in
VolunteerContext). - You will be directed to the Volunteer Dashboard (
/volunteer/dashboard/:volunteerId). - This dashboard will show your assigned donations.
- You can update the status of a donation by clicking "Start Collection" (sets status to
In Transit) and then "Mark Completed" (sets status toCompleted).
๐ฅช Donor Flow
- Navigate to the main donation form (likely on the homepage or
/donate). - Fill out the donation details and submit the form.
- The donation will be added to
DonationContextwith aPendingstatus. - Verify that the new donation appears on the
/availablepage for the admin to see.
๐ฏ Roadmap & Next Steps
This project is an MVP and has several known gaps that provide a clear path for future development.
Immediate Actionable Items (MVP Polish)
- [ ] Unify Admin Credentials: Ensure
AdminLogin.tsxuses the same credentials (admin/admin123) that are seeded inAuthContext.tsx. - [ ] Implement Context Persistence: Use
localStoragehelpers to save and load state inDonationContextandVolunteerContextto prevent data loss on page refresh. - [ ] Wire Up All Routes: Ensure
NavBaris implemented and all routes (/available,/map,/admin/*,/volunteer/*) are correctly configured inApp.tsxormain.tsx. - [ ] Fix
AuthContext: Implement theloadUsers/saveUsershelper functions to ensure authentication state is properly managed. - [ ] Stable ID Generation: Implement a function within the contexts to generate stable, unique IDs for new donations and volunteers.
Future Scalability (MVP โ Production)
- [ ] Backend Integration: Replace
localStoragewith a proper backend service (e.g., Node.js/Express, Django) and a database (e.g., PostgreSQL, MongoDB). - [ ] Secure Authentication: Implement robust, token-based authentication (e.g., JWT) instead of the demo login system.
- [ ] Real-time Notifications: Add push notifications to alert volunteers when they are assigned a new pickup.
- [ ] Input Validation: Add server-side and client-side validation for the donation form.
- [ ] Analytics & Reporting: Build out the
AIAssistantinto a real reporting dashboard for admins.
Related Skills
node-connect
353.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.3kQQBot ๅฏๅชไฝๆถๅ่ฝๅใไฝฟ็จ <qqmedia> ๆ ็ญพ๏ผ็ณป็ปๆ นๆฎๆไปถๆฉๅฑๅ่ชๅจ่ฏๅซ็ฑปๅ๏ผๅพ็/่ฏญ้ณ/่ง้ข/ๆไปถ๏ผใ
