Skip to content

salonyranjan/ResQpla8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

85 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


ResQPlate β€” AI Food Rescue Platform



Typing SVG







"A community-driven food rescue platform where AI does the heavy lifting β€” snap a photo, and a meal reaches someone in need."


Β  Β  Β 


πŸ“‹ Table of Contents

  1. 🌿 What is ResQPlate?
  2. πŸ–ΌοΈ UI Showcase
  3. πŸ“Š Platform at a Glance
  4. ✨ Key Features
  5. πŸ—οΈ System Architecture
  6. πŸ›€οΈ User Journey
  7. πŸ—ΊοΈ 3D System Map
  8. πŸ› οΈ Tech Stack
  9. πŸ“‚ Project Structure
  10. πŸ“¦ Getting Started
  11. ⚑ Performance
  12. πŸ—ΊοΈ Roadmap
  13. 🀝 Contributing
  14. ❓ FAQ
  15. πŸ“„ Changelog
  16. πŸ‘€ Author
  17. ⭐ Show Your Support

1. 🌿 What is ResQPlate?

ResQPlate is a community-driven, AI-powered food rescue platform that connects donors, recipients, and volunteers to eliminate food waste and fight hunger. Donors can snap a photo of surplus food and post it in under 60 seconds β€” Groq Vision automatically extracts food details, Gemini AI matches it to nearby recipients, and volunteers coordinate real-time pickups via interactive maps.

🎯 Mission: Bridge the gap between food surplus and food scarcity using AI, community, and data.

πŸ”– Version πŸ“¦ Highlight
πŸ†• v2.0 ResQ-Agent Dispatcher Β· Eco-Heatmaps Β· Impact Analytics Β· Leaderboard
πŸ”„ v1.5 Live order tracking Β· Volunteer routing Β· Smart Alerts Β· ResQBot
πŸŽ‰ v1.0 Post in 60s Β· Groq Vision Β· Gemini Matching Β· Appwrite backend

2. πŸ–ΌοΈ UI Showcase

UI tagline

🏠 Dashboard β€” Command Centre

ResQPlate Dashboard ResQPlate Dashboard ResQPlate Dashboard ResQPlate Dashboard ResQPlate Dashboard

⚑ Quick Action Cards animate with botanical growth UI · Impact stats update in real-time · Smart Alerts pulse for nearby donations


πŸ“Έ Post in 60 Seconds β€” AI-Powered Donation Flow

ResQPlate β€” Post in 60s

πŸ€– Groq Vision reads the food photo instantly Β· Gemini auto-fills Title, Quantity, Expiry Β· Zero manual typing required


πŸ—ΊοΈ Live Order Tracking β€” Real-Time Map

ResQPlate β€” Order Tracking ResQPlate β€” Order Tracking

πŸ“ Leaflet maps volunteer position in real-time Β· Route optimisation for fastest pickup Β· Status updates ping donor and recipient simultaneously


πŸ“Š Impact Analytics β€” Community Leaderboard

ResQPlate β€” Analytics ResQPlate β€” Analytics ResQPlate β€” Analytics

🌍 Carbon saved calculated per donation · Meals rescued counter · Eco-heatmaps show hunger vs. waste zones geospatially


πŸ€– ResQBot β€” Your Intelligent Agent

ResQPlate β€” ResQBot ResQPlate β€” ResQBot Mobile

🧠 Instant Query Resolution via Groq · Real-time Logistics Tracking via Appwrite · Sub-200ms Inference powered by Groq LPU technology

πŸ–₯️ View πŸ“± Mobile πŸ’» Tablet πŸ–₯️ Desktop
🏠 Dashboard βœ… βœ… βœ…
πŸ“Έ Post in 60s βœ… βœ… βœ…
πŸ—ΊοΈ Live Tracking βœ… βœ… βœ…
πŸ“Š Analytics βœ… βœ… βœ…
πŸ’¬ ResQBot Chat βœ… βœ… βœ…

3. πŸ“Š Platform at a Glance

