Inspiration

Modern cities face a three-front crisis. First, reactive road maintenance leads to thousands of lethal accidents every year (SDG 11.2). Second, municipal governments lose millions to "ghost fixes" and contractor material over-billing (SDG 16). Third, the world discards millions of highly capable smartphones annually, fueling an E-waste crisis (SDG 12.5).

We realized that discarded smartphones contain advanced accelerometers, GPS modules, and high-res cameras. What if we could upcycle this E-waste into a zero-cost, autonomous AI grid that holds infrastructure contractors accountable? That vision became DRISHTI-GRID 2.0.

What it does

DRISHTI-GRID 2.0 is an autonomous GovTech platform that manages the entire lifecycle of road maintenance:

  1. Zero-Cost Edge Sensors: Discarded smartphones (e.g., Samsung M12) are mounted on municipal garbage trucks running our Next.js PWA. They autonomously scan roads using a Tri-Trigger engine (Heartbeat & DeviceMotion jerks).
  2. AI Fraud Prevention: Gemini 3 Flash performs Monocular Depth Estimation on 2D images to calculate the 3D volume of the hazard, mathematically capping the raw materials a contractor can bill for.
  3. Smart Dispatch: The Command Center clusters work orders by contractor jurisdiction and enforces SLAs. A Live Weather Engine blocks "Hot-Mix" asphalt dispatch during monsoons, forcing temporary gravel fixes.
  4. Closed-Loop AI Verification: Contractors are only paid when our Edge Node re-drives the exact coordinate and the AI visually verifies the road is smooth, committing the proof to an immutable ledger.

The Math Behind the Magic (Anti-Fraud Engine)

To prevent material over-billing, we engineered Gemini to output spatial dimensions. We then apply strict civil engineering physics to calculate the maximum allowable Bitumen payload:

Standard asphalt density is roughly $2.32 \, \text{g/cm}^3$. The allowed billing payload includes a 15% safety/wastage margin:

$$ Payload (kg) = \left( \frac{Width \times Length \times Depth \times 2.32}{1000} \right) \times 1.15 $$

How we built it

  • The Edge Node: A Next.js Progressive Web App (PWA) utilizing HTML5 DeviceMotion and Geolocation APIs.
  • The AI Brain: Google Gemini 3 Flash Preview via a direct REST API integration for ultra-low latency multimodal processing.
  • The Command Center: A unified Next.js dashboard styled with Tailwind CSS and Leaflet Maps.
  • The Cloud State: Google Firebase Firestore powers the real-time NoSQL spatial sync between the Edge trucks and the Command Center.

Challenges we ran into

API Spam from Moving Vehicles: If a garbage truck gets stuck in traffic over a pothole, it would spam the AI API and database. Solution: We implemented an offline cache using the Haversine Formula to calculate Earth-sphere distances. If the new GPS coordinate is $< 1$ meter from a cached scan, the request is suppressed: $$ d = 2r \arcsin\left(\sqrt{\sin^2\left(\frac{\Delta\phi}{2}\right) + \cos\phi_1\cos\phi_2\sin^2\left(\frac{\Delta\lambda}{2}\right)}\right) $$

AI JSON Hallucinations: Large language models occasionally wrap JSON responses in markdown backticks, crashing standard parsers. Solution: We built a surgical regex extractor rawText.match(/\{[\s\S]*\}/) inside our REST call to guarantee crash-free parsing in the mobile environment.

Accomplishments that we're proud of

  • Achieving a $0.00 Hardware Deployment Cost by proving that discarded E-waste can run enterprise-grade IoT edge computing.
  • Successfully engineering an AI prompt capable of reliable Monocular Depth Estimation for financial bounding.
  • Building a beautiful, device-aware Unified Dashboard with strict Role-Based Access Control (RBAC).

What we learned

  • Advanced prompt engineering for spatial reasoning and structured JSON output.
  • Managing real-time web-socket streams via Firebase in a Next.js App Router environment.
  • The civil engineering constraints of road repair (e.g., weather-dependent material selection).

What's next for DRISHTI-GRID

  1. OBD2 Telemetry Integration: Connecting the Edge Node directly to the truck's computer to dynamically adjust camera capture rates based on vehicle speed.
  2. Citizen WhatsApp Grid: Launching a crowdsourced pipeline where citizen photos enter an AI Verification Quarantine before hitting the PWD dashboard.
  3. Smart Contracts: Migrating the Verification Ledger to the blockchain for automated, tamper-proof contractor payouts.

Built With

Share this project:

Updates