A rapid growth in the population and economic growth has resulted in an increasing number of vehicles on road every year. Traffic congestion is a big problem in every metropolitan city. To reach their destination faster and to avoid traffic, some people are violating traffic rules and regulations. Violation of traffic rules puts everyone in danger. Maintaining traffic rules manually has become difficult over the time due to the rapid increase in the population. This alarming situation has be taken care of at the earliest. To overcome this, we need a real-time violation detection system to help maintain the traffic rules. The approach is to detect traffic violations in real-time using edge computing, which reduces the time to detect. Different machine learning models and algorithms were applied to detect traffic violations like traveling without a helmet, line crossing, parking violation detection, violating the one-way rule etc. The model implemented gave an accuracy of around 85%, due to memory constraints of the edge device in this case NVIDIA Jetson Nano, as the fps is quite low.