mindmap
  root((🌿 ResQPlate))
    πŸ€– AI Engine
      Groq Vision
      Gemini Matching
      ResQBot Chat
      ResQ-Agent Dispatcher
    🍽️ Donor Flow
      Post in 60s
      AI Form Fill
      Impact Tracking
    πŸ™ Recipient Flow
      Browse Donations
      Request Food
      Order Tracking
    🚴 Volunteer Flow
      Pickup Routes
      Live Map
      Delivery Confirm
    πŸ“Š Impact
      Analytics Dashboard
      Eco Leaderboard
      Carbon Saved
Loading
πŸ”’ Metric 🎯 Value πŸ“ Notes
⚑ Post Time < 60s Photo β†’ live listing via Groq Vision
πŸ€– AI Models 2 Groq Llama 3.2 Vision + Google Gemini
πŸ“„ App Pages 16+ Full platform β€” dashboard to leaderboard
🧩 Components 25+ Reusable atomic UI library
πŸͺ Custom Hooks 3 Tracking, Alerts, Volunteer pickups
πŸ—ΊοΈ Map Features 3 Live tracking Β· Routing Β· Eco-Heatmaps

4. ✨ Key Features

πŸ“ΈPost in 60 SecondsSnap a food photo β€” Groq Vision + Gemini auto-extract title, quantity, expiry, and category. Zero typing.
πŸ€–Smart AI MatchingGemini AI matches donations with nearby recipients based on location, dietary need, and urgency
πŸ’¬ResQBot ChatbotGemini-powered conversational assistant for platform navigation, donation tips, and impact queries
🧠ResQ-Agent DispatcherDeterministic agentic workflow (Groq Llama 3.1) for automated pickup negotiation between volunteers and donors
πŸ”₯Smart Eco-HeatmapsLeaflet-powered geospatial visualisation showing hunger zones vs. food waste hotspots in your city
πŸ—ΊοΈLive Order TrackingReal-time volunteer position on an interactive map β€” donor and recipient both see pickup progress
🚴Volunteer PickupsRoute-optimised pickup scheduling with one-tap accept and delivery confirmation
πŸ“ŠImpact AnalyticsPersonal + global dashboards β€” meals rescued, carbon saved, waste diverted, all charted over time
πŸ†Community LeaderboardGamified ranking by donation impact β€” top donors and volunteers recognised in real-time
🌱Botanical Growth UIQuick Action Cards animate as botanical trees growing β€” each donation visually grows the community garden
πŸ””Smart AlertsPush notifications for nearby donation opportunities, expiring food, and pickup assignments
πŸ”Secure AuthAppwrite-powered user authentication, profile management, and protected routes

5. πŸ—οΈ System Architecture

5.1 πŸ”· Architecture Diagram

