Agal

How it works

From a farmer's phone at the water's edge to a permanent, verifiable record. Here's the full path a single harvest takes through Agal.

  1. 1

    Log it, even offline

    A farmer records a harvest or a handoff on their phone. It's written straight to a local database on the device -- no connection required, and nothing is ever lost if the app closes or the signal drops.

  2. 2

    Sync when you can

    The app pushes queued records to the Agal server as soon as a connection is available, in the background. Every record carries an id generated on the device, so replaying the same sync twice is harmless -- the server just recognizes it's already there.

  3. 3

    Recorded as history, not a snapshot

    Nothing about a batch is ever overwritten. Every step -- harvested, drying, dried, handed to a supplier, sold, exported -- is stored as its own permanent entry. A batch's current status is simply the latest entry in that history, so the full sequence of what happened is always there to inspect.

  4. 4

    Hashed and anchored on-chain

    The server computes a cryptographic fingerprint (a keccak256 hash) of each event and submits it to a smart contract on a public blockchain. Only that fingerprint goes on-chain -- never the farmer's name, the price, or any other plaintext detail.

  5. 5

    Verifiable by anyone

    Because the fingerprint is public and the event that produced it can be re-fetched from Agal, anyone -- a buyer, an exporter, an auditor -- can recompute the same hash and confirm it matches what's on-chain. If a record were ever altered after the fact, the hashes would no longer match.

Under the hood

Mobile app
Flutter, with an on-device database for the offline-first Farmer experience.
Backend
A REST API backed by PostgreSQL, storing every chain-of-custody event as an immutable record.
Ledger
A smart contract on a public Ethereum test network, anchoring one hash per event.

Curious what this looks like day-to-day for each role? Read the user manual, or go back to the project overview.