Building the Fit Project

  • By Sebastian Priolo in Apps
  • 12 Oct 2020
  • 7 min read

Introduction

I’ve been working on generic immutability solutions for a while. However, a few months ago, I decided to "forget" everything I learned previously and focus on generating very specific products that solve real and daily problems. For that purpose, I decided to review existing technologies and arm myself with a new toolbox to build solutions. After researching and testing different technologies I stumbled upon Lisk and found its possibilities and community fascinating. This is a short story of how I built my first Lisk PoC, and how I’m going to turn it into a real application for a company that wants to transform the way healthy food is marketed.

 

Global Context

Consumers are progressively adopting healthier habits, which includes nutrient-rich food, with a critical eye on sustainability. To satisfy this growing demand, new products and services are emerging, ranging from locally produced organic food stores to personalized diet services based on physique and daily activity.

One of the biggest problems facing the entire supply-chain (not just the consumer), is the lack of transparency. From the moment a grain is sown in the ground until the time it's consumed, it goes through a number of steps (harvest, collection, transformation, packaging, delivery), that are mostly opaque to both the consumer, as well as each intermediary in the chain.

Each actor performs internal control on their domain, however this information is usually not shared. This type of fractional and dispersed information does not allow traceability to be generated in a simple way, and also complicates the participation of new actors in the production process. More importantly, the information that reaches the consumer is generally only the one that the last link in the chain deemed to be important, which is reflected on the information printed on the rear of the packaging.

 

What is “Fit”?

Although we as technologists assume that all actors in our society have access to unimaginable amounts of technology and tools, reality has shown me that in the healthy food sector, and specially small producers (at least in our region), have few alternatives to reach out to their customers with a more detailed narrative regarding how their products are sourced, processed, and brought to market; and specifically how they differ from other producers. I understood that the solution was to find an anchor point and try to build from there. Luckily it transpired that a certain store had the same idea, promoting all of this information themselves,and guaranteeing to their customers that the producers they select are working in a correct and transparent manner. For this they decided to become "oracles" of processes and began to share this information in an open network between the producers and the end customers.

Fit is a e-commerce project for a healthy food store (FitMarket Argentina), aiming to offer more transparency to its consumers regarding food, sustainability and processes, and a new information channel to its suppliers using a network and a mobile app.

We started by defining certain types of "tasks" (which are going to coincide in a certain way with the transactions), that Fit was going to administer, and these tasks can be seen listed below:

1. Select the best possible producers / suppliers based upon how they treat the product, respect for the environment, etc. If we think about this from a technical point of view, they would register the producer. (Custom transaction: Register Producer)

2. For some time they would observe the way in which the producer develops his activity and they would generate stamps or reports (this is not modeled yet, as it  has just started !!)

3. The producer sends the product to Fit (Register Product, where information that both consider important is loaded).

4. Fit receives the product, checks it, stores it, seals it. (Finish Transport & Update Product Info)

5. A customer acquires the product and Fit sends it, (Not in the demo but really similar to the Supply Chain example: https://lisk.io/documentation/lisk-sdk/tutorials/transport2.html).

6. The customer receives the package (it is registered, this is open and gives information to the entire chain! Check it out: http://169.57.173.116:3000/)

7. The customer requires information about what was purchased or about a product of interest.

It is quite evident that many of the issues described t appear to be quite obvious and simple. Nevertheless, the fact remains that a store which is trying to generate a chain of transparency, in order  to differentiate itself from other stores, whilst simultaneously collaborating with producers, and evangelizing the benefits of technologies is quite fascinating.

 

So how does it work?

General Diagram

 

 

Implemented Custom Transactions

 The Fit Market proof of concept consists of the following seven custom transactions:

  •  Register Market
  •  Register Producer
  •  Register Product
  •  Register Pallet
  •  Start Transport
  •  Finish Transport
  •  Update Product Info

 

1. Register Market

The register market custom transaction lets Fit Market register a new distribution center, entering its name and location, which will later be displayed on a map to trace a product's journey from field to customer:

 

2. Register Producer

The register producer custom transaction lets Fit Market register a new approved healthy food provider, entering its name and location. It will later be possible to add the producer's history, thus creating a direct communication channel between producers and customers.

 

3. Register Product

This allows a producer to register a new product batch. The required barcode and batch ID will enable clients to search a product's information by scanning them with Fit Market's app.

 

4. Register a Pallet

Products are usually shipped to Fit Market distribution centers in bulk. This custom transaction will enable  producers to prepare a batch and have it ready for shipment.

 

5. Start Transport

Similar to Lisk's supply chain example, the start transport transaction is launched by a carrier, who will transport the pallet from the producer to Fit Market. It will lock the security fee from the carrier's balance while the shipment is ongoing.

 

6. Finish Transport

 Similar to Lisk's supply chain example, the finish transport transaction let's Fit Market announce the success or failure of the shipment after the delivered product's inspection.

 

7. Update Product Info

Small local producers usually don't have the required skills or tools to give additional information about their products directly to their customers. This transaction allows Fit Market to fill in the gaps.

This information help's Fit Market's clients have actionable information about their products, specially for those who have specific dietary needs.

 

Components of the PoC

  • Back-end: Working custom transactions that can run on Lisk.
  • Front-end:  a minimal ExpressJS front-end to register markets, producers, products & pallets, start and finish transports, and update key product information (interact with transactions).

 

Front-end

From the beginning I wanted to separate the project from the POC and the front-end from the back-end. It has really been quite complex to establish this, especially when the POC is mutating to a "real project". However, I am sure that one of the keys to overall user adoption is related to usability. That's why I'm still working on the final interfaces, but a reference to them can be seen below:

 

screen 1screen 2screen 3

 

 

Resources

 

Conclusions

My conclusions consist of the following observations, one regarding the technical side and about Lisk in particular, and a general one about food traceability.

From a technical viewpoint the possibilities that Lisk offers and especially its community and its constant desire to be a useful tool to develop solutions do not cease to impress me. I think great things can only be expected from this technology together with the team behind it, and I will continue to become more and more involved in it.

Regarding the case of food traceability, in which I will surely continue working, I can only state that there is a distinct lack of knowledge  by the general public, and also in some cases professionals and technologists, regarding new technologies, and also how to take advantage of them to change the processes of production, consumption, information and therefore our daily lives. Beyond the great statements that we continually read and consult, the penetration that this originates in other sectors is minimal and I believe we have a great possibility of working to improve in the future.

 

Future developments

Luckily this project continues on and is growing larger and larger having many participants wanting to be part of it.  Furthermore, Fitmarket will open its first branch in Switzerland in 2 weeks.

Regarding the technical issues, I intend to add information on sustainability by crossing not only information provided by the relevant actors, but also its crossing with geospatial information. In addition,  I do not rule out the use of remote sensors to automate part of the processes. I will need to evangelize about technologies, improve the frontend, and begin to integrate chains of different types of information on the same source. I think I have an interesting challenge ahead of me, although fortunately I have found technologies and tools that provide me with viable alternatives as well as a very active community.

 

If you feel inspired and want to build your own proof of concept blockchain application, check out the Lisk Builders program. More information about the program and the application procedure can be found on the Lisk webpage for the Lisk Builders program.

Disclaimer: This blog post was written by our community member, Sebastian Priolo as part of his participation in the Lisk Builders program. 

 

Sebastian Priolo

Engineer. CTO. Entrepreneur & Advisor.
Specializations in Data Science Management, Blockchain & Open Source
Agile Master & Certified Agile Trainer