flowchart TB
    subgraph Client["🌐 CLIENT LAYER β€” React 19 + Vite 7"]
        UI[βš›οΈ React Components]
        Router[πŸ›£οΈ React Router DOM 7]
        State[πŸ”„ Context API<br/>Auth + Cart]
        Motion[🎨 Framer Motion<br/>Animations]
    end

    subgraph AI["πŸ€– AI LAYER"]
        Groq[πŸ‘οΈ Groq Vision<br/>Image Analysis]
        Gemini[🧠 Gemini AI<br/>Smart Matching]
        ResQBot[πŸ’¬ ResQBot<br/>Chat Assistant]
        Agent[πŸ•΅οΈ ResQ-Agent<br/>Dispatcher]
    end

    subgraph Services["βš™οΈ SERVICE LAYER"]
        Appwrite[πŸ” Appwrite<br/>Auth Β· DB Β· Storage Β· Realtime]
        Axios[πŸ“‘ Axios HTTP]
        Toast[πŸ”” Smart Alerts]
        Email[πŸ“§ EmailJS]
    end

    subgraph Maps["πŸ—ΊοΈ MAPPING LAYER"]
        Leaflet[πŸ—ΊοΈ Leaflet]
        ReactLeaflet[βš›οΈ React Leaflet]
        Heatmap[πŸ”₯ Eco Heatmaps]
    end

    subgraph Pages["πŸ“„ 16+ PAGES"]
        P1[🏠 Dashboard]
        P2[πŸ“Έ Post in 60s]
        P3[🍽️ Food Listing]
        P4[πŸ—ΊοΈ Order Tracking]
        P5[πŸ“Š Analytics]
        P6[πŸ† Leaderboard]
        P7[🚴 Volunteer Pickup]
    end

    UI --> Router --> Pages
    UI --> State
    UI --> Motion
    Pages --> AI
    Pages --> Services
    Pages --> Maps
    P2 --> Groq --> Gemini
    P3 --> Gemini
    P4 --> ReactLeaflet --> Leaflet
    P5 --> Heatmap

    classDef client fill:#0a2e0a,stroke:#16a34a,stroke-width:2px,color:#fff;
    classDef ai fill:#0a0a2e,stroke:#4285F4,stroke-width:2px,color:#fff;
    classDef svc fill:#2e0a0a,stroke:#FF3366,stroke-width:2px,color:#fff;
    classDef map fill:#0a1a2e,stroke:#199900,stroke-width:2px,color:#fff;
    classDef page fill:#1a1a0a,stroke:#84cc16,stroke-width:2px,color:#fff;

    class UI,Router,State,Motion,Pages,P1,P2,P3,P4,P5,P6,P7 client;
    class Groq,Gemini,ResQBot,Agent ai;
    class Appwrite,Axios,Toast,Email svc;
    class Leaflet,ReactLeaflet,Heatmap map;
Loading

5.2 🧠 AI Layer Deep-Dive

πŸ€– Model πŸ”§ Task ⚑ Trigger πŸ† Output
Groq Llama 3.2 Vision Image analysis Food photo uploaded Title, quantity, expiry, category auto-filled
Google Gemini Smart matching Donation posted Top-3 nearby recipient matches
Google Gemini ResQBot chat User question Conversational platform guidance
Groq Llama 3.1 ResQ-Agent Volunteer assigned Pickup negotiation agentic workflow

5.3 πŸ”„ Data Flow Diagram

flowchart LR
    subgraph Input["πŸ“₯ INPUT"]
        A[πŸ“Έ Photo Upload]
        B[πŸ“ Manual Entry]
    end

    subgraph AI_Processing["πŸ€– AI PROCESSING"]
        C[πŸ‘οΈ Groq Vision<br/>Image Analysis]
        D[🧠 Gemini<br/>Smart Matching]
        E[πŸ’¬ ResQBot<br/>AI Assistant]
    end

    subgraph Core["βš™οΈ CORE SERVICES"]
        F[πŸ” Appwrite DB]
        G[πŸ—ΊοΈ Leaflet Maps]
        H[πŸ”” Smart Alerts]
    end

    subgraph Output["πŸ“€ OUTPUT"]
        I[🌿 Donor Impact]
        J[🍽️ Recipient Fed]
        K[🚴 Volunteer Active]
    end

    A --> C --> D --> F
    B --> F
    E --> D
    F --> G --> K
    F --> H --> J
    F --> I
Loading

6. πŸ›€οΈ User Journey

sequenceDiagram
    autonumber
    actor Donor
    participant App as 🌿 ResQPlate
    participant AI  as πŸ€– AI Engine
    participant DB  as πŸ” Appwrite
    participant Vol as 🚴 Volunteer
    participant Rec as 🍽️ Recipient

    Note over Donor,App: πŸ“Έ Phase 1 β€” Post in 60s
    Donor->>App: Snap food photo
    App->>AI: Analyze via Groq Vision
    AI-->>App: Auto-fill food details
    App->>DB: Post donation listing
    DB-->>App: βœ… Confirmed

    Note over App,Rec: πŸ€– Phase 2 β€” AI Matching
    App->>AI: Find matches via Gemini
    AI-->>App: Top recipient matches
    App->>Rec: πŸ”” Notify β€” food available

    Note over App,Vol: 🚴 Phase 3 β€” Volunteer Coordination
    App->>Vol: πŸ”” Notify pickup opportunity
    Vol->>App: Accept pickup
    App->>Rec: Food is on the way!

    Note over Vol,Donor: 🌿 Phase 4 β€” Delivery & Impact
    Vol->>App: Confirm pickup
    App->>DB: Update status β†’ in transit
    Vol->>App: Confirm delivery
    App->>DB: Mark complete
    App->>Donor: 🌿 Impact summary β€” tree grows!
