Inspiration
I learnt that in December 2026, Europe's Deforestation Law will take effect. I know that it has the right purpose: Stopping the trade from forests that have gone through deforestation. However, as a Peruvian I know for a fact that much of the exports of our country and our economy depend on agroexports. Coffee and cacao are both valuable assets that we and for the most part many small farmers really need just to bring bread to the table.
Unfortunately, many farmers simply do not have the ability to prove that their coffee was grown in non deforested land, so there is a genuine need for geolocated, audit-proof evidence that these innocent farmers did not cut down a forest to produce their resources. This way, an importer would safely sign the Due Dilligence Statement that the import was produced with negligible risk of deforestation.
So Origen/Origin exists so that farmers, however small, in the Andes and a buyer in Europe can both stand on the side of a rightful environmental regulation and connect together for what will be a better economic & natural environment for us all.
What it does
The product starts from an app where a field agent is given a set of producers (farmers/owners of the agriculture land) by the organism they are a member of. They will walk the field on a cheap phone which is assumed to have no signal but will sync the GPS data later when they reach a warehouse/cooperative. This way a GEOJson is acquired.
Origen will then map every producer's plot GEOJson sent to FAO's oepn Whisp Service, this reads free global satellite archives, and will then use Python to evaluate the risk of the land having been in deforested area against the satellites data by the 2020 cutoff that the EU imposes in their regulation.
I added additional functions to guarantee the whole chain is properly recorded, which I guess is an operational layer cause it produces one record for the farmer, cooperative entities (exporter, warehouse agents and field agents) and buyer. But most importantly it is audit-ready so that the product itself is defensible into how and when it was produced throughout the whole process.
How we built it
So there are two apps:
- Offline-first field App built with React native / Expo: This is mainly for the field agent (Which we refer to as "tecnico") who will most likely register the plot in a place with no internet, and as such needs a way to sync that data once it finds a signal to supabase, for that I decided that PowerSync matched the use of Supabase already but this was my first time using PowerSync and I actually thought it went great.
- Console: This is mainly for observation, membership management and for the exporter's view, and also for the operational layer. It showcases all the registers of how the coffee has been handled. Underneath, it uses Postgres with PostGIS because of the geospatial nature of the task, and again Supabase and Powersync to reconcile the phone information with the cloud.
- Deforestation Assessment: The boundaries of the plot or the captured GEOJson to be more specific are sent to FAO's Whisp Service, it uses Python to judge whether or not it fits the EU criteria which is just the 2020 cutoff for there being forest in that land. I decided to showcase a simple schema of what the 2020 cutoff pixels show for forest and deforested areas by the cutoff and even before the cutoff (though only the cutoff matter for this project).
Challenges we ran into
The idea or concept was clear, but I had never used Powersync because I never considered a software that required syncing data because being offline was a product requirement and while I have used Android Studio before, I also had to deal with a device that was on the lower end of capabilities.
Additionally I had to keep the device offline and then put it back online constantly during testing so that was annoying, but not much of a difficulty.
Lastly, for the design choices I had to keep it simple right? Cause if I am trying to build a product for farmers then the UI/UX needs to be as intuitive as possible to South Americans. That's why I decided to mostly use a familiar interface to that of WhatsApp, that was the inspiration I had for UI/UX because it is the default communication app for us. But then there was also decision making on what the logic should be for how to present information to the field agents which I thought that a simple to-do list was the way, but I am still second guessing cause maybe there were better choices along the line I just missed.
Accomplishments that we're proud of
The platform works end to end. It does have the boundary collection into a GEOJson, it is tested against satellite data that provides a source of truth to our farmers. I think that the added value is what I am most proud of. I think that the design really puts trust first as a concept and is simple enough for anyone to use, so I am definitely stoked that people who need this software are actually gonna be able to use it.
What we learned
I learned PowerSync existed and is a really powerful tool as a sync engine. I also had to do a lot of research into what the rules are and what the operational layer of agriculture in my country looks like. The EUDR actually sustains that the land must be both deforestation free until the 2020 cutoff and that it must be produced legally within the country's laws. It was not really my main focus for this project, but I also ensured that farmers will collect data that ensures that they are producing the coffee and cacao legally within the country which just meant satisfying certain tenure requirements (which is actually difficult to put as low risk for most smallholders) and additional API checks with the Peruvian Government.
What's next for Origin/Origen
A pilot for this project with a real cooperative in my home country would definitely be very nice, I would like to help farmers produce and keep doing the great work that they do for their families and the country. What I also think is valuable is creating a long road of trusted records for the farmers, I think that is very valuable in a country that primarily runs in informality. I truly believe that this layer of operation could prove valuable to us.
Built With
- expo.io
- fao-whisp
- geojson
- google-earth-engine
- jrc-global-forest-cover
- openforis
- postgis
- postgresql
- powersync
- react
- react-native
- sql
- supabase
- typescript
Log in or sign up for Devpost to join the conversation.