A novel JavaScript MEAN stack approach for real-time nonconformity management in SMEs within Industry 4.0 and Quality 4.0 concepts

Nonconformity detection and reporting are evergoing issues in quality management practice and theory. Throughout industrialisation, and consequently, in the Industry 4.0 period, manufacturing organisations strived to reduce nonconformities to the minimum level and reach zero-defect production. Nowadays, it is feasible to overcome this issue by incorporating adequate information and communication technologies and edge devices for nonconformity reporting, and nonconformity classication. These assumptions were a starting point for the research presented in this paper. This paper aims to propose a software solution for nonconformity detection and preventive and corrective actions denition that expands the utilisation of edge devices in compliance with Industry 4.0 and Quality 4.0 paradigms. Presented software solution design is based on JavaScript programming language and its ability to be implemented in all software solution's tiers through interconnected frameworks (MongoDB, Express.js, Angular, and Node.js) in a MEAN stack. The developed solution is implemented in three small and medium enterprises. Initial results show several benets in increasing nonconformity detection and reporting, increasing employee participation in preventive and corrective actions denition and improved quality management system. The number of corrective and preventive actions was taken based on the assistance of the prediction module. All nonconformities were related to specic sections of ISO 9001:2015 standards so that quality managers and managers in the companies could have insight into the sources of the issues and the foundation for dening different managerial actions. When comparing the newly developed solution and other affordable solutions, it was determined that the new solution has a higher operating velocity if there is a signicant increase in the volume of queries towards databases. The paper's main contribution reects in the software solution's presentation intended for affordable identication and nonconformities massive workload reporting, integrated with other software modules for quality analysis, prediction, and problem-solving. In this way, it is possible to obtain horizontal scalability and richness of the proposed software solution for smart enterprises focused on World Class manufacturing and lean manufacturing. Furthermore, it is possible to achieve a shorter time for nonconformities elimination and better compliance with the ISO 9001: 2015 standard. The presented solution usage contributes to all participants involved in the organisation of production and production itself, through (1) involvement of all employees; (2) digitalisation and improvement of existing nonconformity reporting systems; (3) improvement of nonconformity perception; (4) improved awareness and evaluation of employer's contribution to nonconformity management; (5) making the technology easy to use. The research's novelty lies in presented solution utilisation for real-time nonconformity classication and proactive and corrective measures proposals through communication and prediction modules.