Loading

7. πŸ—ΊοΈ 3D System Map

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              🌐 FRONTEND LAYER  β€”  React 19 + Vite 7                β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚   β”‚    Pages  β€’  Components  β€’  Hooks  β€’  Contexts  β€’  Layouts   β”‚  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚               πŸ€– AI LAYER  β€”  Groq + Gemini                         β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚   β”‚  Vision Analysis  β€’  Smart Matching  β€’  Chatbot  β€’  Agent   β”‚  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           πŸ—ΊοΈ MAPPING LAYER  β€”  Leaflet + React Leaflet              β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚   β”‚   Live Tracking  β€’  Route Optimisation  β€’  Eco-Heatmaps     β”‚  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              πŸ” BACKEND LAYER  β€”  Appwrite Cloud                    β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚   β”‚  Auth  β€’  Database  β€’  Storage  β€’  Functions  β€’  Realtime   β”‚  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                               β–Ό
                    🌍 Community Impact
             (🍽️ Food Waste ↓  Β·  😊 Hunger ↓)
πŸ—οΈ Layer βš™οΈ Technologies πŸ“ Responsibility
🌐 Frontend React 19 · Vite 7 · Tailwind 4 · Framer Motion UI rendering, animations, routing, state
πŸ€– AI Engine Groq SDK Β· Google Gemini Image analysis, matching, chatbot, agent
πŸ—ΊοΈ Maps Leaflet Β· React Leaflet Live tracking, route optimisation, heatmaps
πŸ” Backend Appwrite Auth, database, file storage, realtime events

8. πŸ› οΈ Tech Stack

βš›οΈ Frontend

πŸ€– AI & Intelligence

πŸ” Backend & Services

βš™οΈ Capability πŸ”¬ Implementation πŸ† Result
⚑ Post Speed Groq Vision β†’ Gemini pipeline Food listed in under 60 seconds
πŸ€– AI Matching Gemini location + need scoring Right food to right person
πŸ—ΊοΈ Live Tracking React Leaflet + Appwrite Realtime Volunteer position updates live
🎨 Animations Framer Motion botanical variants Engaging, purposeful micro-interactions
πŸ” Auth Appwrite Auth + ProtectedRoute Secure access control across all pages
πŸ“Š Analytics Client-side aggregation + charting Personal + global impact dashboards

9. πŸ“‚ Project Structure

