RescueBite connects food donors with volunteers to distribute surplus food to high-hunger areas based on an AI priority engine.
- Node.js (for frontend)
- Python 3.8+ (for backend)
- Open terminal and navigate to the
backendfolder:cd backend - Create and activate a virtual environment:
python -m venv venv # Windows: .\venv\Scripts\activate # Mac/Linux: source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Run the FastAPI server:
The backend runs on
uvicorn main:app --reload
http://localhost:8000. You can view the API docs athttp://localhost:8000/docs.
- Open a new terminal and navigate to the
frontendfolder:cd frontend - Install dependencies:
npm install
- Run the development server:
The frontend usually runs on
npm run dev
http://localhost:5173. Open this URL in your browser.
- Donor Module (React): Form to submit food type, quantity, and expiry.
- AI Priority Engine (Python): Ranks donations based on expiry time and local hunger levels. Priority score logic in
ai_engine.py. - Volunteer Dashboard (React + Leaflet): Displays AI-prioritized tasks on an interactive map. Allows volunteers to accept tasks.
- Live Heatmap (React + Leaflet + AI Data): Shows Red (High), Yellow (Medium), and Green (Low) hunger zones using dummy data populated on backend startup.
Uses SQLite (rescuebite.db) with SQLAlchemy. Auto-creates tables (Donations, Volunteers, HeatmapZones) when the FastAPI app starts.
POST /donationsSubmit new foodGET /donationsGet all donationsGET /donations/nearbyGet AI-prioritized pending tasksPOST /accept-taskAccept a donation taskGET /heatmap-dataGet heatmap zones