Arrayán - A Resilient Blockchain-based Food Supply Chain

 

ArrayánArrayán stands as a revolutionary web application, seamlessly integrated with the Resilient DB blockchain fabric. Designed to empower industries, Arrayán facilitates comprehensive tracking o...

Arrayán

Arrayán stands as a revolutionary web application, seamlessly integrated with the Resilient DB blockchain fabric. Designed to empower industries, Arrayán facilitates comprehensive tracking of products, by-products, and their historical journey throughout the supply chain. The platform champions transparency, aiding food organizations in effortlessly visualizing information from farm to retail. Our mission with Arrayán extends beyond mere tracking; we aim to redefine traceability for sustainability. Notably, the platform introduces a key feature allowing consumers and other industry sectors to claim food by-products - stems, peels, and seeds. This forward-thinking approach not only fosters transparency but also encourages the responsible use of by-products. This reclaimed data on generation times and methods becomes invaluable. It opens doors for scaling the utilization of these by-products, transforming them into raw materials for extracting valuable molecules for cosmetics and generating hydrogen - two prized assets in today’s dynamic economy. Arrayán is not just a tool for tracking; it’s a catalyst for sustainable innovation and resource optimization.

Logo
Figure 1. Picture describing Arrayán

  • Website is live at this url
  • Repository - Arrayan
  • We have modified the existing ResilientDB-GraphQL APIs catering to the needs of a blockchain-based food supply chain and added a new API to fetch the products in the forked repo.

Problem Identified

Scientific evidence supports the potential of food by-products as valuable sources of molecules for the cosmetic industry. However, their utilization has been limited as the chemical composition and yield variability are influenced by factors such as variety, environmental conditions, and the methods of cultivation and processing. Currently, there is a lack of comprehensive traceability for most by-products, hindering the recording of crucial data. This absence of information results in a lack of standardization, contributing to uncertain yields and increased costs associated with the extraction and purification processes. A parallel challenge is observed in the use of by-products for hydrogen production and other upcycling applications.

Solution

This web application plays a pivotal role in meticulously tracing the generation of by-products at each stage. This granular information is instrumental in standardizing by-products, facilitating their upcycling on a larger scale, and pinpointing key areas where substantial amounts of by-products are produced. Our traceability-for-sustainability model not only offers a blueprint for companies to embrace circular economy models but also ensures compliance with regulations such as the Food Safety Modernization Act. The primary objective of the Food Safety Modernization Act is to enhance food safety. In the event of a foodborne incident, rapid tracking within 24 hours is mandated. The regulation emphasizes the necessity for companies to share information seamlessly across their supply chain, and blockchain emerges as a powerful tool to streamline this process. Arrayán stands as more than just a tracing tool; it is a catalyst for the food industry to not only meet regulatory requirements but also to potentially increase profitability from their by-products and reduce its environmental footprint. During the development of the application, we established a partnership with the teaching and research winery of UC Davis. To kick-start our journey, we are delivering a Proof of Concept utilizing the data generously provided by our collaborators.

Note: Arrayán also aligns with Senate Bill 1883, offering a pathway to compliance with this additional regulation.

Technology Stack

Features and User Guide

Home Page

  • Provides a general overview of the solution offered through the website.

Home Page
Figure 2. Home Page

Logo
Figure 3. What we offer through Arrayán

  • Getting Started: To access the portal’s features, users first need to register and log in. Once logged in, they can unlock functionalities such as inventory management and search capabilities.

Login
Figure 4. Login Page

  • Live Inventory Visualization: The Real-time Display provides an instant, visual representation of the current status of the inventory, ensuring up-to-the-moment insights.

Dashboard
Figure 5. Dashboard

Inventory

  • Seamless Upload Process: Allows consumers to easily upload Excel files containing inventory data. Multiple Excel files can be uploaded and loaded consecutively.

Upload
Figure 6. Upload Page

  • Transparent Inventory View: Shows a clear and accessible display of updated inventory information visible to consumers.

Inventory
Figure 7. Inventory

  • Search Option: Enables users to search and track any final product through the food supply chain.

Track
Figure 8. Track your products and by-products

  • Visualizes Supply Chain: Provides a comprehensive supply chain mapping of each product’s entire supply chain and process details.

Traces
Figure 9. Visualize your product through the supply chain

  • Claiming By-Products: Consumers can easily claim by-products in the process, fostering a circular economy. This feature empowers consumers to actively participate in sustainable practices. The consumer can communicate with the organizations using this feature through email.

Claim
Figure 10. Claim by-products

Steps to run the system

Download NodeJS from here and ensure that it’s added to PATH.

Clone the repo of arrayan to get started:

git clone https://github.com/Amoolya-Reddy/arrayan.git

Then navigate inside the ResVault directory:

cd arrayan

Install the dependencies:

npm install

Start the project:

npm start

Build the project:

npm run build

The above code uses online instance of Resilient DB and the application is ready to be launched. For further exploration, below steps can be followed to setup and play around with local instance.

Setup Python3.10

Ensure you have Python3.10, otherwise download it and set it up as default.

Setup ResilientDB

You will need to clone the ResilientDB repo to get started:

git clone https://github.com/resilientdb/resilientdb.git

Then navigate inside the ResilientDB directory:

cd resilientdb

Install dependencies:

sh INSTALL.sh

Run ResilientDB KV Service (this may take a few minutes for the first time):

./service/tools/kv/server_tools/start_kv_service.sh

Setup Crow HTTP server, SDK, and GraphQL server

You will need to clone the ResilientDB GraphQL repo to get started:

git clone https://github.com/Amoolya-Reddy/ResilientDB-GraphQL

Then navigate inside the ResilientDBGraphQL directory:

cd ResilientDB-GraphQL

Install the Crow dependencies:

sudo apt update sudo apt install build-essential sudo apt install python3.10-dev sudo apt install apt-transport-https curl gnupg

Build Crow HTTP server (this may take a few minutes for the first time):

bazel build service/http_server:crow_service_main

Start the Crow HTTP server:

bazel-bin/service/http_server/crow_service_main service/tools/config/interface/service.config service/http_server/server_config.config

Create virtual environment for the Python SDK:

python3 -m venv venv –without-pip

Activate the virtual environment:

source venv/bin/activate

Install pip in the virtual environment for the Python dependencies:

curl https://bootstrap.pypa.io/get-pip.py | python

Install the Python dependencies:

pip install -r requirements.txt

Start the GraphQL server:

python3 app.py

Setup cited from ResVault

Contributions:

Amoolya, Manali, Mariana, Shravani, Shristi, Tarun