🌿 ResQPlate/frontend/
β”‚
β”œβ”€β”€ 🎬 src/animations/
β”‚   └── variants.js                  # Framer Motion animation variants
β”‚
β”œβ”€β”€ 🧩 src/components/
β”‚   β”œβ”€β”€ πŸ’¬ Chat/
β”‚   β”‚   └── ResQBot.jsx              # Gemini AI chatbot interface
β”‚   β”œβ”€β”€ πŸ“§ Contact/
β”‚   β”‚   └── Contact.jsx              # Contact form (EmailJS)
β”‚   β”œβ”€β”€ πŸ“Š Dashboard/
β”‚   β”‚   β”œβ”€β”€ ImpactCard.jsx           # Animated impact statistics card
β”‚   β”‚   └── QuickDonationModal.jsx   # One-tap quick donation modal
β”‚   β”œβ”€β”€ πŸ“„ About.jsx                 # Platform about page
β”‚   β”œβ”€β”€ πŸƒ FoodCard.jsx              # Food listing item card
β”‚   β”œβ”€β”€ 🏠 Landing.jsx               # Public landing page
β”‚   β”œβ”€β”€ 🏷️ Logo.jsx                  # Brand logo component
β”‚   β”œβ”€β”€ πŸ—ΊοΈ MapView.jsx               # Leaflet interactive map wrapper
β”‚   β”œβ”€β”€ πŸ” Navbar.jsx                # Responsive navigation bar
β”‚   β”œβ”€β”€ 🎞️ PageTransition.jsx        # Framer Motion page transitions
β”‚   β”œβ”€β”€ πŸ”’ ProtectedRoute.jsx        # Auth guard for private routes
β”‚   └── ⚑ QuickActionCard.jsx        # Botanical growth animated cards
β”‚
β”œβ”€β”€ πŸ”„ src/context/
β”‚   β”œβ”€β”€ AuthContext.jsx              # Appwrite auth state + helpers
β”‚   └── CartContext.jsx              # Food cart state management
β”‚
β”œβ”€β”€ πŸͺ src/hooks/
β”‚   β”œβ”€β”€ useOrderTracking.js          # Real-time order status logic
β”‚   β”œβ”€β”€ useSmartAlerts.js            # Push notification + alert polling
β”‚   └── useVolunteerPickups.js       # Volunteer assignment + routing
β”‚
β”œβ”€β”€ πŸ–ΌοΈ src/layouts/
β”‚   └── DashboardLayout.jsx          # Shared dashboard sidebar + header
β”‚
β”œβ”€β”€ πŸ“„ src/pages/
β”‚   β”œβ”€β”€ πŸ€– AIMatching.jsx            # Gemini-powered match discovery
β”‚   β”œβ”€β”€ πŸ“Š Analytics.jsx             # Impact charts + eco-heatmaps
β”‚   β”œβ”€β”€ πŸ›’ Cart.jsx                  # Food cart review
β”‚   β”œβ”€β”€ πŸ’³ Checkout.jsx              # Checkout + confirmation flow
β”‚   β”œβ”€β”€ 🏠 DashboardHome.jsx         # Main dashboard entry
β”‚   β”œβ”€β”€ πŸ“Έ DonateFood.jsx            # Manual food donation form
β”‚   β”œβ”€β”€ 🍽️ FoodListing.jsx           # Browse all available donations
β”‚   β”œβ”€β”€ 🌿 ImpactDelivered.jsx       # Post-delivery impact summary
β”‚   β”œβ”€β”€ πŸ† Leaderboard.jsx           # Community ranking board
β”‚   β”œβ”€β”€ πŸ”‘ Login.jsx                 # Appwrite auth login
β”‚   β”œβ”€β”€ πŸ—ΊοΈ OrderTracking.jsx         # Live map order tracker
β”‚   β”œβ”€β”€ ⚑ PostIn60Seconds.jsx        # AI-powered 60s donation flow
β”‚   β”œβ”€β”€ πŸ‘€ Profile.jsx               # User profile + history
β”‚   β”œβ”€β”€ βš™οΈ Settings.jsx              # Preferences + notifications
β”‚   β”œβ”€β”€ πŸ“ Signup.jsx                # New user registration
β”‚   β”œβ”€β”€ πŸ”” SmartAlerts.jsx           # Donation opportunity alerts
β”‚   └── 🚴 VolunteerPickup.jsx       # Volunteer pickup dashboard
β”‚
β”œβ”€β”€ βš™οΈ src/services/
β”‚   β”œβ”€β”€ aiService.js                 # Groq + Gemini API wrappers
β”‚   β”œβ”€β”€ appwrite.js                  # Appwrite client configuration
β”‚   β”œβ”€β”€ dataService.js               # Data fetching + caching helpers
β”‚   └── impactService.js             # Carbon + meal impact calculations
β”‚
β”œβ”€β”€ πŸ—„οΈ src/data/
β”‚   └── mockData.js                  # Dev-time seed data
β”‚
β”œβ”€β”€ 🏠 src/App.jsx                   # Root component + all routes
β”œβ”€β”€ πŸš€ src/main.jsx                  # Vite app entry point
└── 🎨 src/index.css                 # Global styles + Tailwind directives

10. πŸ“¦ Getting Started

10.1 πŸ”§ Prerequisites

