Skip to content
nakul28062007Public

About

πŸš‘ Smart ambulance routing system with real-time traffic rerouting using Flutter & Firebase

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš‘ RoadClear – Smart Ambulance Routing System

🧠 Problem

In urban traffic, ambulances often get delayed because surrounding vehicles are unaware of their route or unable to react in time.

This lack of coordination can lead to critical delays in emergency response.


πŸ’‘ Solution

RoadClear is a real-time traffic coordination system that allows ambulances to broadcast their route and notify nearby vehicles.

Cars receiving this signal automatically adjust their route to clear the path, enabling faster emergency response.


βš™οΈ Features

  • πŸš‘ Ambulance Mode

    • Select and broadcast route
    • Trigger emergency mode in real-time
  • πŸš— Car Mode

    • Receives emergency alerts
    • Dynamically reroutes to avoid ambulance path
  • πŸ“ Google Maps Integration

    • Route visualization
    • Live polyline rendering
  • πŸ”„ Realtime Sync (Firebase)

    • Instant communication between devices
    • Event-based triggering system
  • ⚑ Emergency Toggle System

    • Switch between normal and emergency states
    • Immediate UI and route updates

πŸ›  Tech Stack

  • Flutter – Cross-platform mobile development
  • Firebase Realtime Database – Live data synchronization
  • Google Maps API – Routing and map visualization

πŸš€ How It Works

  1. Ambulance selects a source and destination

  2. Route is generated and stored in Firebase

  3. Cars connect to the same session

  4. When emergency is triggered:

    • Cars receive signal
    • Cars reroute dynamically to avoid ambulance path

πŸ“Έ Demo

🏠 Home Screen

![Home](assets/screenshots/start page UI.png)

πŸ” Location Search

![Search](assets/screenshots/searching location.png)

πŸš‘ Before Emergency

![Before](assets/screenshots/before emergency.jpeg)

🚨 After Emergency

![After](assets/screenshots/after emergency.jpeg)


⚠️ Known Limitations

  • Current rerouting logic uses a simple detour approach.
  • In some scenarios, Google Maps may return the same optimal route instead of an alternative path.
  • Does not yet use live traffic density or predictive rerouting.

πŸ” Setup Instructions

  1. Clone the repository:
git clone https://github.com/YOUR_USERNAME/roadclear.git
cd roadclear
  1. Install dependencies:
flutter pub get
  1. Run the app with your API key:
flutter run --dart-define=GOOGLE_API_KEY=YOUR_API_KEY

πŸ§ͺ Future Improvements

  • 🧠 Intelligent rerouting using traffic data
  • πŸ“‘ Vehicle-to-vehicle communication (V2V simulation)
  • πŸ”” Push notifications for nearby drivers
  • πŸ“Š AI-based congestion prediction

πŸ“Œ Note

  • Google API keys are not included for security reasons
  • Firebase configuration required for full functionality

πŸ‘¨β€πŸ’» Author

Developed as a hackathon project to explore real-time traffic optimization and emergency response systems.


⭐ If you like this project

Give it a star ⭐ and feel free to contribute!

About

πŸš‘ Smart ambulance routing system with real-time traffic rerouting using Flutter & Firebase

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages