AgriAdapt is a mobile and web platform that helps African farmers adapt to climate change using AI, IoT, and blockchain.
# AgriAdapt 🌱
## Overview
AgriAdapt is a **mobile and web platform** that helps African farmers adapt to climate change using **AI, IoT, and blockchain**. The platform provides real-time weather insights, AI-driven crop recommendations, IoT-based water optimization, and blockchain-based sustainability rewards.
---
## Features
✅ **Weather Forecasting:** Get real-time weather insights.
✅ **Crop Recommendation:** AI-driven crop selection based on climate conditions.
✅ **Water Optimization:** IoT-based precision irrigation using soil moisture data.
✅ **Sustainability Rewards:** Blockchain-based incentives for sustainable farming practices.
✅ **Community Hub:** Peer-to-peer knowledge sharing (future feature).
---
## Tech Stack
- **Backend:** Flask (Python), PostgreSQL, AI (TensorFlow), IoT (MQTT)
- **Frontend:** React (Web), React Native (Mobile)
- **Cloud:** AWS (Hosting, Database, IoT Integration)
- **Blockchain:** Ethereum/Solana for sustainability rewards
---
## Installation
### Backend Setup
1. Clone the repository:
```bash
git clone
github.com
cd AgriAdapt/backend
```
2. Create a virtual environment and install dependencies:
```bash
python3 -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install -r requirements.txt
```
3. Set up the database:
```bash
flask db init
flask db migrate
flask db upgrade
```
4. Run the Flask server:
```bash
python run.py
```
### Frontend Setup (Web)
1. Navigate to the frontend folder:
```bash
cd ../frontend/web
```
2. Install dependencies and start the React app:
```bash
npm install
npm start
```
---
## API Endpoints
### Weather
**GET** `/weather?location=city`
Get real-time weather data for a specific location.
**Example:**
```bash
curl "
127.0.0.1"
```
**Response:**
```json
{
"location": "Nairobi",
"temperature": 293.15,
"weather": "clear sky"
}
```
### Crop Recommendation
**GET** `/recommend-crop?condition=climate_co …