β οΈ WarningDisclaimer: This example is for demo use only. It's not production-ready and may omit important features.
GreenWave is an intelligent traffic management system that uses Reinforcement Learning to simultaneously optimize traffic flow and reduce environmental pollution. Unlike traditional systems that only focus on minimizing wait times, GreenWave considers real-time air quality data to prevent pollution hotspots near schools, hospitals, and residential areas.
| π¦ Intelligent Control | π± Environmental Awareness |
|---|---|
| Multi-Objective Optimization Balances traffic flow and air quality simultaneously |
Pollution Prevention Protects sensitive areas like schools and hospitals |
| AI-Driven Decision Making Uses Reinforcement Learning (DQN) for adaptive signals |
Real-Time Monitoring Live dashboards with sub-second updates |
| Linked Data Integration Fully NGSI-LD compliant for semantic interoperability |
FIWARE-Based Built on industry-standard IoT platform |
- AI-Driven Traffic Coordination - DQN-based adaptive signal control
- Multi-Objective Optimization - Balance traffic flow & air quality
- Real-Time Decision Making - Sub-second response to traffic changes
- Air Quality Monitoring - PM2.5, CO, NO2 sensors at intersections
- Emission Estimation - Traffic-based pollution prediction
- Pollution Hotspot Prevention - Protect sensitive areas
Admin Dashboard - Comprehensive control panel with AI/manual modes
- Public Air Quality Portal - User-facing environmental metrics
- Historical Analytics - Time-series data visualization
- Real-Time Monitoring - Live dashboards and analytics for instant insights
- Control Panel By Hand/AI - Manual and AI modes for traffic control
- Manage Sensors - Add, remove, and configure sensors
- Manage Subscriptions - Subscribe to real-time data streams
- CI/CD Pipeline - Automated testing & deployment
- OpenAPI Documentation - Comprehensive API specs
- Open Source Compliance - MIT License, Contributing Guidelines
| Requirement | Version | Download |
|---|---|---|
| Docker | 28.3.2+ | Get Docker |
| Node.js | 24.6.0+ | Get Node.js |
| SUMO | 1.25.0+ | Get SUMO |
Note: If you want to run SUMO on your local machine, you need to download and install it from the SUMO website.
Follow these steps to get GreenWave running locally:
# Clone the repository
git clone https://github.com/sonmessia/GreenWave.git
# Navigate to the project directory
cd GreenWave
# Copy the environment variables
cp .env.example .env
# Navigate to the project directory
cd src/backend
# Copy the environment variables
cp .env.example .env# Start all services with Docker Compose
docker compose up -d# By Docker Compose
# Start backend service with Docker Compose
docker compose up -d backend
# Stop backend service with Docker Compose
docker compose down backend
# By Python
cd src/backend # Change directory to backend
# Copy the environment variables
cp .env.example .env
pip install -r requirements.txt # Install dependencies
uvicorn app.main:app --host 0.0.0.0 --port 8000 # Run backend# By Docker Compose
# Start frontend service with Docker Compose
docker compose up -d frontend
# Stop frontend service with Docker Compose
docker compose down frontend
# By Node.js
cd src/frontend # Change directory to frontend
# Copy the environment variables
cp .env.example .env
npm install # Install dependencies
npm run dev # Run frontendOnce services are running, access them at:
| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost:5173 | User & Admin interfaces |
| Backend API | http://localhost:8000 | REST API endpoints |
| Context Broker | http://localhost:1026 | Orion-LD NGSI-LD API |
| Quantum Leap | http://localhost:8668 | Time-series data storage |
Explore detailed tutorials, API references, architecture guides, and more!
We are excited that you are interested in contributing to this project! Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
Read through our contributing guidelines to learn about our submission process, coding rules, and more.
Want to report a bug, contribute some code, or improve the documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.
Help us keep GreenWave open and inclusive. Please read and follow our Code of Conduct.
This project is licensed under the terms of the MIT license.

