🏔️ Inspiration

Every monsoon weekend in Maharashtra, lakhs of adventure tourists head to the Sahyadris. But the weather is brutally unpredictable. Sudden micro-cloudbursts trigger fatal flash floods (like the Devkund Valley tragedy) and landslides. This results in a 30% last-minute cancellation rate, wiping out ₹2 Crores in refunds annually and leaving local operators financially unstable. We realized that traditional booking platforms just issue refunds and cancel trips. We wanted to build a system that doesn't just cancel, but protects and pivots.

🚀 What it does

TrekShift is an AI-driven, monsoon-proof adventure marketplace. When severe weather threatens a booked trek, our Monsoon-Proof AI Pivot Agent instantly activates.

It executes a 6-step protective loop:

  1. Hazard Detection: Integrates with IMD weather streams to detect 180mm+ storms.
  2. State Alert: Booking status flips to WEATHER_ALERT.
  3. AI Pivot: Gemini 3.5 Flash computes weather-proof alternatives.
  4. Geofencing: Scans for safe locations within a 20km radius.
  5. Push Notify: Sends a WhatsApp/SMS alert to the tourist.
  6. 1-Click Rebook: Funds are instantly routed via Smart Escrow to the new operator.

Instead of losing their weekend, the tourist gets 3 safe, geofenced alternatives (e.g., pivoting from a flooded Rajmachi trek to the sheltered Karla Caves) and rebooks in one click.

🛠️ How we built it

We built TrekShift as a full-stack, cloud-native application:

  • Frontend: Next.js 14 (App Router) with TypeScript and Tailwind CSS. We designed a premium "Marigold Yellow" glassmorphism UI to ensure high accessibility while standing out.
  • Backend & Database: PostgreSQL managed by Prisma ORM. We implemented a robust state-machine for bookings and utilized JSONB columns (pivotHistory) to maintain high-density, chronological audit logs of every weather trigger and AI reroute.
  • AI Engine: Google Gemini 3.5 Flash, prompted with deterministic JSON schemas to generate geographically accurate, micro-weather-safe itineraries specific to Maharashtra's terrain.
  • Deployment: Hosted on Google Cloud Run for scalable, containerized backend performance.

🚧 Challenges we faced

  • AI Hallucination in Geography: Initially, the AI would suggest safe caves that were 100km away. We had to engineer a strict "Geofencing" prompt and integrate map coordinates to force the AI to only suggest alternatives within a 20km radius of the original trek.
  • Marketplace Economics: Figuring out how to handle the money when a user pivots from a ₹1500 trek to a ₹900 trek. We designed a "Smart Escrow" system that instantly calculates the refund difference and routes it, while rewarding the original operator with a +6% Trust Score for facilitating the safe pivot, eliminating chargebacks.
  • UI/UX Balance: Designing a striking yellow-themed dashboard that remains WCAG accessible and doesn't cause eye strain. We solved this using frosted glassmorphic cards over a soft amber gradient.

🏆 Accomplishments that we're proud of

  • Achieving an AI generation time of just 1.8 seconds for complex, multi-stop itinerary rerouting.
  • Building a fully functional, interactive weather simulator on the dashboard that visually demonstrates the state-machine transitions in real-time.
  • Creating a dual-sided marketplace logic where both tourists (safety) and operators (revenue retention) win.

🚀 What's next for TrekShift

  • Integrating real-time APIs from the Indian Meteorological Department (IMD).
  • Expanding the geofenced database to cover all 500+ adventure operators in Maharashtra.
  • Launching the consumer-facing mobile app with offline-first PWA capabilities for when tourists lose network on the trails.

Built With

Share this project:

Updates

Submission history