This paper presents our architectural approach to building a collaborative Industry 4.0 platform that enables IoT-based real-time monitoring, optimization and negotiation in manufacturing supply chains. The platform is called NIMBLE and is currently being developed in a European research project. The presented approach utilizes microservice technology, and implements the core business functionality of the platform through a composition of decentralized, scalable services. The communication among services, and with platform users, manufacturers, suppliers, sensors and Web resources, is supported through simple protocols and lightweight mechanisms. Core business services of the implemented architecture are released as open source software, enabling multiple prospective platform-providers to establish B2B marketplaces for collaboration within their own industrial sector or region. To demonstrate microservices in practice, we present two scenarios, both related to manufacturing of wooden home buildings: one is IoT-based data sharing in a supply chain, and the other deals with product driven logistics planning. The further development of the platform will be driven by the requirements of at least four different use cases throughout Europe, and by incorporating advanced business models to support the growth of powerful network effects of the platform.