Traffic monitoring and traffic light management are crucial for city planning, effective policy-making, reducing travel times, pollution control, and quality of life. Solutions to this problem must be reliable, cost-efficient, and extremely scalable, to support the mega-cities of the modern world. This work proposes an end-to-end framework and implementation for traffic monitoring and traffic light synchronization and control. The proposed framework supports monitoring the number of traffic vehicles at each traffic signal, emergency vehicle detection and classification, emergency routing and an analytics dashboard to visualize traffic flow. An ML-driven traffic light control algorithm is proposed to synchronize traffic lights and reduce waiting times, especially in scenarios where it may be difficult to model the traffic system mathematically.