Decentralized agricultural supply chain on Stellar — harvest tokenization, escrow payments, on-chain credit scoring, and pre-harvest financing for African smallholder farmers.
# 🌾 AgroChain Africa — Decentralized Agricultural Supply Chain on Stellar
> Empowering smallholder farmers across Africa with transparent payments, on-chain credit history, pre-harvest financing, and immutable trade records — built on the Stellar blockchain.
---
## Table of Contents
- Overview
- Problem Statement
- Solution Architecture
- Tech Stack
- Project Structure
- Core Features
- Stellar & Soroban Integration
- Smart Contracts (Soroban)
- Backend — NestJS
- Frontend — Angular
- Off-chain Integrations
- Data Models
- API Reference
- Environment Variables
- Getting Started
- Testing
- Deployment
- Roadmap
- Contributing
- License
---
## Overview
**AgroChain Africa** is a full-stack decentralized application (dApp) that digitizes and trustlessly automates the agricultural supply chain — from planting season through post-harvest settlement. It connects smallholder farmers, aggregator cooperatives, commodity buyers, and financial lenders on a shared, tamper-proof ledger powered by the Stellar network and Soroban smart contracts.
The platform solves three compounding failures that lock African farmers in poverty cycles:
1. **Payment opacity** — farmers are paid weeks or months after delivery, at prices they didn't agree to
2. **Credit invisibility** — no formal credit history means no access to pre-harvest financing
3. **Post-harvest losses** — caused by inability to access storage financing or sell forward contracts
AgroChain Africa puts farmers in control: they tokenize their harvests, lock in buyer commitments via escrow, build on-chain credit profiles, and receive instant cross-border settlements — all from a feature phone via USSD or a smartphone app.
---
## Problem Statement
| Problem | Scale | AgroChain Response |
|---|---|---|
| 30–40% post-harvest losses | Sub-Saharan Africa | Pre-harvest forward contracts + escrow |
| 600M+ unbanked rural adults | Africa-wide | Stellar wallet + mobile money anchor |
| No formal credit for smallholders | 70% o …