TRAFFI is a dynamic traffic light control simulation aimed at optimizing traffic flow by reducing car wait times at junctions. The project features a user-friendly interface where users can create and simulate different junctions. The system will intelligently adjust traffic light timings based on real-time conditions to improve efficiency. The backend will control Three.js objects to visualize the junction in 3D.
- React-based GUI: An intuitive front-end interface for junction selection and traffic visualization.
- Graph-based Traffic Control: The system will use graph structures to model junctions and determine optimal traffic light patterns.
- Dynamic Traffic Light Adjustments: Prioritizes emergency vehicles and optimizes green light distribution.
- Real-time Simulation: Cars will be dynamically added and removed during the simulation.
- Three.js Integration: The junction visualization will be implemented using Three.js, controlled by the backend.
- Frontend: React, Three.js
- Backend: Spring Boot
- Two-Way Communication channels: WebSockets
- Node.js & npm (for the frontend)
- JDK & Apache Maven (for the backend)
- Node ^=20.12.0
- npm ^=10.5.0
- JDK ^=21
- Apache Maven ^=3.9.9
cd Backend
mvn spring-boot:runcd Frontend
npm install
npm startcd Frontend
npm start- Frontend
- Create the hero section
- Create navbar
- Adding smooth scroll
- Implement Three.js visualization
- Backend
- JSON parsing
- Car class
- Lane class
- TrafficLight class
- TraffiApplication class
- Junction class
- Edge-cases
- Both
- Create
Start Simulaionlogic - Car's web socket
- traffic light's web socket
- Implement
Pause/Resumelogic - Provide statistics
- Create
Contributions are welcome! Feel free to submit issues or pull requests.
This project is licensed under the MIT License.
UI inspiration - Grok (Before the renovation) & Curser
Private car model - kulonee
Motorcycle model - animanyarty
Police model - Daniel Zhabotinsky
Ambulance model - Jasmin Daniel