Introduction
The primary objectives of all modern manufacturing organisations (MOs), that want to remain competitive, are achieving higher quality and meeting customer demands. These objectives may be achieved if the organisational processes and products are continually monitored, controlled and improved, i.e. if the quality management (QM) is performed. However, although QM initiatives are implemented and applied, quality requirements derived from the turbulent market have created challenging issues to be overcome by applying only classical QM measures (Jia et al. 2017). These challenging issues include, above all, a lack of production time, raw materials, and adequate human resources (Ivanov 2016), and, as such, may produce nonconformity (NC) events. In such circumstances, nonconformity management (NCM) and continuous improvements represent important tasks of QM in MOs. While facing possible NCs, MOs can acquire and use information and communication technologies (ICT) that facilitate information and enable the implementation of effective proactive and corrective QM measures. Therefore, the minimised overall costs and increased information ow within manufacturing processes form the smart manufacturing concept foundations. Accordingly, smart MO concept and smart QM could be achieved with the ubiquitous Industry 4.0 (I4.0) and Quality 4.0 (Q4.0) era that involve the use of technologies such as: intelligent detection, Internet of Things (IoT), cloud computing environment, and a large amount of data analytics providing an insight into the data related organisation processes and products (Müller et al. 2018; Moeuf et al. 2018).
This paper primarily intends to demonstrate that technologies from the I4.0 toolset could be implemented in QM and NCM, making an essential step towards I4.0 and Q4.0 convergence. To achieve this goal, authors have developed and implemented an innovative software solution with several advantages affordable for Small and Medium Enterprises (SMEs). Developed software application for mobile devices will enable all employees to report and manage NCs using the steps and directives from ISO 9001:2015 (detection, reporting, decision-making, and the de nition of preventive and corrective actions). The main contribution re ects in the presented software solution for affordable identi cation and massive workload NC reporting, integrated with other software modules for quality analysis and prediction. In this way, it is possible to obtain horizontal scalability and richness of the proposed software solution for smart enterprises focused on World Class Manufacturing and Lean manufacturing. The presented solution usage contributes to all participants involved in the organisation of production and production itself, through (1) involvement of all employees; (2) digitalisation and improvement of existing nonconformity reporting systems; (3) improvement of nonconformity perception; (4) improved awareness and evaluation of employer's contribution to nonconformity management; (5) making the technology easy to use inexpensive and suitable for a wider industry audience.
In the following sections of the paper, the authors have presented the concept of NCM in I4. 0  to respond to stakeholders' expectations while maintaining a competitive advantage. According to Trappey et al. (2017), I4.0 represents a necessity to maintain competitiveness in an uncertain industrial environment. The I4.0 industry's goal is to promote the production model that is exible in terms of products and services that are produced and integrated with real-time communications between all the related parties and facilities when performing manufacturing processes (Zhou et al. 2015).
To become agile, manufacturers have to distribute intelligence and decision-making processes. For this purpose, it is necessary to incorporate Internet-based e-manufacturing for information/data management and quality assurance since e-Manufacturing enables a higher level of automation of manufacturing business information than a physical one used before (Cheng et al. 2008). In this way, work in MO is being changed since it can be characterised as: digitalised -all manufacturing information are digitalised, stored and accessed through Internet; globalised -global access to information, regardless of the physical location; mobile -enables accessing information from any place; collaborative -through data sharing companies may crate joint development teams with members from different geographic areas; and immediate-by approaching internet-based platforms it is possible to have latest manufacturing-related information. Based on these assumptions, the system "e-ProMan" has been presented (Katchasuwanmanee et al. 2016). This predictive system acquires real-time data from both inside and outside the SME environment to analyse the correlation between work ow (obtained through process and production schedule data), data ow (acquired using temperature sensors), and energy ow (gettered with power logger equipment) to provide accurate real-time decision-making. Tuertmann (2016) stated that the increasing volume of the information being collected and the datadriven design led to the inevitable situation of intelligent organisation management. Furthermore, Wee et al. (2015) claimed that the following four technological clusters drove I4.0: 1) connectivity and computational power, 2) arti cial intelligence and analytics, 3) interaction between human and machines, and 4) conversion from digital to a physical world. As observed by Geissbauer  According to Kim et al. (2016), modern industries and intelligent manufacturing require speci c I4.0 technologies in the context of IoT to maximise the quality of information collected and to meet the needments for decision formulation in real-time. Industrial IoT (IIoT) features, including sensors,  middleware and storage systems, networking technologies, software, and applications, are combined to  develop solutions that can gain insight and improve the capability to monitor and control enterprise processes and assets (Lampropoulos et al. 2018). Observing IIoT services and applications, it can be stated that they represent vital applications for more effective planning and controlling of manufacturing processes and systems (Gilchrist 2016). Furthermore, through the various interconnected edge devices that can interact and communicate, IIoT may decentralise decision-making and analytics, leading to realtime responses and reactions (Mocnej et al. 2021). Thus, the general availability, monitoring and control of MO processes are enhanced (Gilchrist 2016).
In the I4.0, the quality concept has been broadened, and it includes personalised service quality and personalised production. In I4.0, product quality goes along with design, safety, and service quality (Bonilla et al. 2018). Quality goals have evolved along with the phases of revolution in industrialisation. According to the literature sources (Foidl and Felderer 2015), crucial preconditions for sustainable economic success in modern manufacturing companies are focus on a QC, QM and QMS, respectively. Through smart factory, cyber-physical system (CPS), IoT and cloud computing, there is a promising opportunity for any company to adopt Q4.0 and to produce high-quality products and to remain competitive and satisfy the permanently growing customer demands. Therefore, quality goals may progress in line with QC, quality assurance and QM. For instance, IIoT technologies can provide improved connectivity systems, services, and physical objects, allowing object-to-object communication and data distribution. Thus, in various industrial applications, QC, quality assurance and QM can be achieved by IIoT, since one of the cornerstones of the IIoT is the automatic identi cation technology (Farooq et al. 2015). With an intensive advance toward IIoT technologies, data is becoming more available and ubiquitous, culminating with the big data analytics environment (Manyika et al. 2011). In such an environment, datasets are of a much larger volume and maybe too convoluting for standard statistical tools and methods (Ramasamy and Chowdhury 2020). Having this in mind, for MOs with a myriad of operational and shop-oor data application of modern analytics techniques are crucial for uncovering hidden patterns, undiscovered data interrelationships, market trends, customer requirements, and other favourable business information (Barton and Court, 2012).
Additionally, a CPS, as a mechanism by which physical assets and applications are closely related, enables different segments to collaborate in countless courses to transfer information, apply services such as computational capacities and control algorithms (Gunes et al. 2014). An appropriate solution for storing big data may be found in cloud computing, since the horizontal scalability of cloud computing makes it convenient for MOs, as it grants organisations to commence with minor memory volumes and purchase more resources, merely if there are further higher memory demands (Zhang et al. 2010). Finally, through ICT, consolidated and integrated telecommunications are highlighted, with the profound ability to transmit, store, and manipulate data or information (Hashim 2015). ICT focuses on the information transferring through electronic media like wireless or wired communication standards, representing a crucial component in intelligent manufacturing, in production and decision-making processes that heavily rely on the data (Bloom et al. 2014). With innovative connectivity technology, smart computing, and AI, QC and assurance are maximised, while standards and stakeholder requirements are easily met (Schmitt et al. 2020).
Alignment of the QC and QM with the concept of Q4.0 and I4.0 enables enterprise e ciency, performance, innovation and business model enhancement. The QC and QM digitalisation and the in uence of that digitalisation on processes, technology, and people represent the main direction towards harmonisation with the I4.0 concept. By gathering and processing quality information, innovative production facilitates computerised audit and context perception with a consequent performance increase. Production and QM may use this novel accumulated data and subsequent information for advanced decision-making and process assessment (Putnik et al. 2015), especially since modern QM attempts to establish high performance with maximum e ciency of all organisation processes (Singh et al. 2012). Therefore, I4.0 provides favourable circumstance for the QM eld.
With the expansion of current information technology (IT), organisations may gain straightforward data access and improve the potential for knowledge extraction, increasing the in uence of I4. implementation ensuring Q4.0 in production processes. Current technologies introduce several software tools available for QM, speci cally for quality inspection and reporting. However, according to the literature, authors argue that these solutions may not be adequate, since they use various devices that may decrease compatibility and performance, and increases system complexity, while raising the question of organisation sensitive information privacy and security (Stergiou et al. 2018). Looking at these solutions from SMEs' angle, they encounter additional implementation costs for the features exceeding their capabilities and requirements (Huang et al. 2013). Since SMEs are mostly limited with de ned requirements and smaller budgets, compared to the larger organisations that incorporated complex software systems and solutions, the authors of this paper aimed to explore the feasibility of solution that used smartphones and cloud technology to extend reporting of potential NCs within QM. A further assumption is that SME requires simple, prompt and an inexpensive solution (Ren et al. 2015).
The graphical illustration of the proposed Q4.0 approach is speci ed in Fig. 1. The overall objective is to support company efforts to enhance its business processes, technology utilisation, and employee operability through the NCs and overall management process's digitalisation.
The core concept of Q4.0 encompasses eleven axis (components) according to Jacob (2017), including: (1) big data with characteristic of volume, variety, velocity, veracity and transparency; (2) analytics framework that provides descriptive, diagnostic, predictive and prescriptive analysis; (3) connectivity that may enable near real-time feedback from linked edge-devices, people and processes; (4) collaboration through digital messages, description of the activity ows (visual), and social (social) media; (5) app development including mobile applications, platforms, virtual reality, augmented reality, web-client, browser and applications for robot (measurement and manipulation) and machines (CNC, DNC, sensors, etc.); (6) horizontal scalability represents the ability to support a growing and large volume of data, users, devices and analytics globally; (7) management systems that monitor autonomous and connected processes; (8) compliance that among other things includes electronic submission of the compliance/NC reports and automation of ows in the compliance area; (9) quality culture representing among functionally strong cooperation, credibility, and shared responsibility; (10) leadership expressed through quality performances, process ownership, and goal scheduling; and (11) competency considering employees training as one of the most crucial elds for business progress. Therefore, through Q4.0, critical new technologies are affordable and accessible to the broader circle of business organisations, with the provided opportunity to solve long-standing quality challenges and adopt new solutions.
Following these suggested axes, it is clear that the primary objective of this paper is a representation of the mobile solution for NCM that is based on a collection of big data, management support, improved communication between employees, and improvement of quality culture as essential toolset elements in the Q4.0 concept. This paper focuses on NCM, intending to decrease the number of products and processes of NCs and effectively implement proactive and corrective measures adequate for product and process quality improvement. Ideally, NC and waste should be eliminated, whereby Zero-defect production should be achieved. Meaning, it is necessary to implement QC in real-time, enabling NC detection in an early process stage and reducing production waste (Djekic et al. 2011). In general, these requirements could be derived from a standard, a speci cation, a customer or a stakeholder.

