Precision of production in industry is a hot area and companies are seeking for solutions to make data-drive decisions to optimize the processes of production and calculate gain/loss during manufacturing. Making a right decision with huge reports always takes time and executive or decision makers always seek user-friendly, automatised applications to help. 
 This paper offers a server-side infrastructure for IoT applications that targets to provide an end-to-end solution to smart factories on production lines. Solution designed as a middleware application in which northbound and southbound systems are connected to each other. Collected data is stored and integrated with BI tool to present gain/loss during production to executive management and same output can be used for MES-MOM operations. OPC-UA is selected as southbound protocol as it can be considered the most used protocol in industrial IoT. Moreover, solution can be enhanced with any other protocol with slight changes in configurations.