Brief introduction of HARA Blockchain software stack
At HARA, we’re trying to provide farmers and other stakeholders in the agricultural sector with valuable data. HARA acquires usually hard-to-find data such as farmers’ ID, cultivation, ecological, location, transactional data across Indonesia. These data are beneficial for institutions across to make data-driven decisions. For instance, financial institutions have often no access to agriculture data to develop loan products with appropriate risk models and need to absorb high costs for serving farmers in rural areas, As a result, HARA has successfully helped digitize loan administration and disbursement process of several financial institutions. Also, the data from HARA has been used in market research reports to provide reliable information on rice production in Indonesia.
HARA uses blockchain technology to run its ecosystem that provides decentralized data exchange between data providers to contribute/store their data, data buyers to access the data, and other stakeholders to see or develop the data for their needs. The blockchain technology ensures the data exchange is traceable, transparent and secured. This article will tell you a brief knowledge about HARA Blockchain software stack and why we choose it.
What is HARA?
HARA is a blockchain-based data exchange for the food and agriculture sector that has been operating since 2015. HARA provides farmers and other players in the agricultural sector with valuable data.
HARA has acquired usually hard-to-find data such as farmer, land, weather data in different provinces across Indonesia. This data is beneficial for institutions across the sectors to make data-driven decisions.
For instance, HARA has successfully helped digitize loan administration and disbursement process of several financial institutions. Also, the data from HARA has been used in market research reports to provide reliable information on rice production in Indonesia.
What software stack does HARA Blockchain use?
We use JavaScript (JS) for our main programming language, so our software stack is revolving around JS software. HARA Blockchain product consists of :
- HARA Wallet (iOS & Android)
- HARA Scan (Web)
- HARA Smart Contract
1) Front-end
HARA Blockchain’s front-end uses React & React Native as a base framework for us to create our product. The reason why we chose React over other frameworks is kinda funny, In the beginning, our developers can use any language that suits each of us and it makes us face the difficulties of managing the project together. Then our senior developers trying to decide which programming language we should implement for the whole company by considering the documentation, libraries, minimal learning curve, and others. After a few heated discussions, they decide to choose JS as our main language because of its versatility and the number of application that uses JS and React as the base.
We also use Redux-Saga to manage our application, making stuff more efficient, and help us to manages failure in our application. For mobile notification and analytics, we use Firebase to help us.
2) Back-end
The HARA Blockchain’s back-end we use Web3.js to communicate to our blockchain, doing our Ethereum stuff and many more things that made our blockchain runs. We also use NodeJS because it’s language is JS and Web3.js library is mostly updated at JS language rather than other languages. NodeJS helps us to know when the package needs to be updated and assist to operate the AWS Lambda and Serverless Framework.
Docker is used to create a ready-to-use environment. By doing so, it simplifies us to run the image in other machines.which also helps us create the exact same environment as production on testing. Mocha and IstanbulJS used for testing. Mocha as the test framework and IstanbulJS for handling coverage tests.
3) Blockchain
HARA creates its own private network based on the Ethereum Blockchain. One of Ethereum’s features is Smart contract, an application that runs on top of Ethereum Virtual machine (EVM). To create a smart contract we use Solidity, which also looked like Typescript (a friendly neighbor of JS). Then for implementing, deploying and as a boilerplate for making a smart contract, we use Truffle. For local environment test of a Smart Contract, we use Ganache, it's like the Xampp for Blockchain or kinda local server for blockchain environment. We often use other testnet (i.e. Rinkeby or Ropsten) for testing our smart contract to know how the contract works on the real blockchain network.
4) Infrastructure
To compliment our stack, we use Terraform to construct our infrastructure, starting from EC2, Route53, CloudFront, S3, AWS API Gateway, Lambda, and DynamoDB. Terraform help us to manages all infrastructure-as-a-code. There are lots of Terraform template that is available around the web also helps our DevOps team to do the Infrastructure for HARA Blockchain use.
The HARA Blockchain itself, we use the GoEthereum services. All services are dockerized. Not only for the blockchain services, but these dockers also does help us to test and doing distribution of applications on an ongoing basis.
5) Complementary
We use Azure Pipeline for CI/CD Pipeline and Git as our repository to help us to complement other things we need.
Conclusion
A quick review of what stack we use :
- Front end = React, React Native, Redux-Saga, Web3JS, FireBase.
- Back end = NodeJS, Serverless Framework, Docker, Mocha, IstanbulJS, Lambda, API Gateway.
- Blockchain = Solidity, Truffle, Ganache, GoEthereum.
- Infrastructure = Terraform, EC2, Route53, Cloudfront, S3, DynamoDB.
- Complementary = Git, Pipeline.
That’s all Folks~
Learn more about HARA
- Visit the HARA website
- Read our White Paper
- Follow our Social Media
Facebook, Twitter, Instagram, Medium & LinkedIn