Nonconformity management
Therefore, the detection and reporting of NC could happen during the audit, inspection, documentation review, product testing, customer complaints, stakeholders feedback, and general observation based on experience (Luca 2015). In addition to the above, NCs can take many forms and types, which may vary depending on the industry type, so that common NCs include: failure to identify issues, failure to de ne processes, plans, and schedules adequately, process deviations and product defects, deviations from a speci cation of product characteristic, missed plan, customer and supplier return. Taking into consideration the facts stated, NC data are scattered throughout different organisation systems in heterogeneous formats. Speci c ICT solutions with scalable capabilities could be applied to overcome data formating diversity and heterogeneity, creating a real-time informed decision-making environment for NCM through the creation of homogeneous digital NC reports.
NC reporting may present a challenge, including speci c details and requirements against the NC, NC description, and it may identify production process weak points that are presumed to have led to the NC (Donauer et al. 2015), enabling process owner to con rm the NC. It may present an initial point for the implementation and step towards I4.0 and Q4.0 concept convergence.

Initial presumptions and goals for the current research
The initial presumptions, based on which the research was conducted, are that a su cient information ow is highly emphasised for the continuous operating of the advanced manufacturing processes and that, however, unpredicted situations and quality issues have to be often resolved by utilising imprecise and incomplete information. Therefore, it is crucial to perform frequent comprehensive and reliable quality inspections to conduct and deliver defect-free and high-quality processes and products and be competitive. Information from organisation processes is becoming transparent, precise, and complete with quality improvement programs like Six Sigma and Kaizen, encouraging data collection to address quality issues and NCs, and advanced I4.0 automation and computing systems. Although traditional data analytic techniques and tools have been widely and successfully used for quality inspection, new I4.0 techniques may be applied to mine massive data sets gathered through automated industry architecture. Furthermore, since NCs issues may involve multiple inputs and outputs that are di cult to detect, knowledge discovery in databases (KDD) is needed to perform pattern recognition and inform quality practitioners.
Following the presumptions mentioned above and demands of Q4.0, including NCs reporting, this research's primary intention is to adopt technologies from the I4.0 toolset (such as cloud computing, arti cial intelligence, mobile platforms, advanced information technologies) to demonstrate road to possible transition of quality to Q4.0 model. In this research, the authors will be focused on QM and NCM as an essential element of the quality approach. This paper's authors demonstrated that affordable openbased solutions developed on open source technologies could improve the NCM and basic principles of QM. The authors presume that the development of affordable cloud solutions based on MEAN stack may be used for real-time NCM to improve basic principles of QMS such as engagement of people, improvement, and evidence-based decision-making.
NCM comprehends different tools for quality assurance and inspection, which can be enforced in any organisation. There are very few literature sources that are focused on methods for the identi cation and reporting of NCs. Nevertheless, within the organisations, a signi cant amount of different problems may occur. One of the possible problems arising is how to identify and report the NCs within the organisation. Even though organisations are faced with different NCs, identi cation and reporting methods are still not perfect. According to the literature, there are two possible approaches to identify NCs. In the rst one, NCs detection is performed by the organisation employees, while in the second one, detection is performed by an external expert (Oakland 2005). According to contemporary literature, all other proposed methods are based on these two approaches. Both of these approaches aimed to reduce the number of NCs and prevent NCs occurrence. The authors of this research paper indicate that the presented solution may be applied to both approaches. Maréchaux (2006) has developed an approach based on event-driven architecture. This approach has been utilised to allow registration, revision and e cient handling of events with NC occurrence. The presumption is that the solution presented in this paper may be utilised for reporting, revision and realtime decision making.
Many modern manufacturing systems are equipped with adequate buffers so that the deadlocks in scheduling and production are reduced to a minimum. However, conditions that will produce a deadlock may occur in some emerging manufacturing industrial departments that are frequently supplied with an inadequate number of buffers and are even without buffers (Taiping et al. 2014). In these cases, reducing and avoiding deadlocks becomes a signi cant issue. The solution presented in this paper can be used to implement deadlock detection/recovery and avoid strategies for solving deadlock issue since it enables the necessary integration of software components such as statistical modules, communication modules and databases via web service technologies (Xu et al. 2016). Detection/recovery strategy utilises statistical and communication modules to identify deadlock event and ensure a mechanism to release the resources in the case of deadlock event.
Additionally, in the production scheduling strategy for detection/recovery of deadlocks with uncertain resources, reactive locally constituted real-time decisions are necessary (Lu et al. 2017), which can be achieved by applying the mentioned modules. Donauer et al. (2015) adapted and used KDD as a quality tool with the integrated Her ndahl-Hirschman Index as the core element. In the same paper, the results are presented in matrix-based patterns, which can be applied to recognise preventive/corrective measures patterns. The presumption is that NC application, proposed in this paper, may provide a recurrent neural network (RNN) module for pattern recognition and statistical tools such as Histograms, Pareto diagrams and Scatter diagrams.
Whether it is the production process, for which most QC solutions are designed, or the assembly process performed with parts procured from suppliers, the nal product often does not meet customer speci cations. Software solutions for NCs identi cation are mainly based on visual detection of NCs like machine vision proposed by Karathanassi et al. (1996), industrial photogrammetry (Bösemann 2005), and industrial computer vision (Villalba-Diez et al. 2019). Even today, most companies use experienced engineers to identify faults in products visually. QC based solutions are presented in Table 1.
As point out in Table 1, the general goals for the solution presented in this paper differ from other solutions in few categories: (1) to be equipped with barcode readers for ease of use if barcodes are implemented in the production process; (2) to be affordable and suitable for the automotive industry SME suppliers; (3) to be equipped with statistical and RNN modules and in compliance with most of the analytic modules.
In compliance with data stated in Závadská and Závadský (2018), related to the methods and techniques of I4.0 currently in use, the following Table 2 is de ned for all those techniques used to manage NC.
Following the data obtained from Table 2, the authors have decided to use smartphones/tablets and barcode. Since these technologies are increasingly empowered, allowing a simple transition from the presentation to the business logic development, the following section will outline their bene ts to create the proposed NCM solution.

Architecture And Characteristics Of Developed Solution For
Nonconformity Management 3.1 General software components design, their relationships and available technologies for Q4.0 consolidation The general software components design and their relationships are, in most cases, implemented in three tiers, i.e. presentation, application and database tier. The presentation tier implies user interface at the applications' top-most level, with the primary purpose to handle clients' requests and to present adequate and understandable results. Development trends primarily include applying JavaScript technologies, JavaScript frameworks, or alternative frameworks based on PHP, Java, and Ruby programming languages when implementing the Web browsers' presentation tier. In such circumstances, communication with other tiers is performed through API calls. The application tier is hosted on in-house servers or a distributed server in the cloud, depending on the overall software solution's processing power requirements. In the contemporary industry environment, cloud computing can play a premier role in the transformation process since it is a type of outsourcing technology that combines many scalable, normally personalised computing servers and inexpensive infrastructure (Wang et al. 2016). The data access tier provides entry to data located within the practical solution boundaries or data available through remote cloud service providers (Núñez et al. 2020).
Additionally, it is possible to easily change data storage technology, i.e. different database management systems, moving from one to the other, without signi cant in uence on business logic. Dividing components with adaptable relationships into tiers yields a few advantages, including: overall modularity, making it easier to manage and maintain separated components, then to tackle the entire architecture; mutual independency between technologies and technology stacks used to incorporate various tiers; and separate back-end tier allowing to deploy different databases (Luís Pereira and Costa 2019), with the possibility to scale up, extend by adding multiple web servers, depending on the SMEs future growth, and, therefore, produce decentralised applications. With the stated facts in mind, it can be observed that a signi cant number of technologies in different layers can be used to implement the software solution.

Incorporated application and introduction of advantages for Q4.0 and NCM
In this section, the objective is to elaborate the general solution description introduced in Fig. 1 in order to comprehend the SMEs needs and to highlight the current trends of I4.0 (including centralised data platforms, a sense of urgent achievement of continuous improvements, and real-time communication channels), which are in uencing Q4.0 among other concepts.
Based on the stated presumptions and intentions, the requirements for an NC reporting software solution are as follows: the solution has to be able to report stand-alone NC and to assign NC to a speci c employee to be managed and resolved; to record one or more preventive/corrective actions and to associate them with reported NCs; to allocate responsibilities for the implementation of the preventive/corrective actions; to investigate noti cations, with reminders, to determine correlations between process performances and NCs, within speci c periods, utilising statistical analysis methods; to use data storage and further subsequent use to form the necessary knowledge in KDD for the future decision-making processes. Accordingly, the software solution contains the following modules: statistical and communication modules, the module for possible product barcode detection, the module for initial NC reporting, the module for pattern recognition, the module for statistical analysis graphical presentation.
Having in mind that each enterprise has its procedures on dealing with NCs, it is possible to list general activities the software needs to provide: (1) De nition, containing a description of requirements that are not met according to demands speci ed by stakeholders, de ned or unde ned needs, needs of the organisation itself, customers expectation. (2) Identi cation of the product, with the barcode initial product details detection. Identifying the product is usually the rst step in quality-related issues, especially in complex and dynamic processes with multi-factorial and non-linear interactions. Based on the solution stack's virtualisation and management, cloud computing solutions can be divided into three different levels, including infrastructure, platform or Software as a Service (SaaS). This software's main idea is to be used as SaaS, starting from the ground requirements to be distributable, general, adaptable, modular, and consequently scalable, the increasing number of users will not represent any problem. Therefore, Fig. 2  the MongoDB was adopted to de ne the cloud database. Consequently, technology selection can be considered as an essential aspect, as it affects the cost, performance and possible functionalities of the NCM reporting solution and the overall Q4.0.
If multiple companies apply the solution, collected and integrated data could be used for pattern recognition. In this case, they will be able to learn from each other and have patterns for recognition of NCs and the selection of possible management initiatives.
The proposed method has clear advantages because it utilises a new approach in application development to ful l the principles of QMS. This approach with availability and personalisation increases employees' participation and involvement and provides a broader base for NCM and evidence-based decision making.
The presentation tier is deployed through JavaScript/TypeScript [1] open-source Angular framework.
Increased use of Angular framework is derived from the fact that it supports Progressive Web Applications' concept. This concept indicates that an introduced application is: instantly loaded, independent from the network slow or unstable connection, responsive, and, among other things, with features, such as Web Bluetooth [2] API, that makes the application to be more native-like. Node.js represents an asynchronous open-source JavaScript run-time environment carried over Google Chrome's JavaScript engine V8 [3], to create scalable applications independent from the browser. Besides the V8 engine, Node.js contains an abstraction layer libuv [4] library to handle asynchronous events. Node.js uni es application development merely around JavaScript programming language [5]. The NC reporting data are sent from the presentation layer to the business layer in a lightweight data-interchangeably JavaScript Object Notation (JSON) format. This format is language-independent, and it has been tted for data sharing among interconnected clients. As compact and straightforward, JSON is e ciently generated and parsed by machines and easily read by humans. Based on the mentioned advantages, JSON turned out to be a tting solution for cloud NoSQL database within this study.
Additionally, the strategy of mitigating deadlock may be conducted dynamically by utilising communication modules and MongoDB NoSQL database to acquire up-to-date work ow information and control the allocation of resources. MongoDB databases belong to the NoSQL databases class, unlike SQL relational databases, where columns are eliminated, and rows are documents used to store information about the data and the data itself. Since the data are stored in a BSON format that presents a binary JSON document, MongoDB proved to be a reasonable solution for JavaScript-centric application development. This module adds an entire tier of features on top of MongoDB that enables de nition and maintenance of data structure and data models and their utilisation so that direct interaction from application code to the database is performed.
To sum up, direct communication with the MongoDB database can only be done through the Mongoose module, which further communicates with the Express and Node.js. In turn, Angular can not communicate to mongoose; it only communicates directly with Express. MongoDB enables parallel data displaying but does not allow parallel data entering nor simultaneous parallel data displaying/entering. The authors of this paper avoided a possible deadlock by de ning a maximum number of data entry attempts and automatically discharging each operating lock with the request termination, in that manner allowing a process to be sophisticatedly terminated. In contrast, the other process completed its task. Furthermore, MongoDB provides some convenient metric parameters obtained through the db.serverStatus() command to determine the locking in uence on database performance. In reporting and resolving the NC issues, the authors of this paper analysed and resolved how to arbitrate shared resources and implement process synchronisation.

