Skip to content

Diya1415/GDG-ResourceAI

Repository files navigation

🌐 ResourceAI - Smart Disaster Response & Resource Allocation

Google Solution Challenge 2026 Status License

ResourceAI is a high-performance, AI-driven disaster management platform developed for the Google Solution Challenge 2026. It transforms chaotic field data into actionable intelligence, enabling NGOs to deploy the right resources to the right places in record time.

πŸ”— Live Demo

Access ResourceAI Now - Deployed on Firebase Hosting


🌟 Submission Spotlight: Build with AI Hackathon

This project utilizes Google Gemini 1.5 Flash to solve the critical problem of information overload during disasters. By automating the extraction of structured data from messy reports and datasets, ResourceAI ensures that decision-makers can act on facts, not noise.

πŸš€ Key Features

🧠 1. Neural Intelligence Pipeline (Powered by Gemini AI)

  • Structured AI Extraction: Uses a strict prompt engineering layer to transform unstructured text, surveys, and files into validated JSON data.
  • Multi-Format Processing: Native support for CSV (PapaParse), Excel (XLSX), TXT, and simulated PDF extraction.
  • Intelligent Inference: Gemini automatically infers missing locations, estimates affected populations, and calculates mission priority.
  • Deterministic Fallback: A robust rule-based engine takes over if AI services are throttled or unavailable, ensuring 100% uptime for critical reporting.

πŸ—ΊοΈ 2. Live Command Center (NGO Dashboard)

  • Geospatial Insights: Real-time map visualization using React-Leaflet, color-coded by urgency level.
  • AI Analytics Dashboard: Instant visualization of disaster trends, most active zones, and critical resource needs.
  • Personnel Registry: Real-time tracking of volunteer status (Available, Nearby, On Mission) with instant synchronization across the network.

⚑ 3. Intelligent Matchmaking & Deployment

  • AI-Driven Matching: Automatically pairs high-priority needs with the best-suited volunteers based on skill-matching, geographic proximity, and availability.
  • Bidirectional Deployment Flow:
    • NGOs can "Deploy" response teams with a single click.
    • Volunteers receive instant mission alerts.
    • Volunteers can Accept or Reject missions, with live status feedback (βœ…/❌) visible to NGOs.
  • Urgent Broadcast System: NGOs can trigger global broadcasts to the entire volunteer network if the matching engine finds no local personnel.

πŸ”” 4. Real-time Notification System

  • Firestore Sync: Leveraging Firebase onSnapshot for millisecond-latency updates on mission status, volunteer responses, and field reports.
  • Unified Alerts: Role-based notifications for both NGOs (new reports/responses) and Volunteers (new assignments/broadcasts).

πŸ› οΈ Modern Technology Stack

Layer Technology
Frontend React 19 (Vite), Tailwind CSS, Lucide React
Backend Firebase (Firestore, Authentication)
AI Engine Google Gemini 1.5 Flash API
Mapping React-Leaflet (OpenStreetMap)
Processing PapaParse (CSV), SheetJS (Excel)
Hosting Firebase Hosting

πŸ“¦ Setup & Installation

Prerequisites

  • Node.js 18+ and npm
  • A Firebase project with Firestore enabled
  • Google Gemini API key

Quick Start

  1. Clone the repository:

    git clone <repository-url>
    cd smart-resource-app
  2. Install dependencies:

    npm install
  3. Configure Environment Variables: Create a .env file in the root directory:

    VITE_FIREBASE_API_KEY=your_firebase_key
    VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
    VITE_FIREBASE_PROJECT_ID=your_project_id
    VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
    VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
    VITE_FIREBASE_APP_ID=your_app_id
    VITE_GEMINI_API_KEY=your_gemini_api_key
  4. Launch Development Server:

    npm run dev

    The app will be available at http://localhost:5173

  5. Build for Production:

    npm run build
  6. Deploy to Firebase:

    firebase deploy

πŸ—οΈ Project Architecture

smart-resource-app/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # Reusable React components
β”‚   β”œβ”€β”€ context/            # Auth and global state management
β”‚   β”œβ”€β”€ pages/              # Page components (Dashboard, Login, etc.)
β”‚   β”œβ”€β”€ utils/              # Helper functions and seed data
β”‚   β”œβ”€β”€ App.jsx             # Main app router
β”‚   β”œβ”€β”€ firebase.js         # Firebase configuration
β”‚   └── main.jsx            # Entry point
β”œβ”€β”€ functions/              # Cloud Functions for backend logic
β”œβ”€β”€ dataconnect/            # Firebase Data Connect configuration
β”œβ”€β”€ public/                 # Static assets
└── dist/                   # Production build (Firebase Hosting)

πŸ” Role-Based Access Control (RBAC)

NGO Manager

  • Command Center access with real-time mission tracking
  • Map Insights with disaster zone visualization
  • AI Analytics dashboard for trend analysis
  • Volunteer Management and status monitoring
  • One-click Deployment Control
  • AI-powered resource recommendations

Verified Volunteer

  • Submit disaster reports and affected area data
  • File uploads (CSV, Excel, TXT, PDF)
  • Real-time status management (Available, Nearby, On Mission)
  • Instant mission alerts and notifications
  • Accept/Reject mission assignments
  • Live tracking and communication

πŸ“Š Key Workflows

1. Report & Intelligence Flow

  • Volunteers submit field reports β†’ AI Extraction Pipeline β†’ Structured Data β†’ NGO Dashboard
  • NGO reviews AI-extracted insights and prioritizes missions

2. Deployment & Response

  • NGO creates mission request β†’ AI Matching Engine β†’ Volunteer Selection
  • Selected volunteers receive instant alerts
  • Bidirectional communication: Accept/Reject with live status feedback

3. Real-time Synchronization

  • Firestore listener updates all connected clients instantly
  • Zero-latency mission status updates across the network

🌱 Getting Started as a Contributor

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ Available Commands

# Development
npm run dev          # Start development server
npm run build        # Build for production
npm run preview      # Preview production build
npm run lint         # Run ESLint

# Firebase
firebase deploy      # Deploy to Firebase Hosting
firebase serve       # Serve locally with Firebase emulator
firebase login       # Login to Firebase

πŸ› Troubleshooting

Build Issues

  • Clear node_modules and package-lock.json, then run npm install
  • Ensure Node.js version is 18 or higher: node --version

Firebase Connection Issues

  • Verify Firebase credentials in .env file
  • Check Firebase console for project settings
  • Ensure Firestore database is created and accessible

Gemini API Issues

  • Verify API key is valid and active
  • Check API quota usage in Google Cloud Console
  • Ensure API is enabled for your project

πŸ“š Documentation & Resources

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🀝 Support

For issues, questions, or suggestions:

  • Open an issue on GitHub
  • Contact the development team
  • Check existing documentation

ResourceAI β€” Harnessing AI to save lives and optimize every second.

Built with ❀️ for the Google Solution Challenge 2026 | View Live Demo

About

ResourceAI uses AI to analyze unstructured field data and support smart resource management, helping NGOs identify urgent needs and coordinate volunteers effectively.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages