Today, smart cities are turning to electric transport, carpooling and zero emission zones. The growing number of electric vehicles on the roads makes it increasingly necessary to have a public charging infrastructure. On the other hand, the main limitations of electric vehicles are the limited range of their batteries and their relatively long charging times. To avoid having problems to recharge, electric vehicle drivers must plan their journeys more thoroughly than others. At the goal of optimizing trip time, drivers need to automate their travel plans based on a smart charging solution, which will require the development of new Vehicle-to-Grid applications that will allow at the charging stations to dynamically interact with the vehicles. In this paper, we propose an architecture based on an algorithm allowing the management of charging plans for electric vehicles traveling on the road to their destination, in order to minimize the duration of the drivers’ journey including waiting and charging times. The decision taken by the algorithm based on the exploration of the data of each public supply station according to its location, number of vehicles in the queue, number of charging sockets, and rates of service.