Work plan of the digitalised nonconformity management and usage of the system
The graphical illustration of work ow, emphasising the detection of NCs, is presented in Fig. 3. The process of NCM starts with an NC detection (activity 1.). Looking at an arbitrary enterprise, the authors assumed that the detection of NCs is under the responsibility of each employee of the organisation. According to ISO 9001 requirements, employees are empowered and responsible for identifying, within their competence and expertise, an NC in the processes they participate in. Each enterprise has to provide a representative for NCM (Quality engineer). After that detection of NC, in this example, an employee or a quality engineer scans the barcode with the assistance of the application described in this paper, creates and forwards a report consisting of product identi cation, documentation, and disposition of NC to cloud server (activity 2).
Cloud solution could encompass adaptive business intelligence tools (mentioned earlier in Sect. 1 of this paper, e.g. tools for root cause analysis) to detect NC occurrence patterns and send a noti cation to the quality engineer about the severity of NC with proposed preventive/corrective measures. In this way, the emphasis may be placed on all employees' evidence-based decision-making and involvement (activity 3-

4).
After the NC is solved, the quality engineer sends feedback to the developed solution: a) noti es the process owner about the NC status, and b) integrates new data into the existing database, available for further RNN training and application (activity 5-6).
Automation of NC reporting and proactive contribution of all employees represents an organisation's signi cant achievement to foster quality culture and reach quality excellence. The long-term bene t of the digitalised NC reporting is to enable in-depth analysis of production performances by employing adaptive business intelligence tools.

Software solution capabilities
The software solution aims to provide real-time reporting in the NC occurrence caused by deviations in organisation or supplier processes. Adequate NC reporting should comprehend critical elements, such as positioning, identi cation, documentation, and disposition. A detailed description of these critical elements is presented below.
1. The positioning of NC occurrence in MO through the application graphical user interface (GUI) with the selection from the provided prede ned list of organisation locations. Other possibilities include the application of API maps with interactive geocoding of NC location occurrence. However, within this application, the mentioned option is avoided since it is presumed that the production workspace is prede ned, and the application of most of the API maps demands additional cost. 2. Identi cation enables organisation employees, with the option to apply application incorporated barcode reader and to gather initial corresponding product data, stored in the centralised database associated with a speci c barcode when related NC issue occurs. A number of the initially prede ned product data may differ, depending on the organisations' type (i.e. industry type, organisation size, type of activities, available technology, practicality/feasibility, resources).
3. Documentation of NC provides employees with the possibility to describe and document detected NC issue. The NC description involves text note and details, including product amount, work order, series and operations number, to document the NC issue properly.
4. Disposition includes the possibility to select one or more different options from a prede ned list of options to resolve the perceived NC issue. This initial subjective assumption to resolve the NC issue is obtained by the employee. Accordingly, the NC issue has to be assigned and evaluated by the process owners (responsible for maintaining product quality at an adequate level). Besides information regarding NC disposition, this element of the application provides statistical data for an organisation, enabling the estimation of possible proactive measures for future cases.
The solution can get the data generally from three sources: 1. The rst source is manual input from employees (it enables an employee to make the NC report and send it to the central database and even get a suggested solution). 2. Employees could use a mobile phone as an instrument with some basic measuring options.
Generally observed, through the Android diagnostic framework, an extensive spectrum of sensors for measuring different parameters is supported (motion detection and rotation detection, monitoring air temperatures, rotation detection, air pressure changes, monitoring dew point, absolute, and relative humidity) (Android -Sensors Overview 2020). Android provides support for different sensors, which could be divided into two categories: a) hardware-based -they derive data by directly determining the value of the speci c product and process parameters and production conditions, such as temperature, air quality, or geolocation; b) software-based (virtual sensors or synthetic sensors)they are not physical devices, but they are mimic hardware-based sensors. For the proposed application, the authors of this paper used the sensors mentioned above, all available at Android 4.0 API Level 14 (most of them were also present in Android 2.3 API Level 9, excluding temperature and humidity sensors).

