Foodtraze Network Installation
Built upon Hyperledger Fabric, Foodtraze is an application that utilizes Blockchained technology to increase transparency in Food Industry.
To Access the unlimited features of Foodtrace application,its essential to equip your system with required tools and configuration.
Step 1: Prerequisites
Before we begin,it's essential to confirm that your system is adequately equipped with the required tools and configurations. This article aims to provide guidance on the essential prerequisites for a successful Foodtraze application installation.
Step 1: Install GIT
Download the latest version of git if it is not already installed from the official website : https://enterprise.github.com/releases
Step 2: Install cURL
Download the latest version of the cURL tool if it is not already installed from the offical website : https://curl.se/download.html
Step 3 : Docker and Docker Compose
Download the latest Docker version
For MacOSX, *nix, or Windows 10: Docker Docker version 17.06.2-ce or greater is required. Older versions of Windows: Docker Toolbox - again, Docker version Docker 17.06.2-ce or greater is required.
Note:Installing Docker for Mac or Windows, or Docker Toolbox will also install Docker Compose. If you already had Docker installed, you should check that you have Docker Compose version 1.14.0 or greater installed. If not, we recommend that you install a more recent version of Docker.
Step 4 :Install Go
Begin by downloading the stable version of Golang, preferably 1.20.12 version, from the official Go website: https://go.dev/dl/
Step 5 : Nodejs Installation
To install Node.js, use the following command. This command will automatically update the package list and install Node.js on your system.
sudo apt-get install nodejs
To install Node.js packages, use the following command
npm install
The above steps concludes the prerequisites for setting up Foodtraze application. Once these steps are completed, you are ready to move on to the installation and configuration of the Foodtraze application.
For any additional help please refer the official link : https://hyperledger-fabric.readthedocs.io/ml/latest/prereqs.html
Step 2: Foodtraze Network Setup
Download the source file
Clone the Git repository that contains Foodtraze project files from the path https://github.com/hyperledger-foodtraze/foodtraze-network.gitusing "git clone" command
git clone -b predev https://github.com/hyperledger-foodtraze/foodtraze-network.git
Step 3: Pull Binaries & Docker image
Get into the cloned directory path(foodtraze-network) and execute the command to download the binaries and images to your system.
curl -sSL https://bit.ly/2ysbOFE | bash -s -- -- 1.5.6
Step 4:Start an Network
Inside the directory execute the command ./startNetwork.sh
This command succesfully sets up the Foodtraze network.
Foodtraze Api Installation
Step 1: Foodtraze Api Setup
To initiate the setup process, the first step involves cloning the Foodtraze api code from git Repository https://github.com/hyperledger-foodtraze/foodtraze-adminpanel.git
The cloned repository should have all the project files associated with Foodtraze GraphQL project.
Step 2: Set Network Connection Profile
Clone the github folder and replace each organisaton connection profile of network json file from the given path below
example: foodtraze-network/food-traze-network/organizations/peerOrganizations/org1.example.com/connection-org1.json
Step 3: Start an Api
Now it's time to start the application. Open the terminal from the project folder and execute the following command.
npm start serve
Foodtraze Explorer Installation
Step 1: Foodtraze Explorer Setup
The first step involves cloning the Foodtraze Explorer Setup from the GIT repository. https://github.com/hyperledger-foodtraze/foodtraze-api.git
git clone -b predev https://github.com/hyperledger-foodtraze/foodtraze-explorer.git
Step 2: Change Your Network Profile Connection
configure the path to change to your network profile to the json file path as, "/app/platform/fabric/connection-profile/test-network.json"
Step 3: Initialize Your DB Connection
Configure your postgres credential in "/app/explorerconfig.json' file.
Step 4: Start an Explorer
run the below command for build
npm run build
Inside the main directory execute the command, ./start.sh