Skip to content
Back to projects

ChainCacao

Tracking a batch of Togolese cocoa or coffee from the plot to the European importer, with proof anyone can check by scanning a QR code.

Context
Miabé Hackathon 2026, project T-01
Role
Alone on the web app, overall architecture
Result
10th in the national final, out of about 50 teams
Shipped
A React web app and a Flutter Android app

chaincacao-mvp.vercel.app

Loading the preview

Visit the production site
ChainCacao home page: the supply chain problem and the proposed solution
ChainCacao dashboard on a phone: export volumes over twelve months and split by buyer

The problem

A Togolese farmer grows quality cocoa and coffee but cannot prove where the harvest comes from or where it has been. Without proof, there is no access to premium certifications and, in time, no access to the European market.

The EU EUDR regulation (EU 2023/1115) requires, for each batch, the coordinates of every plot and proof of deforestation-free production after December 31, 2020.

The answer

  • The farmer records the plot by GPS and creates the batch on an Android phone, even without a network
  • Every transfer, from cooperative to processor to exporter, is recorded in a shared ledger
  • The journey ends with the exporter, with the EUDR certificate and the GeoJSON file expected by the EU TRACES system
  • The importer scans the batch's QR code and checks its full history, without creating an account

One principle holds it together: heavy files stay off the blockchain. Only their SHA-256 fingerprints and the batch metadata are recorded. Any change to a file becomes detectable.

ChainCacao home page: the headline on blockchain traceability of Togolese coffee and cocoa, and a batch's journey from producer to EU verifier
A batch's journey, from producer to EU verifier

The decisions that matter

  1. Proving without writing everything on chain. Putting GeoJSON files and photos on a blockchain would blow up costs. Only fingerprints go there; a visitor can download the file again, hash it and compare.
  2. Users without a wallet or transaction fees. Asking a farmer to manage cryptocurrency would have stopped adoption. A server function signs transactions with a single wallet. The trade-off: centralized signing in this first version, with personal wallets planned next.
  3. Choosing the chain. Polygon PoS, on the Amoy test network, for Ethereum ecosystem compatibility and low fees. Hyperledger Fabric was ruled out for its heavy deployment, the Ethereum main network for its fees.
  4. Plantations without coverage. In Wawa and Akébou, the signal does not always reach inside the plots. The Android app writes to the phone first, then syncs as soon as a connection returns, retrying at growing intervals on failure. GPS itself works without internet.
  5. Geographic data that TRACES accepts. A rejected GeoJSON makes the certificate useless. Before anything is recorded, the tool checks the reference system, coordinate precision, closed polygons and the absence of self-intersections.
  6. Staying consistent as four people on two technologies. API contracts, the contract schema and the database schema lived in a single document, and every change was announced to the team before being coded.

For the demo, the web interface reads the database first and falls back to sample data if a table is missing: a final should not depend on a fragile network.

My role

I coded the web app on my own and laid out the overall architecture: the split between web, mobile, database and blockchain. In the team of four, one person handled design, another the mobile app, the last the pitch presentation.

The demo flow really writes to Polygon Amoy: each record is an actual transaction on the test network, paid for by the server wallet. After many tests that wallet runs dry, and transactions fail until it is topped up.

The stack

Web: React 19, Vite, Tailwind CSS 4, React Router 7, Leaflet and OpenStreetMap, ethers. Mobile: Flutter, SQLite, native geolocation and scanning. Blockchain: Solidity 0.8.20, OpenZeppelin (ERC-721), Hardhat, Polygon Amoy. Data: Supabase, PostgreSQL with PostGIS, Row Level Security. Hosting: Vercel.

The repository is private: a demo is available on request.