The application can utilise the data gathered directly with the sensors incorporated in production and
IoT. Through these sensors, dedicated software incorporate functionalities of external devices or sensors connected to peripheral I/O. This option demands customising the solution on the companies perimeter, which includes existing sensors in the system.
In addition to the NC issue reporting's critical features, the solution has a communication channel that enables the circulation of timely information between employees, quality engineers, and process owners.
The task assignment and adequate communication are performed in the form of direct messaging and NC identi cation cards interchange, with the process owners' ability to initiate the creation and completion of NC identi cation cards. The initial exchange of information commences when the report is generated within the database, and the process owner receives a message on receipt of the report. The message includes aggregated data (position, documentation and options to resolve NC issue), based on which process owner determines the dynamics and de nes employees tasks to solve problems and identify root causes. The assigned task contains NC information, accompanied by an initial message derived from the process owner and any messages that follow the overall NC resolving process stream.
Employees can review their individual previously entered KDD data, while process owners may review particular NC resolving states and overall NC issues. Lastly, within the presented solution, it is possible to utilise the Recurrent Neural Network (RNN) to detect possible patterns for preventive/corrective measures (Lukoševičius 2009). RNN is a neural network (NN) class that extends the conventional feedforward NN with loops in connections (Mou et al. 2017). RNNs differ from feedforward NN since they can process sequential input data through a recurrent hidden state whose activation in each subsequent step depends on the previous step's activation. In this way, the RNN can expose dynamic behaviour.

JavaScript MEAN stack approach for real-time nonconformity management in SMEs
In this section of the paper, the software solution functionalities for common SME have been demonstrated. The assumption is that the SME has up to 250 employees so that employees and process owner perform the QC. Therefore, the process owner takes the role of the personnel in charge of NCM. The general objectives of this software solution are a) NCM digitalisation, b) overall time of information transmission reduction and c) facilitated communication.

NC reporting software application process ow and properties
The proposed solution's process ow is introduced in Fig. 3, while its properties for both employee and process owner roles are presented in Fig. 4 and Fig. 5. System utilisation begins with the initial registration and logging on to the system each time the system is used. Both types of roles have somewhat similar functionalities, including (1) NC reporting (Report property introduced in Fig. 4, with a detailed description in the previous section), (2) unresolved NC occurrences (Current cases property in Fig. 5), and (3) statistical NC data, regarding NC solving results (Solved cases stats property in Fig. 5), (4) communication channel (Communication property in Fig. 5).
The property "Current cases" presents all unresolved NC occurrences that are delegated to the logged-in user. Hence, it is possible to select one of the unresolved cases and determine the activities that need to be taken to resolve NC in real-time (Fig. 5, section "List of open nonconformities"). Furthermore, intending to nd the adequate procedure for current NCs occurrences to be resolved, it is possible to review the statistical data from the previous period stored in the cloud database (Fig. 5). The NC solution can be de ned in collaboration with other employees that are authorised and subscribed to a speci c prede ned communication channel so that they may receive and trigger messages in real-time, more like social networks (Fig. 5, input led "Message" and previous messages exchanged through a communication channel).
As already mentioned, the functionalities of the two application parts differ based on the de ned roles. Process owners part encompasses a broader insight: the ability to review all NCs at the process level (overall unresolved NC occurrences, overall statistics, employees that reported NCs), unlike employees' section that can only be used to review NCs, entered by a speci c employee.

CASE STUDY AND INITIAL RESULTS OF IMPLEMENTATION
This section intends to demonstrate two things: the rst is to demonstrate the system's usage on the reallife example (example: the surface scratch of plastic product detection), and the second one to present data from this system utilisation in three SMEs.
The developed solution has been used in three SMEs in plastic and rubber parts production intended for the automotive industry. The NCs of plastic and rubber products could be different, hard to determine and report, or signi cantly different to detect using classical control systems.
The following real-life example depicts the advantages of the developed system. Figures 6 and 7 depict the utilisation of software solution for surface scratch of plastic product detection. These NCs could emerge for different reasons. By applying the solution, the employee can document and report NC. After analysis, decision-makers de ned the corrective procedure and decided that scratches larger than 3 mm represent the product's defect.
The next time when an employee detects scratch/NC, it is possible to provide measurement or use correlated barcode data to trace previous similar product of NCs, to acquire the knowledge necessary to presume what to do with this type of NC. If a scratch is less than 3 mm, the product will go further in the production process; otherwise, the defective products will be excluded from further processing. The software system using the RNN module provides the mentioned decision and action.
In the second step, the authors of this paper monitored the implementation and initial results of represented software in three SMEs. The data were gathered for six months. Having in mind that companies have different production programs and amounts of production and different products, it could be concluded that implementing and utilising such a system improves employees' involvement in the process and quality culture. On the other hand, it enables easier detection, reporting and digitalisation of spotted NCs and reduces reporting and taking actions periods.
All companies have introduced, implemented and certi cated QMS according to ISO 9001:2015. The process approach enables the organisations to control the interrelationships and interdependencies among the system processes to enhance the overall organisation performance. The process approach utilisation in a QMS empowers: a) user perspective inclusion and consistency when meeting user demands; b) the examination of the activities in the sense of added value; c) the accomplishment of effective process performance; d) enhancement of processes based on evaluation of data and information (ISO 9001:2015). According to these reasons, the pre-request, that all companies where software system is tested, have implemented ISO 9001, ensured the same principles and same starting point for all three cases.
The solution provides statistical data from previous examples and improves the process of QC and NC assessment, recommendations and measures taken (Table ). Table 3 introduced some indicators for the measurement of NCs and provided an opportunity to compare and correlate different periods and different companies. These indicators could help benchmark different solutions and enterprises. Finally, the authors detected that recognising the patterns using RNN could help take managerial actions in NCM and QM. From the obtained and presented data, it is evident that the number of detected and reported NC and the number of corrective and preventive actions taken have been increased. It is essential to consider that many measures taken were based on suggestion developed on pattern recognition. Besides, this user-friendly software, with innovative modules, improves employees' participation in NC reporting. It may be concluded that this solution enables important principles of QM: participation of employees and evidence-based decision making for quality managers.

