# Shamba Guard
**A Parametric Crop Insurance & Carbon Credit Platform for Smallholder Farmers**
*Protecting yields, predicting droughts, and rewarding sustainable farming*
Architecture • User Interfaces • Backend Setup • Roadmap • Contributing
Shamba Guard is an end-to-end agricultural platform designed to provide automated, oracle-triggered insurance payouts for farmers in Kenya based on satellite-verified drought metrics. It eliminates the need for manual claim processing and empowers farmers to generate carbon credits through sustainable farming practices.
## Project Architecture
This repository is a full-stack monorepo containing the Android client application, the Python backend services, and the decentralized smart contracts.
### Frontend (Android)
- **Tech Stack:** Kotlin, Jetpack Compose, Material 3, Dagger-Hilt, Room, WorkManager, Retrofit.
- **Key Features:** Offline-first syncing for low-connectivity areas, Google Maps integration for precise farm polygon drawing, CameraX with EXIF metadata for secure evidence capture, and M-Pesa STK Push integration.
- **Documentation & Setup:** Please see the Android Client README for detailed prerequisites, architecture documentation, and setup instructions.
### Backend (FastAPI)
- **Tech Stack:** Python, FastAPI, SQLAlchemy, MySQL, Celery, Redis.
- **Key Features:** Secure JWT role-based authentication (Admin, Agent, Farmer), geospatial data processing (GeoJSON polygons), Celery pipelines for background NDVI calculation (via Sentinel-2 APIs), and automated smart contract payout triggers.
- **Documentation:** Review the FullStack Product Requirements Document for detailed API contracts and system workflows.
### Blockchain & Smart Contracts (Coming Soon)
- **Tech Stack:** Solidity, Polygon (Matic) Network, Chainlink Oracles, IPFS.
- **Key Features:**
- **Parametric Insurance Contracts:** Immutable smart contracts holding pool liquidity.
- **Oracle Triggers:** Integration with decentralized oracles (e. …