# A Blockchain-Based Quality 4.0 Application for Warehouse Management System
## 4 Blockchain-Based Quality 4.0 Architecture  
In this study, the Q-4.0 model was applied to the warehouse management system, one of the supply functions of a company that buys and sells sheet metal and profiles. An application was made for a 100 \(\times\) 100 \(\times\) 4 mm sheet metal profile, which is one of the product groups of the enterprise. An architecture for the Q-4.0 model has been developed using Blockchain (BC), one of the I-4.0 technologies. The architecture is shown in Figure 3.  
While the Q-4.0 model was applied to the enterprise's warehouse management system, the sub-processes of the warehouse management system were first determined. There are four participants in the warehouse management system: product supplier, worker, warehouse manager, and purchasing manager. Afterward, a BC-based Q-4.0 architecture was created for the determined processes. With the support of BC, the participants were given the necessary authorization.  
In this system, in addition to the architectural structure in the figure, CreateProductRecord, GrantAccessToProvider, GrantAccessToWarehouse, RevokeAccess, and RevokeAccessToWarehouse commands will also be included. With these commands, transactions in the blockchain algorithm will be grouped. However, various assets and smart contracts will also be defined without being limited to these. According to the architecture shown in Figure 3, system participants first request a registration certificate from the certification authority through the Membership Service Provider (MSP). They register to the system via the client application when their requests are met. The certification authority then issues the participant a new identity with their certificate and private key. All transactions are distributed through Product Blockchain Network Records. It is also recorded in the ESR (Electronic Supply Records) book. Participants have different roles in the system, and due to the BC structure, they can only access the records to which they have access rights. To register the products in the system, the warehouse manager uses the client application by calling the relevant chain code and registering the products. Once the registration process is transferred to the BC network, the updated transactions are distributed to all participants  
Figure 3: Blockchain-based Quality 4.0 architectural structure.  
over the network. Records in the BC network are constantly updated, and updates are visible to all users. Therefore, this distribution process ensures that unauthorized users cannot change and delete every transaction. Each new transaction is added to the previous block with just a timestamp. Therefore, the network is entirely secure. Providers with high authority can query the necessary data over the network. Suppose providers with more authority (purchasing manager and warehouse manager for the application) allow providers with less authority (workers and suppliers) to view and update the records in the ESR ledger. In that case, these providers can also view and update the products' records.  
In this architectural structure, an architectural structure has been created for the use of a single warehouse and multiple users. If there is more than one warehouse in the firm, the data will be evaluated in terms of traceability, controllability, and sustainability in the developed mathematical model and will be processed in the address book in the architectural structure. Adding more users and warehouses to the system in terms of scalability will not create a problem in terms of the functioning of the architectural structure.  
In cases where there are more warehouses, when real-time data are used, the variability of the data must be constantly monitored. The amount of products in each warehouse must be kept up-to-date, and users must be able to view them up-to-date when needed. Due to the flexible structure of BC, when working with real-time data, there will be no incompatibility despite the dynamic structure of the data.