Data presented in
In the second place, the authors of this paper presented data where the correlation between NCs and sections of ISO 9001:2015 standards were established (Table 4) As modern technologies can dynamically scale, with advantages that include high availability and maintainability, constant data accessibility and functionalities from each connected edge device, it is the detected NCs primary sources. According to Table 4, it could be observed that most NCs could be connected with Sect. 8.7 and 8.5, but also signi cant NC number is related to 6.2.
Using this information, quality managers could work on the improvement of all speci c processes and the improvement of the quality system as a whole. Also, companies could work together and share their databases and patterns to bene t mutually and contribute to an extensive base for the system to learn.
To further extend the case study and consider the developed solution's performance, tests were performed to compare the developed solution with the possible solutions based on the affordable technologies including PHP, Apache server, MySQL and MariaDB. The authors tested the solutions on the identical infrastructures, which included servers for data storage with structures based on technologies MySQL/Apache/PHP, MariaDB/Apache/PHP, and MongoDB/Node.js/Express.js, and remote users presentation tiers with structures based on an application of HTML/CSS, HTML/CSS, and Angular, respectively. Testings re ected the most realistic possible scenarios to determine which technologies best performance in terms of forwarding queries and data retrieval from the databases.
Different NCs query workloads were created to test the previously used solutions' databases and current solution responsiveness. Each benchmark test was performed under the same quality manager user credentials, applying the default database settings.
First of all, there were three scenarios, including data insertion, modi cation, and selection. The rst scenario is used to test the insertion agility for a more extensive set of data objects in a speci c request, the second scenario to test the modi cation agility and the third scenario to test selection agility. Each test scenario was performed ve times for different query quantities so that a mean value was calculated for each test type. The procedure was repeated due to variations that may occur during the execution of the tests. The tests contained syntax and structure, as shown in Table 5.
The tests introduced in this part of the study have been performed on a single server, but things might look different with data shared across clusters. This fact should be taken into account in future testing.
Tables 6, 7, and 8 clearly show that the solution based on MongoDB has higher velocity when it comes to data insertion, modi cation, and retrieval compared to the solutions based on MySQL and MariaDB, mainly when dealt with a considerable amount of data. The increase in time for all three types of solutions DBMS seems to be linear. In the scenarios and circumstances covered in this study, the authors discovered that by switching from MySQL and MariaDB technologies to MongoDB technology, it is possible to get a signi cantly faster database with a relatively similar structure. essential to emphasise that organisations must not overlook the potential of I4.0 solutions and services. Considering the nature of I4.0 technologies to change and evolve continually, there are numerous application possibilities and bene ts. Therefore, an increasing number of organisations from different business areas are intensively incorporating these advanced technologies to improve their business capabilities and capacities at a minimum cost (Zhong et al., 2017). MO can utilise service-oriented architecture via the Internet to acquire customisable, exible, collaborative, and recon gurable services to their employees, decision-makers and customers, with the consequence of providing a powerfully uni ed human-machine manufacturing system (Feeney et al. 2015). The amount of real-time data accumulated from multiple sources in production organisations is steadily increasing. If this data is stored, there is a tremendous opportunity to facilitate information ow and improve production processes with big data analytics and the right decisions (Zhang et al. 2017). To do so, conventional industrial organisations should incorporate the concept of I4.0 with main pillars, including internet technologies, IoT, cloud computing, big data, and adaptive arti cial intelligence (Tao et al. 2018). Therefore, this study's core premise is that one of the possible fundamental steps towards the I4.0, and subsequently, Q4.0 concepts incorporation, is to deploy mobile applications, able to enhance QM and production output. Accordingly, this study proposes a specialised role-based mobile application, with multiple interfaces divided by roles that can be utilised to report real-time NCs and to gain data-driven insight for subsequent production defect and root cause detection, defect mapping, machine failure and downtime reduction following Salkin et al., (2018) assumptions. Some of the bene ts that the application brings with it are greater accessibility, collaboration and data transparency. The possible lack of the application regarding user data security in the cloud has been overcome since Node.js authorisation and authentication (i.e. bcryptjs, jsonwebtoken) modules were applied.
To It can be concluded that, through the increased data availability in MOs and the I4.0 technological advances in computing, the solution for NCs quality identi cation, reporting and pattern recognition is a promising approach to conduct quality inspection processes more economically. This paper is constituted on the I4.0 research starting from quality objectives to achieve conformity related to speci cations, variations reduction, waste reduction, defects prevention, alignment between strategy and operation enhancement, e ciency and effectiveness of equipment and operations enhancement.
Quality objectives are ful lled by improving: connectedness with real-time reports of emerging insights; knowledge based on the utilisation of appropriate neural network method; and automation based on problem reporting and solving by an intelligent agent using mobile phones.
A fundamental novelty, which is presented in this paper, refers to the integration of research in QC, management, and software engineering. The developed software solution is intended to be used for affordable identi cation and reporting of NC with the possibility to integrate other software modules for quality analysis, problem-solving, corrective/preventive actions, and using a high level of applied methods (machine learning and arti cial intelligence optimisation methods).
From the industrial perspective, the authors of this paper believe that our solution is interesting for technology providers aiming to release solutions for SMEs. The authors of this paper presented scalable, exible, and, above all, affordable solutions form SMEs. SMEs usually do not have the nancial resources to invest in large scale and expensive solutions. The presented solution is suitable for SMEs, but it is exible and open and could be integrated with legacy systems and third-party solutions. Similarly to the 'e-ProMan' system (Katchasuwanmanee et al. 2016), the solution presented in this paper is primally designed to suit SMEs needs with strict budget limitations and lower data-gathering infrastructure resources. This paper has tried to present a solution that incorporates some of the vital e-manufacturing elements (Cheng et al. 2008). These elements include infrastructure for information sharing; a protected and security application; managed, shared information and knowledge; information to support management decisions; documented process support; electronically supported processes; and effective teamwork.
The real-time nonconformity management solution possibilities are primarily based on applying the sensors network for data collecting and a prediction module. By utilising the sensors' network, data are retrieved directly from the SMEs manufacturing lines, providing production parameter measurement and evidence of possible production NCs. Besides, some basic measures could be retrieved using mobile devices. Consequently, the RNN (recurrent neural network) prediction module for proactive/corrective actions selection may be applied to support real-time decision making. The main idea is that based on the data set on NCs that have previously occurred and the proactive/corrective actions applied to solve them, the module de nes a list of proactive/corrective actions proposals for ongoing NCs. In addition to de ned proposed actions, the list may assign a success rate to each action based on previously resolved similar cases. The most appropriate proposal adopted and possibly re ned by the quality managers can then be applied in real-time and added to the database.
In compliance with the I4.0 paradigm, in the proposed software solution, modules for Big Data Analytics related to NCs and prediction of business process' state could be implemented. In this way, it will be possible to choose an optimal solution for problem-solving at the level of each machine, machine line, or enterprise as a whole.
In addition, this paper indicates that small, affordable solutions developed to be users friendly could incorporate some of the main principles of QM, such as employee engagement. In addition, the use of the MEAN stack provides an improved possibility for pattern recognition and ful lment of other principles of QM, such as improvement and evidence-based decision making.

