Google Solution Challenge 2026 Β· Built with Firebase Β· Powered by Gemini AI
ResQNet is a real-time community crisis response and resource-allocation platform designed to bridge the gap between people who need emergency help and the coordinators + volunteers who can deliver it. In disaster-prone or resource-constrained communities, traditional emergency channels are often slow, opaque, or inaccessible. ResQNet solves this by combining:
- A citizen-facing reporter app to send structured SOS reports in seconds
- A coordinator dashboard powered by Gemini AI to triage, prioritize, and dispatch volunteers
- A volunteer registry so field responders can self-register and be matched to incidents automatically
- A community resources hub with local helplines and crowd-sourced resource listings
All data is synchronized in real-time via Firebase Firestore, making the platform resilient and responsive even during fast-moving crises.
Every year, thousands of people in under-served communities face emergencies β floods, medical crises, conflict, displacement β where first responders either don't receive timely information or can't efficiently allocate limited volunteers and resources. Manual coordination (calls, WhatsApp groups, spreadsheets) is error-prone and slow.
ResQNet solves three root problems:
- Fragmented reporting β citizens have no structured way to report local crises
- Slow triage β coordinators can't quickly judge severity across multiple incoming reports
- Inefficient dispatch β volunteers are assigned manually without proximity or skill matching
- Animated dark-mode hero with a live blinking "Crisis Response Network" badge
- Two clear entry points: "I need help" (citizen) and "I'm a coordinator"
- System status pills (operational Β· real-time sync Β· secure login)
- Responsive layout that stacks on mobile
- Tabbed UI β Sign In / Create Account on a single page
- Email/Password sign-in with Firebase Auth
- Google OAuth sign-in via popup β one-click onboarding
- Forgot password flow with email reset link
- Account creation stores full profile (name, phone, address, role) to Firestore
userscollection - Auto-redirect if already signed in
- Friendly inline error messages for all common failure modes
The main interface for citizens and field users after sign-in.
- Giant hold-to-activate circle button with an animated SVG progress ring
- Hold for 2 seconds to trigger the report flow β prevents accidental submissions
- On hold: button scales down, progress ring fills
- Automatically captures GPS coordinates via the browser Geolocation API
- Uses Nominatim (OpenStreetMap) to resolve coordinates β a human-readable address
- Falls back gracefully if GPS is denied
- In-modal microphone button using the Web Speech API
- 15-second countdown with live status updates
- Captured transcript is stored alongside the report for AI triage context
Five incident types, each mapped to a triage level:
| Category | Icon | Default Triage |
|---|---|---|
| Medical | π₯ | Critical (Level 1) |
| Disaster | π | Severe (Level 2) |
| Conflict | βοΈ | Moderate (Level 3) |
| Resource | π¦ | Minor (Level 4) |
| Hospitality | π | Monitoring (Level 5) |
After submission, the app silently calls Gemini 2.5 Flash (falling back to 1.5 Flash) with:
- Incident type, description, voice transcript, and location
- Returns a structured JSON:
{ level, levelName, color, reasoning, volunteerTypes, estimatedMinutes } - The triage result is saved back to Firestore and shown in the success modal
- A fallback rule engine activates if all Gemini models fail (keyword-based heuristics)
- Live Firestore
onSnapshotlistener β no page refresh needed - Active incidents rendered as cards sorted by severity
- Each card shows: level, time, type, location, description
- "Mark resolved" button on each card updates Firestore status to
resolved - Real-time stats: active / deployed / resolved counts in the header
- Every significant event (report created, triage complete) writes a subcollection entry in
incidents/{id}/timeline - Actor, action, details, and server timestamp are recorded
The command-and-control center for verified coordinators, protected by Firebase email/password authentication.
| Panel | Description |
|---|---|
| Live Incidents | Real-time feed sorted by triage severity |
| Volunteers | View, filter, and dispatch volunteers |
| Report a Need | Submit an incident directly from the dashboard |
| History | Browse all past incidents with status filters |
| Insights | Charts, maps, and community analytics |
| Settings | Profile, notifications, triage self-test |
- Fetches all
incidentsordered bytimestampin real-time - Cards are sorted by AI-assigned triage level (Critical first)
- Each card shows:
- Color-coded left border matching triage level
- Triage badge (Level + name) with model badge (G3 / G2.5)
- Location, description, AI reasoning
- Assigned volunteer chip (if dispatched)
- Suggested volunteer buttons ranked by match score
The dashboard's fallback triage engine (fallbackTriageForType) auto-assigns levels to stale pending incidents (>5 min without a result):
- Level 1 β Critical (red) β Life-threatening, bleeding, cardiac, explosion
- Level 2 β Severe (orange) β Major injury, flood, violence
- Level 3 β Moderate (yellow) β Conflict, property risk
- Level 4 β Minor (green) β Resource shortages
- Level 5 β Monitoring (gray) β Support / hospitality needs
The match scoring algorithm ranks available volunteers per incident using:
Score = Skill Match (0-70) + GPS Proximity (0-50) + Urgency Bonus (0-10)
- Skill match: 70 points if the volunteer's skill aligns with incident type
- GPS proximity (Haversine formula):
- β€ 2 km β +50 pts
- β€ 5 km β +35 pts
- β€ 15 km β +20 pts
- β€ 30 km β +10 pts
- Urgency bonus: +10 pts if triage level is 1 or 2
- Falls back to text-based location matching when GPS coords unavailable
Dispatch action β clicking a volunteer button:
- Updates
incidents/{id}with volunteer name, skill,assignedAt - Updates
volunteers/{id}toavailable: false - Writes a
dispatchedtimeline entry
Clicking "Auto-dispatch top matches" in the Operations panel finds the single highest-scoring unassigned volunteer for each unresolved incident and dispatches them automatically.
- Incident Type Breakdown β Chart.js pie chart
- Severity Distribution β Bar chart by triage level
- Most Affected Areas β Ranked list of location frequency
- Incidents Over Time β 7-day trend line chart
- Incident Heatmap β Leaflet.js interactive map with clustered markers (color-coded by triage level)
- Download CSV Report β One-click export of all incident data
- Filter by All / Pending / Resolved
- Shows totals for each status
- Live-updated from Firestore
- Display name editor
- Notification preference toggle
- Triage Self-Test β Runs 5 deterministic test cases (one per level) and displays pass/fail results for validating the Gemini/fallback pipeline
- Sign Out
- Today's Active / Deployed / Resolved counts (real-time)
- Average response time calculated from
assignedAtβresolvedAttimestamps - AI Triage Queue counter β incidents awaiting a triage result
Public-accessible page (uses Firebase Anonymous Auth to write to Firestore).
Form fields:
- Full Name
- Phone Number
- Primary Skill (Medical / Rescue / Supply / Coordination)
- Location (auto-captured via GPS + Nominatim reverse geocode, or manual)
- Currently Available toggle
Volunteer documents saved to Firestore volunteers collection with GPS coordinates for proximity matching.
- Live Firestore listener β updates without refresh
- Filter buttons: All / Medical / Rescue / Supply
- Each card shows: initials avatar, name, skill, location, availability dot (green = available, orange = busy)
Community resource directory β also uses Anonymous Auth.
Quick-dial cards for:
- Medical Emergency β 108
- Police β 100
- Fire Brigade β 101
- Disaster Relief NDRF β 1078
- Local Ambulance (Durgapur) β 0343-2546000
Each card links to tel: for one-tap calling on mobile.
- Live-synced list from Firestore
resourcescollection - "+ Add Resource" button opens a modal form:
- Name, Type (NGO / Medical / Shelter / Food), Contact, Address
- Submitted resources appear instantly for all users
Standalone incident history viewer (also accessible from the reporter sidebar).
Profile management page for signed-in users.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ResQNet Web App β
β index.html β auth.html β reporter.html / coordinator.html β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββΌββββββββββββββββββ
β Firebase Backend β
β ββββββββββββββββββββββββββββββββ β
β β Firebase Authentication β β
β β (Email/Password + Google) β β
β ββββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββββ β
β β Cloud Firestore (real-time) β β
β β βββ /incidents β β
β β β βββ /timeline β β
β β βββ /volunteers β β
β β βββ /resources β β
β β βββ /users β β
β ββββββββββββββββββββββββββββββββ β
ββββββββββββββββββ¬ββββββββββββββββββ
β
ββββββββββββββββββΌββββββββββββββββββ
β External APIs β
β βββ Gemini 2.5 Flash (AI Triage) β
β βββ Nominatim (Reverse Geocode) β
β βββ Leaflet.js (Incident Map) β
β βββ Web Speech API (Voice Input) β
ββββββββββββββββββββββββββββββββββββ
| Collection | Description |
|---|---|
incidents |
All incident reports with triage data |
incidents/{id}/timeline |
Chronological audit log per incident |
volunteers |
Registered field volunteers with skills + GPS |
resources |
Community-submitted emergency resources |
users |
Reporter profiles created on sign-up |
| Layer | Technology |
|---|---|
| Frontend | Vanilla HTML5, CSS3, JavaScript (ES Modules) |
| Typography | Google Fonts β Inter |
| Auth | Firebase Authentication (Email/Password, Google OAuth, Anonymous) |
| Database | Firebase Cloud Firestore (real-time listeners) |
| AI Triage | Google Gemini API (2.5 Flash β 1.5 Flash fallback) |
| Maps | Leaflet.js + OpenStreetMap tiles |
| Charts | Chart.js (pie, bar, line) |
| Geocoding | Nominatim / OpenStreetMap Reverse Geocoding |
| Voice | Web Speech API (browser-native) |
| Deployment | Docker Β· Google Cloud Run |
| Version Control | Git / GitHub |
- Node.js (for a local dev server β optional)
- A Firebase project with Firestore and Authentication enabled
- A Gemini API key (from Google AI Studio)
git clone https://github.com/SyedArmanAli2003/GD-Solution-challange-2026.git
cd GD-Solution-challange-2026Copy the example config and fill in your credentials:
cp config.example.js config.jsEdit config.js:
const CONFIG = {
GEMINI_API_KEY: "your-gemini-api-key-here"
};Note: The Firebase config is currently embedded inline in each HTML file. Update the
firebaseConfigobjects inreporter.html,coordinator.html,volunteers.html,resources.html, andauth.htmlwith your own Firebase project credentials.
In your Firebase Console:
- Enable Authentication β Sign-in methods: Email/Password, Google, Anonymous
- Enable Cloud Firestore in production mode
- Apply the Firestore security rules from
firestore.rules
You need a local HTTP server (not file://) for Firebase and mic APIs to work:
# Using Python
python -m http.server 4173
# Using Node.js http-server
npx http-server -p 4173
# Then open:
# http://localhost:4173/index.htmlThe coordinator dashboard includes demo credentials in the login modal:
Email: resqnet.coordinator@gmail.com
Password: (contact the project author)
Build and run the container locally:
docker build -t resqnet .
docker run -p 8080:8080 resqnetgcloud run deploy resqnet \
--source . \
--project resqnet-494415 \
--region us-central1 \
--allow-unauthenticatedGD-Solution-challange-2026/
βββ index.html # Landing page β entry point
βββ auth.html # Sign In / Create Account
βββ reporter.html # Citizen reporter dashboard
βββ coordinator.html # Coordinator command center
βββ volunteers.html # Volunteer registration & listing
βββ resources.html # Emergency helplines & community resources
βββ history.html # Incident history viewer
βββ account.html # User account settings
βββ style.css # Shared design system (CSS variables, components)
βββ config.js # Runtime config (Gemini API key)
βββ config.example.js # Config template for new developers
βββ firebaseConfig.js # Firebase credentials helper
βββ auth.js # Auth helper module
βββ coordinator.js # Coordinator logic (separate module)
βββ volunteers.js # Volunteer management module
βββ resources.js # Resources module
βββ history.js # History module
βββ account.js # Account settings module
βββ crew-page.js # Additional crew utilities
βββ firestore.rules # Firestore security rules
βββ firebase.json # Firebase hosting configuration
βββ Dockerfile # Container build config
βββ .dockerignore # Docker exclusion list
βββ .gitignore # Git exclusion list
βββ LICENSE # MIT License
- Coordinator dashboard is protected by Firebase email/password auth β the app shell is hidden until authentication succeeds
- Reporter dashboard requires a valid (non-anonymous) Firebase user
- Volunteer & Resources pages use Anonymous Auth for write access, keeping the barrier low for community contributors while preventing unauthenticated direct API calls
- Firestore rules (
firestore.rules) restrict write/read access per collection - API keys are runtime-injected via
config.js(excluded from version control via.gitignore)
index.html
β auth.html (sign in / create account)
β reporter.html
β Hold SOS button (2s)
β Category modal opens
β GPS captured automatically
β Optional: record voice note (15s)
β Select category + optional description
β Submit
β Firestore write (incident created)
β Success modal shown
β Gemini AI triage runs in background
β Triage result saved to Firestore
β Coordinator dashboard updates live
coordinator.html
β Login (email/password)
β Live incidents panel (auto-loads)
β View AI-triaged incident card
β Click suggested volunteer β Dispatch
β Volunteer marked busy
β Incident marked deployed
β Timeline entry created
β Resolve incident β Status updated
β View Insights β Charts + Heatmap
β Export CSV β Download report
volunteers.html (no login required)
β Anonymous Firebase session created
β Fill form (name, phone, skill, location)
β GPS auto-captured + reverse geocoded
β Register β Saved to Firestore volunteers collection
β Appears in coordinator's volunteer pool instantly
| Level | Name | Color | Typical Scenarios |
|---|---|---|---|
| 1 | Critical | π΄ Red | Cardiac arrest, active bleeding, building collapse, explosion |
| 2 | Severe | π Orange | Flood, mass injury, riot, severe shortage |
| 3 | Moderate | π‘ Yellow | Conflict reports, property damage, moderate injuries |
| 4 | Minor | π’ Green | Supply shortages, non-urgent resource needs |
| 5 | Monitoring | β« Gray | Hospitality, shelter, general support requests |
ResQNet uses Google Gemini for automated incident triage:
Prompt structure:
You are an emergency triage AI.
Analyze this crisis and return ONLY valid JSON.
Type: {Medical/Disaster/Conflict/Resource/Hospitality}
Description: {user text}
Voice: {speech-to-text transcript}
Location: {reverse-geocoded address}
Return: { level, levelName, color, reasoning, volunteerTypes, estimatedMinutes }
Model cascade:
gemini-2.5-flash(primary)gemini-1.5-flash(secondary fallback)- Rule-based keyword engine (final fallback)
This cascade ensures zero downtime for triage even under API quota limits.
ResQNet addresses UN Sustainable Development Goals:
| SDG | How ResQNet helps |
|---|---|
| SDG 3 β Good Health & Well-being | Faster medical emergency response via AI triage |
| SDG 11 β Sustainable Cities & Communities | Resilient community crisis coordination |
| SDG 16 β Peace, Justice & Strong Institutions | Structured conflict reporting and resource allocation |
| SDG 17 β Partnerships for the Goals | Connecting volunteers, NGOs, and coordinators in one platform |
Syed Arman Ali Β· GitHub Aysha Tahoor GitHub Krish GitHub
Built for the Google Solution Challenge 2026.
This project is licensed under the MIT License.