πŸ› οΈ Tool πŸ“Œ Version πŸ”— Link
Node β‰₯ 18.x nodejs.org
npm β‰₯ 8.x Bundled with Node
πŸ” Appwrite Cloud or self-hosted appwrite.io
πŸ€– Groq API Key Free tier console.groq.com
🧠 Gemini API Key Free tier aistudio.google.com

10.2 ⬇️ Install

πŸ“₯ Step 1 β€” Clone

git clone https://github.com/salonyranjan/ResQpla8.git
cd ResQpla8/frontend

πŸ“¦ Step 2 β€” Install dependencies

npm install

10.3 πŸ”‘ Environment Variables

πŸ” Step 3 β€” Create frontend/.env

cp .env.example .env
# Appwrite Configuration
VITE_APPWRITE_ENDPOINT="https://fra.cloud.appwrite.io/v1"
VITE_APPWRITE_PROJECT_ID="your_project_id"
VITE_APPWRITE_PROJECT_NAME="ResQPlate"
VITE_APPWRITE_DATABASE_ID="your_database_id"
VITE_APPWRITE_PICKUPS_COLLECTION_ID="pickups"
VITE_APPWRITE_BUCKET_ID="your_bucket_id"

# AI Inference (Groq LPU)
# IMPORTANT: Do not share your real key in public repositories.
VITE_GROQ_API_KEY="gsk_your_secret_key_here"

# Email Notification Service (EmailJS)
VITE_EMAILJS_PUBLIC_KEY="your_public_key"
VITE_EMAILJS_SERVICE_ID="your_service_id"
VITE_EMAILJS_NEWSLETTER_TEMPLATE_ID="your_newsletter_template_id"
VITE_EMAILJS_CONTACT_TEMPLATE_ID="your_contact_template_id"

πŸ” Security note: .env is git-ignored. Never commit real keys. A .env.example template is provided β€” copy it and fill in your values.

10.4 πŸ–₯️ Run & Build

πŸ“œ Script πŸ’» Command πŸ“ Purpose
πŸš€ Dev server npm run dev Start Vite HMR at http://localhost:5173
πŸ—οΈ Production build npm run build Optimised output in dist/
πŸ” Preview build npm run preview Test production build locally
🧹 Lint npm run lint ESLint code quality check

11. ⚑ Performance

πŸ“Š Metric 🎯 Value πŸ“ Notes
⚑ Post in 60s < 60s Photo β†’ live listing via Groq + Gemini
πŸ€– Groq Vision ~800ms Image analysis + field extraction
🧠 Gemini Match ~600ms Recipient matching query
πŸ—οΈ Vite Build < 5s Production bundle with tree-shaking
πŸ—ΊοΈ Map Render < 200ms Leaflet tiles + marker placement
🎨 Animation FPS 60fps Framer Motion hardware-accelerated
πŸ“¦ Bundle Minimised Code splitting + lazy loading per route

12. πŸ—ΊοΈ Roadmap

Status πŸš€ Feature 🎯 Priority
βœ… Post in 60s β€” Groq Vision + Gemini auto-fill πŸ”΄ Core
βœ… Smart AI Matching β€” Gemini recipient discovery πŸ”΄ Core
βœ… Live Order Tracking β€” Leaflet maps πŸ”΄ Core
βœ… ResQBot β€” Gemini conversational assistant πŸ”΄ Core
βœ… ResQ-Agent Dispatcher β€” Llama 3.1 agentic workflow πŸ”΄ Core
βœ… Eco-Heatmaps β€” hunger vs. waste geospatial viz πŸ”΄ Core
βœ… Leaderboard + Impact Analytics πŸ”΄ Core
πŸ”„ Push Notifications β€” native browser alerts 🟑 High
πŸ”„ Offline Mode β€” PWA + service worker caching 🟑 High
πŸ”„ Multi-language i18n β€” regional language support 🟑 High
πŸ“… Mobile App β€” React Native port 🟒 Planned
πŸ“… NGO Dashboard β€” bulk donation management panel 🟒 Planned
πŸ“… Carbon Credits β€” blockchain-verified impact tokens 🟒 Planned
πŸ’‘ AR Food Scanner β€” camera overlay for food ID πŸ”΅ Idea
πŸ’‘ Voice Commands β€” donate by speaking πŸ”΅ Idea

