Lean manufacturing is one of the most popular improvement agents in the pursuit of perfection. However, in today's complex and dynamic manufacturing environments, lean tools are facing an inevitable death. Industry 4.0 can be integrated with lean tools to avoid their end. Therefore, the primary purpose of this paper is to introduce an Industry 4.0-based lean framework called dynamic value stream mapping (DVSM) to digitalize lean manufacturing through the integration of lean tools and Industry 4.0 technologies. DVSM with its powerful features is proposed to be the smart IT platform that can sustain lean tools and keep them alive and effective. This paper specifically tackles the scheduling and dispatching in today's lean manufacturing environments, where the aim of this research is developing a smart lean-based production scheduling and dispatching model to achieve the lean target through optimizing the flow along the VSM and minimizing the manufacturing lead time. The developed model, called the real-time scheduling and dispatching module (RT-SDM), runs on DVSM. The RT-SDM is represented through a mathematical model using mixed integer programming. Part of the testing and verification process, a simplified IT-based software, has been developed and applied on a smart factory lab.Typically, the scheduling level in lean manufacturing uses simple tool called a heijunka-board (i.e., load-leveling box) at the pacemaker workstation to enhance the pull system. Here, "kanban" acts as the nervous system of the pull system through directing materials just-in-time to workstations. Accordingly, continuous flow, i.e., "one-piece flow", as well as the "takt-time", which is used to synchronize the pace of production with the pace of demand, will be achieved. This works well in cases of high-volume and low-mix working environment. However, these lean tools are inefficient in today's highly dynamic and customized manufacturing environment with uncertainty in demand and materials supply, unpredictable material flow, high variety of products that move through different routes and sequences of workstations, different priorities, process times, due dates, etc. Moreover, in a dynamic system, kanban is unable to determine the right time for dispatching and assigning a job into the machines based on changes in production constraints, like customer importance, due date, quantity, sequence of the job, the resource availability, and current workload on the PSF [6]. Therefore, the Dispatching Rules (DRs) play an important role to meet the scheduling level. The importance of DRs lies in decreasing variability, reducing waiting times, increasing utilization of resources, and improving the production smoothness [7]. In the literature, many dispatching priority or sequencing rules, such as first come, first served (FCFS), Shortest Processing Time (SPT), and Earliest Due Date (EDD), have been proposed and investigated [8][9][10][11]. For example, FCFS selects the jobs arriving at a workstation first, which means the first job will be processed fi...