From 9b19cf81cc44ccefa6563524f423a4a1a740c6cb Mon Sep 17 00:00:00 2001 From: ap6458 Date: Mon, 16 Feb 2026 18:30:26 +0530 Subject: [PATCH] Added Predictra submission --- submissions/Predictra_Optiroute.md | 232 +++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 submissions/Predictra_Optiroute.md diff --git a/submissions/Predictra_Optiroute.md b/submissions/Predictra_Optiroute.md new file mode 100644 index 0000000..bcb839f --- /dev/null +++ b/submissions/Predictra_Optiroute.md @@ -0,0 +1,232 @@ + +

+ + CoC Inheritance 2025 + +
+ Optiroute: Flood risk route planner +

+ +
+By Predictra +
+
+ +
+Table of Contents + +- [Description](#description) +- [Links](#links) +- [Tech Stack](#tech-stack) +- [Progress](#progress) +- [Future Scope](#future-scope) +- [Applications](#applications) +- [Project Setup](#project-setup) +- [Team Members](#team-members) +- [Mentors](#mentors) + +
+ +## ๐Ÿ“ Description +A smart web-based flood-aware route planning system that calculates **real-world road routes** and integrates **flood risk scoring** to help users choose the safest path during heavy rainfall or waterlogging conditions. + +Built using **Next.js, Leaflet (OpenStreetMap), Mapbox APIs, and MongoDB**. + + +## ๐Ÿ”— Links + +- [GitHub Repository](https://github.com/ap6458/flood-risk-score-routing-map.git) +- [Demo Video](https://drive.google.com/file/d/1S0w_d-i7nakl6yh5uKN_lwVs9lK6WESI/view?usp=drivesdk) +- [Project Screenshots/Drive](https://drive.google.com/drive/folders/1fnPG_TP159gvcEsdqOLZJNo-JOjYWISr) +- [Hosted Website](https://flood-risk-score-routing-map.vercel.app/) + +## ๐Ÿค– Tech-Stack +- Next.js 16 +- React +- Leaflet.js +- OpenStreetMap Tiles +- TypeScript +- Next.js API Routes +- MongoDB +- Mapbox Directions API +- Mapbox Geocoding API +- Scikit Learn + +### ๐Ÿ—๏ธ System Architecture + +```mermaid +graph LR + User inputs source and destination --> Mapbox Geocoding API at backend fetches the coordinates + Coordinates --> Mapbox Directions API is called which displays alternate routes on the website + Mapbox Routing--> Risk score is calculated based on which safest route is shown + User can add flood reports either using their location or manually entering location --> Flood reports are saved in mongodb database at the backend + User Report --> The risk score gets updated and safest route is shown + + +``` + +### Front-end +- Next.js 16 +- React +- Leaflet.js +- OpenStreetMap Tiles +- TypeScript + +### Back-end +- Next.js API Routes +- MongoDB + +### External APIs +- Mapbox Directions API +- Mapbox Geocoding API + + +## ๐Ÿ“ˆ Progress + +### Fully Implemented Features + +* **Flood Risk Scoring Algorithm**: Each route is evaluated using: +Distance from known waterlogging points +Severity weighting (Low / Moderate / High) +Distance-based risk multiplier +Proximity to live user-reported flood points +Output: +Each route gets a numerical risk score +Routes are sorted from lowest to highest risk +Safest route is highlighted in the sidebar +* **Location & Autocomplete**: Mapbox Geocoding API integration +Autocomplete search suggestions +Restricted to Mumbai region +Manual coordinate input supported +Voice Input supported +โ€œUse My Locationโ€ feature +Dark Mode Toggle Feature +* **Multi-Mode Route Planning**: Driving ๐Ÿš— +Walking ๐Ÿšถ +Cycling ๐Ÿšด +Real ETA calculation +Distance calculation (km) +Multiple route alternatives +Automatic safest route prioritization +Routes are fetched using Mapbox API and rendered on Leaflet (OpenStreetMap). + +--- + +### Partially Implemented Features / Work in Progress + +* **Real-Time Rainfall Data Integration**: Enhance route risk scoring using: +Real-time rainfall intensity +Short-term rainfall prediction +Zone-wise rain severity mapping +Planned Implementation +Integrate OpenWeather / IMD API +Map rainfall intensity to flood probability +Dynamically increase risk score during heavy rainfall +Display rainfall overlay layer on map + +## ๐Ÿ”ฎ Future Scope + +* User authentication system +* Save favorite routes +* Mobile optimized UI +* Can be upgraded for the whole country if dataset of flood points is obtained +## ๐Ÿ’ธ Applications + +1. **Urban Disaster Management Systems** - Where It Applies +Municipal corporations +Smart City projects +Disaster management authorities +Traffic control departments +How It Helps +Identifies high-risk flooded road segments +Suggests safer alternative routes in real time +Supports emergency vehicle routing during heavy rainfall +Assists in flood-prone zone monitoring +2. **Public Transportation & Logistics Optimization** - Where It Applies +Cab aggregators (e.g., ride-sharing services) +Delivery & logistics companies +Bus and public transport systems +Fleet management systems +How It Helps +Avoids waterlogged routes +Minimizes vehicle damage due to flooding +Improves on-time delivery rates +Reduces fuel consumption from rerouting +## ๐Ÿ›  Project Setup + +1. Clone the GitHub repo. + +```bash +git clone https://github.com/ap6458/flood-risk-score-routing-map.git +``` + +2. Enter the project directory and install dependencies. + +```bash +cd flood-risk-score-routing-map + +``` +3. Configure Environment Variables + +Create a file named: + +``` +.env.local +``` + +Add the following: + +```env +NEXT_PUBLIC_MAPBOX_TOKEN=YOUR_MAPBOX_TOKEN +MONGODB_URI=mongodb+srv://flooduser:flood12345@cluster0.5i4banq.mongodb.net/?appName=Cluster0 + +``` + +Where to get: +*Mapbox Token* +1. Go to https://account.mapbox.com +2. Create a Public Token +3. Ensure Directions API & Geocoding API are enabled + + +- Example Local format for mongodb uri: + +``` +mongodb://127.0.0.1:27017/floodDB +``` + +--- +Install node.js + +```bash +npm install +``` +4. Run Development Server + +```bash + +npm run dev +``` + +Open in browser: + +``` +http://localhost:3000 +``` +## Website Hosted on Vercel +https://flood-risk-score-routing-map.vercel.app/ + + + + + +## ๐Ÿ‘จโ€๐Ÿ’ป Team Members + +* **Aryan Parab**: [https://github.com/ap6458] +* **Arya Shirke**: [https://github.com/AryaShirke16] +* **Rayon Biswas**: [https://github.com/RayonBiswas] +* **Nihar Shah** +## ๐Ÿ‘จโ€๐Ÿซ Mentors + +* **Soham Rane**:[https://www.linkedin.com/in/sohamrane301] +* **Harshal Kamble**: [https://www.linkedin.com/in/harshal-ishere] \ No newline at end of file