πŸ’¬ Open a feature request β†’


13. 🀝 Contributing

All contributions to reduce food waste are warmly welcome! 🌿

# 1. Fork the repository on GitHub
# 2. Create your feature branch
git checkout -b feature/your-feature

# 3. Commit with conventional format
git commit -m "feat: add your feature"
# Prefixes: fix: | docs: | style: | refactor: | test: | chore:

# 4. Push & open a PR
git push origin feature/your-feature

Contribution Guidelines:

  • Follow the existing ESLint config β€” run npm run lint before submitting
  • Write meaningful, conventional commit messages
  • Update relevant documentation if adding new features
  • Test across mobile and desktop breakpoints

Priority areas:

πŸ”₯ Area πŸ“ What's Needed
🌐 i18n Multi-language support with react-i18next
πŸ“± PWA Service worker + offline caching strategy
πŸ§ͺ Tests Vitest + React Testing Library component coverage
🎨 UI New Tailwind component variants, dark mode

14. ❓ FAQ

πŸ€– How does Post in 60 Seconds actually work?

When you upload a food photo, it's sent to Groq's Llama 3.2 Vision API, which identifies the food type, quantity, and condition. That structured output is passed to Google Gemini, which writes a formatted listing title, selects the correct category, and estimates an expiry window. The entire round-trip takes under 2 seconds β€” you just review and tap Post.

πŸ” Are my API keys safe in the browser?

This is a frontend-first project using VITE_ prefixed env vars, which means keys are bundled into the client. For production at scale, proxy all AI calls through a backend serverless function (Appwrite Functions or Vercel Edge Functions) so keys never ship to the browser. A backend proxy layer is on the roadmap.

πŸ—ΊοΈ Does live tracking use real GPS?

Yes β€” the useOrderTracking hook uses the browser's navigator.geolocation API to get the volunteer's coordinates and updates them in Appwrite Realtime. The donor and recipient see the volunteer's position update live on the Leaflet map without polling.

πŸ”Œ Can I self-host Appwrite instead of using the cloud?

Absolutely. Update VITE_APPWRITE_ENDPOINT in .env to your self-hosted instance URL (e.g. https://appwrite.yourdomain.com/v1). All Appwrite SDK calls in src/services/appwrite.js will automatically point to your instance.


15. πŸ“„ Changelog

Version Highlights
πŸ†• v2.0.0 ResQ-Agent Dispatcher Β· Eco-Heatmaps Β· Analytics Β· Leaderboard Β· Botanical UI
v1.5.0 Live order tracking Β· Volunteer routing Β· Smart Alerts Β· ResQBot chatbot
v1.0.0 πŸŽ‰ Initial release β€” Post in 60s Β· Groq Vision Β· Gemini Matching Β· Appwrite

16. πŸ‘€ Author

Salony Ranjan

✦ Salony Ranjan

πŸ€– AI Engineer Β Β·Β  πŸ§‘β€πŸ’» Full-Stack Dev Β Β·Β  🌿 Tech for Social Good

"Using AI and community to turn food surplus into impact β€” one plate at a time."


Β  Β  Β 

17. ⭐ Show Your Support

If ResQPlate inspired you, taught you something new, or made you think about food waste differently β€” show it some love! 🌿

πŸ’‘ Pro Tip: Go to GitHub repo Settings β†’ Social Preview and upload the hero screenshot. When you share on LinkedIn, your beautiful Cyber-Green UI shows instead of a generic GitHub card β€” perfect for a social impact project.

Β  Β  Β 




Made with 🌿 by Salony Ranjan  ·  © 2026 ResQPlate · MIT

About

🌿ResQPlate is a community-driven, AI-powered food rescue platform that connects donors, recipients, and volunteers to eliminate food waste and fight hunger.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors