RESCURE
Expert Rescue for Strays and Injured Animals
Created on 28th February 2026
β’
RESCURE
Expert Rescue for Strays and Injured Animals
The problem RESCURE solves
The Problem It Solves
π¨ For Citizens β "I found an injured animal, now what?"
Every day, millions of Indians walk past injured stray dogs, cats, and cows with no idea who to call. There's no 911 for animals. Citizens currently resort to posting on WhatsApp groups or Twitter and hoping someone sees it β most posts get buried within minutes. RESCURE gives any citizen a one-tap report that instantly:
- πΈ Analyzes the injury using Gemini Vision AI (is it critical or minor?)
- π Detects their location and finds the nearest capable NGO automatically
- π΄ Works offline β reports queue locally and sync when connectivity returns, critical for rural and low-network areas
- π Sends real-time push notifications to the matched NGO so response begins immediately
No more guessing, no more unanswered WhatsApp messages. Report β AI scores it β nearest NGO is alerted β in under 30 seconds.
π₯ For NGOs β "We're drowning in unorganized rescue requests"
Animal rescue NGOs currently manage operations through a painful mix of WhatsApp groups, Excel sheets, and paper registers. This means:
- No way to prioritize β a dog hit by a car gets the same attention as a minor limp
- No SLA tracking β cases silently fall through the cracks
- No idea which field worker is closest to the incident
- Medical records are lost when paper registers go missing
RESCURE replaces all of that with a full SaaS dashboard:
- π AI-scored case queue β CRITICAL cases auto-surface to the top
- β±οΈ SLA timers that trigger escalation alerts if a case isn't actioned in time
- πΊοΈ Live map showing field worker GPS positions and open cases
- π₯ Team management β assign cases to the nearest available worker
- π Analytics dashboard β track rescue rates, response times, and operational bottlenecks
π©Ί For Veterinarians β "I get calls, but no context"
Vets currently receive rescue consult requests over phone calls β no photos, no medical history, no structured data. RESCURE provides a telehealth consultation system where vets see photos, AI analysis, and can respond with treatment plans attached to the animal's permanent record.
πΎ For Animals β A Digital Identity for Life
Every rescued animal gets a QR-coded health passport β a public page anyone can scan to see:
- Species, breed, and estimated age
- Full medical history (vaccinations, surgeries, treatments)
- Expense breakdown (food, medicine, transport)
- Sponsorship status and impact
This means no more lost medical records when animals move between shelters. The QR follows the animal for life.
π° For Sponsors β "Where does my money go?"
Currently, animal sponsors donate via UPI with zero visibility into how funds are used. RESCURE provides:
- Transparent expense tracking per animal
- Monthly impact reports showing exactly what their donation covered
- 80G tax exemption certificates for Indian donors
- CSR dashboards for corporate sponsors (India's mandatory 2% CSR compliance)
πΊοΈ For Cities β Proactive Instead of Reactive
RESCURE's predictive hotspot map uses geohash clustering to identify zones where incidents keep recurring. This helps municipal bodies and NGOs proactively deploy resources instead of always reacting after an animal is already injured.
In short: RESCURE takes a process that was chaotic, manual, and invisible β and makes it structured, automated, and transparent for every stakeholder in the animal rescue chain.
Challenges we ran into
Challenges I Ran Into
1. π Auth System Migration β NextAuth v5 β Auth0
We initially built authentication with NextAuth v5 (Beta) using Google OAuth + Magic Link. Mid-development, we hit session-handling instability and edge-case bugs in the beta release. We decided to migrate to Auth0 for production reliability.
The challenge: Our entire middleware, role-based route protection, and 6 different dashboard layouts were tightly coupled to NextAuth's session API. Migrating meant rewriting:
- The auth configuration layer
- Session retrieval in every API route
- Role-checking middleware across all protected routes
- The login/register UI flow
How we solved it: We created a migration guide (
MIGRATION_NEXTAUTH_TO_AUTH0.md
), abstracted the session logic behind a sharedauth.ts
utility, and swapped the provider in one pass β keeping the same role-based guard interface so dashboards didn't need changes.2. π Vercel Deployment β Prisma Client Generation Failure
Our first deploy to Vercel failed with a
PrismaClientInitializationError
. Prisma's auto-generation wasn't triggering on Vercel because of dependency caching β Vercel skipspostinstall
hooks when dependencies are cached.The fix: We modified the
build
script inpackage.json
to explicitly runprisma generate
beforenext build
:"build": "prisma generate && next build"
A simple one-liner, but it took us a while to understand why it worked locally but failed on Vercel β the caching behavior is not well-documented.
3. π΄ Offline-First Architecture β Syncing IndexedDB Reports
Building offline support for the citizen report flow was one of the hardest parts. The challenge: when a user submits a report without internet, we store it in IndexedDB, but we also need to:
- Handle the case where photos were captured offline (base64 blobs that need to be uploaded to Cloudinary after reconnection)
- Deduplicate reports if the user retries while offline
- Re-run AI scoring on sync since Gemini requires a server call
How we solved it: We built a
report-queue.ts
module using theidb
library with asynced
index. On reconnection, a background sync loop picks up unsynced reports, uploads images to Cloudinary, sends the photo to Gemini for AI scoring, and then POSTs the complete report to our API. Each step is idempotent to prevent duplicates.4. πΊοΈ Leaflet + Next.js SSR Conflict
Leaflet.js is a client-only library β it accesses
window
anddocument
on import. Next.js 15 with App Router tries to server-render everything by default, which caused immediate crashes:ReferenceError: window is not defined
How we solved it: We wrapped all Leaflet components with
dynamic()
imports and{ ssr: false }
, and created dedicated client-side wrapper components insrc/components/maps/
. This isolated all map logic from the SSR pipeline.5. π€ Gemini AI Response Parsing
Gemini 2.0 Flash Vision sometimes returns inconsistent JSON β wrapping the response in markdown code fences (
```json ... ```
) even when prompted not to, or occasionally omitting fields.How we solved it: We built a robust parser in
report-analyzer.ts
that:- Strips markdown code fences with regex before parsing
- Provides fallback values for every field via a
FALLBACK
constant - Uses TypeScript
Partial<>
typing to safely handle missing fields - Logs raw responses for debugging without crashing the user flow
6. β‘ ESLint v10 Upgrade Breaking Changes
After upgrading to ESLint v10, we were hit with 100+ new lint errors from stricter React hooks rules β specifically around synchronous state updates in effects, impure function calls during render, and component creation during render.
How we solved it: We systematically audited each violation, extracted state logic into proper
useEffect
hooks anduseMemo
/useCallback
wrappers, and moved component definitions outside render functions. It was tedious but significantly improved our code quality.7. π Next.js Middleware β Proxy Migration
Next.js 16 deprecated the
middleware.ts
convention in favor of a newproxy.ts
pattern. Our role-based route protection middleware had to be completely restructured.How we solved it: We followed the Next.js migration docs, restructured our route guards into the new proxy convention, and maintained the same 7-role access control matrix (Citizen, NGO Admin, NGO Worker, Vet, Supplier, Sponsor, Platform Admin) without breaking any existing routes.
Tracks Applied (3)
Gemini API
Major League Hacking
Auth0
Major League Hacking