Conclusion
Achieving higher quality and meeting customer demands represents a fundamental goal of nowadays industries. This objective could be obtained by introducing an I4.0 based QC, which emphasises continuous monitoring, controlling, and improving organisational processes and products.
As NCM represents one of the essential tasks of QM, it is necessary to acquire and use ICT to facilitate information and enable the implementation of effective proactive and corrective QM measures in realtime. Along with identi cation, documentation of NC has emerged as a problem. Solutions on this topic from broad literature are mainly based on traditional measures and procedures for solving NC and are usually being taken only by QM representatives and require a signi cant amount of time. Some of these dilemmas could be untangled by the convergence between Quality, I4.0, and IoT. Innovative software solutions could contribute to more advanced NCM.
The authors of this paper proved that the implementation and usage of affordable but advanced systems based on mobile platforms could improve the number of indicators connected with NCM. In addition to selected indicators, the authors presented the distribution of NCs according to sections in ISO 9001:2015 standard. Since the authors of this paper implemented a module to detect possible corrective actions patterns, the authors measured and presented several corrective actions taken based on de ned patterns.
The authors also believe that no single research presented such results and solutions so that modern NCM could bene t from the proposed approach. The use of technologies from the I4.0 pack could contribute to better and more effective NCM and QM generally by tracing the path to Q4.0 and QMS 4.0. Consequently, the use of new solutions and technologies could improve even basic principles of QMS (such as involvement of employees and innovation).
The presented software included some demands and unique features that differ it from similar solutions, primarily in the module where the: 1) Android Sensor Framework employed sensors from mobile platforms, that also the authors of this paper used; 2) novel RNN model could effectively analyse possible NCs, as sequential data determined corrective action, based on the knowledge about previously recognised NCs; and 3) authors enabled mobile platform to collect data from other sensors and IoT. It ensures that this solution surpasses similar products, bringing additional value to organisations. The presented solution enabled identifying products or resources, turning the mobile platform into a barcode reader, enabling full reporting traceability. When NC product or situation accrued, established algorithm forwarded task to dedicated quality manager suggesting possible actions. The authors implemented a module for Recurrent Neural Network (RNN) to detect possible patterns for corrective actions. This module will enable the responsible person to use some de ned patterns or make a decision using suggestion or making entirely new actions. Besides, the solution could help de ne the same actions, such as rework, repair, permissions, corrections, and scrap.
The software solution brings bene ts for both employees, managers and stakeholders through (1) involvement of all employees; (2) digitalisation and improvement of existing NC reporting systems; (3) improvement of NC culture; (4) better understanding and measurement of employer contribution to NCM; (5) making the technology ease of use both affordable and suitable for broader industry audience (the source code of a demo version, is publicly available on the GitHub repository: https://github.com/cqmquality-center/nonconformity. Finally, the developed solution is implemented in 3 SMEs, and initial results show several bene ts in increasing the number of NC detection, reporting, time, and increasing participation of employees number of preventive and corrective actions and improved QM system as a whole. The number of corrective and preventive actions was taken based on the assistance of the RNN module. All NCs were related to speci c sections of ISO 9001:2015 standards so that quality managers and managers in the companies could have insight into the sources of the issues and the foundation for de ning different managerial actions.
It could be concluded that I4.0 has been making a signi cant impact on all elds, including QM and NCM. QM could bene t by using the technologies from I4.0 tools, such as IoT, cloud computing, arti cial intelligence and cloud computing and modern ICT solution. In this paper, the authors suggested approach, presented, and tested software solutions that proved that the number of bene ts could be achieved using innovative software systems and technologies. This paper also indicated the direction for the development of affordable open source solutions where the authors of this paper enabled SMEs to have bene ts that were reserved, until now, only for large companies that have been using expensive software platforms. Besides, user-friendly software solution promotes employees' participation and the ful lment of other QM principles.
The system could be upgraded and expanded in many different directions, such as development modules for documentation management or advanced system image recognition (as part of QC) to support and interconnection with other systems (safety, environment management).  "_id" : 1001, "mark" : "1657774A", "part name" : "Bumper", "quantity" : 20, "description" : "Rear bumper dimension mismatch", "placement" : "Assembly machine", "selected disposition" : "Alternative use", "disposition description" : "use NC products for a purpose other than originally defined", "production date" : new Date("2019-05-10") } ]); $set: { // replaces the field value "selected disposition" : "Return to the supplier", "disposition description" : "Products have to be returned to the supplier since they are damaged." } } ) UPDATE nonconformity SET quantity = quantity + 5 selected disposition = "Return to the supplier", disposition description = "Products have to be returned to the supplier since they are damaged" WHERE _id = 1001 MongoDB select syntax sample MariaDB/MySQL select syntax sample db. nonconformity.find( {} ) SELECT * FROM nonconformity  Footnotes [1]TypeScript presents a type-checking superset of JavaScript that compiles to JavaScript.
[2]Web Bluetooth is an API used to discover and communicate with devices over the Bluetooth 4.
[3]V8 is the runtime environment for JavaScript created for Google Chrome. It is free software since 2008, written in C ++ with the purpose to compile the JavaScript source code into machine code instead of interpreting it in real-time.
[4]Libuv is a library that supports asynchronous I/O originally written for Node.js, know also used by other platforms.
[5] before Node.js establishment, it was necessary to be familiar with, at least, two programming languages, one used for the presentation, and the other for the business tier development.

Figures
Page 36/41  Data ow through adopted technologies A use case diagram for NC reporting software solution applied in automotive industry SMEs