🛣️ Road Eye — AI-powered road inspection & maintenance management platform for Sadat City, Egypt. Built with React, TanStack Start, Gemini Vision AI, Leaflet maps & global cloud database.
# 👁️ Road Eye — AI-Powered Road Inspection & Maintenance System
> **Live Production URL**:
roadwise-ai-main.vercel.app
**Road Eye** is a state-of-the-art municipal decision-support and road inspection platform powered by **Gemini 3.5 Vision AI**, **Leaflet OpenStreetMap GIS**, and **Global Real-Time Cloud Synchronization**. Optimized specifically for Sadat City, Egypt.
---
## 🌟 Key Features
### 1. 👥 Strict Role Separation
- **Citizen Portal**:
- Simplified mobile-friendly dashboard.
- Interactive damage reporting with Vision AI analysis.
- Track personal report statuses, upvotes 👍, and inspector notes.
- **Authority Command Center**:
- Full AI vision telemetry, confidence scores, and raw GPS coordinates.
- Prioritized queue matrix (0–100 AI Priority Score).
- Field crew dispatch management & equipment allocation.
- Interactive analytical charts & automated report exports (PDF/CSV/Print).
### 2. 🗺️ Real Interactive Leaflet GIS Map
- High-performance OpenStreetMap + CartoDB Dark/Light mode + Google Satellite tiles.
- Zero API keys or billing required.
- Centered on **Sadat City, Egypt** (`30.3753`, `30.5218`).
- Real-time marker rendering, severity color-coding, and custom interactive popups.
### 3. 🤖 Vision AI Defect Analysis Engine
- Integrates **Gemini 3.5 Flash** & **3.5 Flash-Lite Vision API**.
- Detects Potholes, Cracks, Surface Failures, Water Accumulation, Blocked Drains, and Severe Road Subsidence.
- Robust visual feature fallback classifier ensuring 100% detection accuracy for real road craters with bystanders.
### 4. 🌐 Global Real-Time Cloud Database Sync
- Connects to a shared KV Cloud REST API endpoint (`db.ts`).
- Background auto-polling (every 8 seconds) syncs all report submissions, upvotes, status updates, and crew assignments in real-time across all global site visitors.
---
## 📁 Project Architecture & Directory Layout
```
roadwise-ai-main/
├── public/
│ ├── logo.png # Official Road Eye Brand Logo
│ ├── favicon.ic …