Blockchain-backed supply chain & marketplace platform for Lesotho's wool and mohair farmers. SHA-256 provenance hashing, Digital Passports, field agent verification, and export certificates. Ho tloha polasing ho ea 'marakeng.
# LS-AgriFlow
## *Ho tloha polasing ho ea 'marakeng*
### From farm to market Β· Lesotho Agricultural Supply Chain Platform
Smart contract namespace: **`LSAgriFlow_Supply_v1`**
---
## What It Does
**LS-AgriFlow** is a blockchain-backed AgriCommerce platform for Lesotho's wool and mohair sector.
- π¨βπΎ **Farmers** register produce batches β receive a cryptographic **Digital Passport** (SHA-256 hash + QR code)
- π **Field Agents** verify or reject batches β each action is an immutable, chain-linked ledger transaction
- π **Buyers** browse a verified marketplace, purchase batches, and receive blockchain-certified **export certificates**
- π **Ministry Officers** view national analytics, the full immutable ledger, and export PDF reports
---
## Branding
| Element | Value |
|---|---|
| Platform name | LS-AgriFlow |
| Sesotho tagline | *Ho tloha polasing ho ea 'marakeng* |
| English tagline | From farm to market |
| Logo mark | Mokorotlo (Basotho conical hat) SVG β `src/components/Logo.jsx` |
| Smart contract name | `LSAgriFlow_Supply_v1` |
| Verify domain | `ls-agriflow.gov.ls` |
| localStorage prefix | `lsagriflow_` |
| Window global | `window.__lsagriflow__` |
---
## Tech Stack
| Layer | Technology |
|---|---|
| Frontend | React 18 + React Router 6 |
| Styling | Custom CSS design system (no framework) |
| **Blockchain** | **Hardhat + ethers.js v6 + MetaMask** |
| **Smart Contracts** | **Solidity 0.8.19 (Sepolia Testnet)** |
| Blockchain simulation | crypto-js SHA-256, chain-linked transactions |
| QR Codes | qrcode.react |
| Charts | Recharts |
| Persistence | Browser localStorage + **Ethereum Blockchain** |
| Build tool | Vite 5 |
| **Web3 Integration** | **Web3Manager Class + WalletConnect** |
---
## Prerequisites
- **Node.js** v18 or higher β
nodejs.org
- **npm** v9 or higher (bundled with Node.js)
- **MetaMask** browser extension β
metamask.io
- **Sepolia Testnet ETH** (free from
sepoliafaucet.com)
Verify:
```bash
node --version β¦