Inspiration
Emergency response in India loses critical minutes to something that isn't really about ambulances or infrastructure — it's about information. A phone call to 108/112 depends entirely on a panicked person accurately describing their location and situation to a stranger, in real time, under stress. The national benchmark for ambulance response is 20–30 minutes, but real recorded response times in under-resourced districts often exceed 130 minutes — well past the WHO's 60-minute "Golden Hour." I wanted to see if AI could close that information gap instead of just adding another app on top of the problem.
What it does
ResQ is an AI-powered emergency response platform. A person reports an emergency by typing or speaking (English or Hindi), and real AI classifies the type, severity, and confidence — with explainable reasoning, not a black box. It also checks whether a report seems genuine or suspicious. Using the reporter's live location (or a specified address, for reporting on behalf of someone else), ResQ calculates the actual nearest ambulance, police, or fire unit using real distance math, and dispatches it. The reporter then sees a live map with the responding unit's driver name, vehicle number, and real-time ETA. The moment a unit is dispatched, the reporter's emergency contact automatically receives an SMS — triggered at the database level, not by a manual action. Every step is recorded in a tamper-proof, hash-chained audit trail. There's also an offline-accessible Wildlife Survival Guide for people in remote areas, and a separate Command Center for administrative oversight.
How I built it
Frontend is React + Vite. Backend is entirely Supabase — Postgres for data, Auth for accounts, Edge Functions for serverless logic, Realtime for live updates, and Row Level Security to keep data properly scoped between regular users and admins. Maps run on Leaflet with OpenStreetMap, so there's no API key or billing dependency. Family SMS notifications go through Fast2SMS, triggered automatically by a Supabase Database Webhook the instant an incident's status changes to "dispatched" — not a manual frontend call. Speech-to-text uses the browser's native Web Speech API. I built this solo, using Google Antigravity as an AI-assisted development environment to move fast, while making every architecture decision myself.
Challenges I ran into
Getting Row Level Security right without recursive policy loops was a real debugging arc — the fix required a SECURITY DEFINER function to check admin roles without RLS triggering itself repeatedly. Email confirmation combined with RLS created a timing gap where a user's profile row didn't exist yet at signup, solved with a database trigger instead of a manual frontend insert. Speech-to-text had a duplication bug caused by how interim vs. final results were handled, made worse on Android Chrome due to automatic recognition restarts. And I hit a real-world lesson in SMS gateway economics — Fast2SMS requires a minimum wallet top-up before its API activates at all, despite offering free signup credit.
Accomplishments that I'm proud of
Every core feature is genuinely working, not simulated — including a real SMS landing on a real phone the moment a unit is dispatched, and a real hash-chained audit log, not a static-looking table. Advancing from over 700 teams to the top 17 in this competition tells me the problem and approach are resonating beyond just my own conviction.
What I learned
A huge amount about Supabase's RLS model, event-driven architecture (database webhooks vs. manual triggers), and just how much production software work is debugging edge cases rather than writing new features. I also learned to be disciplined about clearly separating what's actually built from what's roadmap vision — especially important when pitching to judges who ask direct technical questions.
What's next for ResQ
The most important next step is a real pilot — one hospital, one campus, or one high-risk route — to get genuine usage data. On the technical side, the next major piece is offline dead-zone coverage: a low-cost LoRa relay system (~₹5,000/device) that lets a phone with zero signal hand off an emergency report over Bluetooth to a nearby device, which relays it over several kilometers to the nearest point with connectivity — inspired by delay-tolerant network projects like MIT's DakNet. This is designed and costed, not yet built, and is the piece that would let ResQ work in the exact places where even calling 108 currently cannot.
Built With
- css3
- fast2sms
- github
- html5
- javascript
- leaflet.js
- openstreetmap
- postgresql
- react
- render
- row-level-security
- supabase
- supabase-edge-functions
- vite
- web-speech-api
Log in or sign up for Devpost to join the conversation.