FarmChain: Blockchain-Powered Food Transparency
A blockchain-based system to verify food origin and ensure farmers get direct tips. Know where your food really comes from.
Technologies
The Problem I Saw
One day at a supermarket, I picked up an orange with a sticker that said “100% Organic - No Chemicals Used”.
But how do I really know?
Who grew this? Where did it come from? Did it actually travel from an organic farm, or did someone just slap a sticker on it? There’s no way to verify.
Another Problem: Tips Never Reach Farmers
In Sri Lanka, when we buy vegetables or fruits, we often want to give a small tip — maybe just 10 or 20 rupees — to appreciate the hard work behind our food.
But here’s the sad truth: that tip never reaches the farmer.
It stays with the shopkeeper. The farmer who woke up at 4 AM, worked in the sun, and carefully grew that food? They never see a single rupee of appreciation.
The Solution: FarmChain
I built FarmChain — a blockchain-based traceability system that solves both problems.
🔍 Verify Before You Buy
Every product gets a QR code. Scan it and instantly see:
- Who grew this (the farmer’s name)
- Where it came from (location, farm name)
- When it was harvested
- How it traveled (packaging, transport, distributors)
- Who handled it along the way
All of this is stored on a blockchain — meaning nobody can edit or fake the data. Once recorded, it’s permanent and tamper-proof.
💰 Tip the Farmer Directly (Future Feature)
With blockchain, we can enable direct tips to farmers. When you scan the QR code and see the farmer’s hard work, you can send them a small appreciation — and it goes directly to them, not the middleman.
Why Blockchain?
You might ask: “Why not just use a normal database?”
Here’s why:
| Normal Database | Blockchain |
|---|---|
| Data can be edited by admin | Data is permanent |
| Trust the company | Trust the technology |
| Single point of failure | Distributed and secure |
| Easy to manipulate | Tamper-proof |
When you scan a FarmChain QR code, you’re not trusting a company’s promise — you’re trusting cryptographic proof.
How It Works
Farmer → Harvest → Pack → Transport → Distributor → Shop → You (scan QR)
↓ ↓ ↓ ↓ ↓ ↓
└─────────────── All recorded on blockchain ───────────────┘
Each step is:
- Digitally signed by the actor (farmer, transporter, etc.)
- Timestamped automatically
- Linked to the previous step
- Stored permanently on the blockchain
What I Built
A complete system with:
- Farmer Dashboard — Record harvests, pack products, generate QR codes
- Buyer/Distributor Dashboard — Split lots, transfer to shops
- Consumer Interface — Scan QR codes, see full product history (no login needed!)
- REST API — For integrating with other systems
- Secure Authentication — Farmers and buyers have separate accounts
Tech Stack
- Python Flask (Backend)
- SQLite + Blockchain (Data storage)
- Cryptography (Digital signatures)
- QR Code Generation
The Vision
Imagine a future where:
- You buy a mango and know exactly which tree it came from
- You can thank the farmer with a small tip directly
- Fake “organic” labels become impossible
- The humble farmer finally gets the recognition and reward they deserve
That’s the future FarmChain is building towards.
Try It Yourself
The project is open source. Clone it, run it, and trace your first product:
https://github.com/NipunSGeeTH/FarmChain-Blockchain
Want to know more about blockchain and how it works?
https://nipunsgeeth.top/projects/What-is-Blockchain
Built with passion for Sri Lankan farmers and honest food.
#Blockchain #AgriTech #FoodTransparency #SriLanka #FarmChain