[Open Source] Blockchain-Based (Fabric) Agricultural Product Traceability Platform with Fully Transparent End-to-End Traceability

Open SourceProcess Management
2026-06-28 04:31 1 次浏览 • 0 次下载 0KB
[Open Source] Blockchain-Based (Fabric) Agricultural Product Traceability Platform with Fully Transparent End-to-End Traceability

1. Project Overview

Fabric-Based Agricultural Product Traceability System

Bring the food on our tables back to the farming traditions of the past!

As society continues to develop and technology advances, do you still remember the vegetable garden back in your hometown, where crops were grown using only organic farm manure? When we were children, material conditions were relatively limited, yet every bite of food tasted so delicious that even after growing up, we have never experienced the same flavor again. Today, in pursuit of a better life, we have left the hometowns we love and settled among the concrete and steel of the city. Do you ever find yourself reminiscing about those lost flavors?

The blockchain-based agricultural product traceability system consists of PC and H5 interfaces and includes five organizational nodes: farmers, raw material suppliers, manufacturers, logistics providers, and retailers. Once the entire process is completed and consumers purchase a product, they can trace its origin. Data from every stage is recorded on the blockchain, making the entire process transparent.

This system demonstrates an approach to blockchain applications. Many people associate blockchain exclusively with Bitcoin or scams that exploit investors, but this understanding is incorrect. When applied to traditional industries, blockchain can have transformative effects. It has natural advantages in scenarios and industries such as agricultural products, supply chain traceability, electronic evidence preservation, judicial services, finance, real-world asset enablement, educational records management, healthcare, and notarization. Its characteristics, including immutability, decentralization, distributed architecture, and traceability, make it valuable across many applications.

2. Open Source License

Author has not specified open source protocol

3. Screenshots

Interface

Blockchain Explorer

This feature uses Fabric APIs to display data. Within the Fabric ecosystem, a Chinese developer community has contributed a Fabric browser project that you can use. However, it also works by calling Fabric APIs.

Add Crops

This section covers adding crops. Since agricultural crops are typically cultivated on separate plots of land, practical agricultural traceability solutions may require land plot planning, along with IoT devices to transmit plot indicator data and crop condition information.

Crop Cultivation Process Records

The cultivation process is critical because it clearly displays crop growth stages and growing conditions. This helps improve credibility and allows consumers to verify certain information through on-site inspections.

Logistics Tracking

This is only a simulation of a real-world scenario. In actual production, data must be uploaded to show where your products are at any given time, just like tracking the delivery status of an online purchase.

Raw Material Supplier Quality Inspection

Raw materials undergo quality inspection after being collected by the raw material supplier from farmers. This inspection is necessary to prevent counterfeit or substandard raw materials. Relevant government departments and testing institutions must be involved to ensure raw material quality, so that high-quality products can be manufactured.

Screenshots of the Manufacturer Module

The manufacturer processes raw materials into finished products. This module includes recording product information on the blockchain and recording processing procedures on the blockchain. Why record exactly who performed each processing step? Because only by tracing activities back to the individuals responsible can authenticity and reliability be ensured. If a problem actually occurs, it will also be easier to track and trace its origin. I believe this is also part of a brand's competitive advantage. Of course, there is still much more information that needs to be expanded.

Retailer

The retailer's primary task is to receive the products and generate a product traceability ID. QR code functionality can be added independently and is very easy to implement.

PC Traceability

Mini Program Traceability

Entering an ID to trace a product is not really a practical approach. Instead, users should scan a QR code that redirects them to the Mini Program. If you genuinely want to build an agricultural product brand, you must have an officially verified Mini Program where consumers can trace product origins, leave reviews, and access other useful features.


4. Feature Overview

Organizational Structure Diagram

5. Tech Stack

System Modules and Technologies

This system consists of four modules: blockchain-trace-bcnetwork, blockchain-trace-applets, blockchain-trace-pc, and blockchain-trace-basic-data. This system only implements a relatively simple operation for recording data on the blockchain. Technically, we can usually find ways to implement almost anything, but product thinking is extremely valuable. Identifying appropriate solutions for specific real-world scenarios is also quite challenging. Once you have an idea, you need to explore the details further. For example, nodes such as farmers and raw material suppliers should be scalable, allowing nodes to be dynamically added or removed. There should also be certain reward and penalty mechanisms for these participants. For example, if a participant's reputation score reaches a certain threshold, they should be removed when necessary. Another consideration is how data should be recorded on the blockchain. If every operation is recorded, the blockchain will become extremely large. If not every operation is recorded, how can data credibility be ensured? How should each stage be designed? Should stages be added dynamically, or should they be predefined and customized? These are all questions we need to consider.


blockchain-trace-bcnetwork: Blockchain network. You can directly upload the files to the server and then execute the scripts included in the project.

blockchain-trace-applets: Mini Program traceability module

blockchain-trace-pc: PC interface, built with RuoYi-Vue

blockchain-trace-basic-data: System basic data management backend, built with RuoYi

Frontend: Vue.js, Element UI, mpvue

Backend: SpringBoot, Mybatis, FastDFS, Node.js, Redis, MySQL

Blockchain: Fabric1.2

Smart Contracts: Golang

Environment: Ubuntu16.04 64-bit (2 CPU cores and 4 GB RAM or more recommended; 2 GB RAM can also run it), Docker, Docker-compose 

The blockchain component of this system is implemented using the simplest possible configuration. For example, it uses the built-in solo consensus mechanism, and the orderer node is configured as a single node. These configurations are certainly not suitable for real-world production environments. Therefore, this version is primarily intended to demonstrate the concept of an upper-layer application. In the future, we may rebuild a complete system based on this concept that is suitable for practical deployment.

Installation Guide

Detailed content, please refer to README.md document.

#1
资源直链https://gitee.com/steakliu/Blockchain-APTrace-Fabric
去下载
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare