This demo project showcases the capabilities of blockchain and smart contracts for secure and transparent transactions.
Business goals: Creation of a platform for distribution of various digital assets; this platform could be further monetized by means of subscription
Product: React-based cross-platform mobile application + Hyperledger-based blockchain network
Applied technologies: React, Koa, Caddy, Hyperledger tools (Fabric, Composer, Explorer, Chaincode), CouchDB, IPFS, Docker (Swarm, Compose)
Blockchain is seen as one of the primary technologies when it comes to digital asset transactions. Our today’s case is a music distribution network, where Buyers can use their tokens to purchase music tracks of Artists by means of smart contracts.
All the benefits of blockchain firmly remain in place. Purchases are completed and logged in the blockchain network only by consensus, i.e. when all the requirements set forth by both parties are met. Information about individual tracks and transactions is also open to viewing, and updates can be accessed in real time. Watch the video to learn more!
Platform Structure & Applied Technologies
The main workflow is as follows: a single page React application is used to access the blockchain network through an API. The network itself is implemented with Hyperledger technologies, while the digital assets are stored in the IPFS file system. Alongside distribution of digital content, similar tools can be used to create solutions for logistics, voting, healthcare, and finances. Such products are open to integration with 3rd-party services, i.e. real payment systems.
• React – JavaScript library that was created by Facebook and used to create the single page application (SPA) for users
• Koa – JavaScript framework that was used to write API that connects the SPA with the blockchain framework
• Hyperledger Fabric – blockchain framework implementation; it was built to develop applications with modular architecture and enable plug-and-play consensus and membership services
• Hyperledger Composer – set of collaboration tools that allows to create business-centric blockchain networks
• Hyperledger Explorer – blockchain module used to view, invoke, deploy or query blocks, transactions, and associated data, covering any relevant information stored in the ledger
• Hyperledger Chaincode – technology that was used to write smart contracts
• CouchDB – blockchain state database that was used to store the current state of the blockchain network and enable custom queries
• IPFS (the InterPlanetary File System) – hypermedia distribution protocol that is typically used to create distributed applications
• Caddy – HTTPS web/proxy server that was used to route requests to the internal components of the system
• Docker (Swarm, Compose) – container-based virtualization technology; it was used to simplify local development and production deployment, as well as to scale the product in the future
In order to choose the right technology for a blockchain-based solution, it is necessary to consider the following requirements. First, private blockchain should be supported for secure internal use in enterprises. Second, the technology should be production-ready, stable and well-documented. Third, it should minimize additional operating costs and enable easy changes and enhancements of business logic. Our blockchain demo utilizes Hyperledger Fabric.
Today, with all the tools available for development, it’s up to business owners to launch projects and build solutions that puts blockchain to practice in such spheres as logistics and media distribution.