An AI-powered farming assistant designed to support smallholder and new farmers in Ghana.
# 🌿 Nkɔsoɔ AI
### AI-Powered Farming Assistant for Ghana & West Africa
**Nkɔsoɔ** means *growth* in Twi — and that is exactly what this tool is built for.
Nkɔsoɔ AI helps smallholder farmers in Ghana make better decisions about weather, crop prices, pest management, and farming practices — powered by Claude AI (Anthropic) and built with Python and Flask.
---
## Features
| Feature | Description |
|---|---|
| 🌤 Live weather | Real-time 7-day forecasts for all 16 Ghana regions via Open-Meteo |
| 📈 Market prices | Current GHS prices for maize, cassava, tomatoes, plantain, cocoa and more |
| 🐛 Pest alerts | Active pest and disease alerts with affordable local treatment tips |
| 📷 Photo diagnosis | Upload a photo of a sick crop — AI identifies the disease instantly |
| 🤖 AI farming chat | Ask any farming question in English or Twi — expert answers in seconds |
| 🌍 16 Ghana regions | Weather tailored to every region from Accra to Bolgatanga to Wa |
| 🇬🇭 Twi language | Full interface and AI responses available in Twi |
| 💳 Paystack payments | GHS 30/month Pro plan via MTN MoMo, Telecel Cash, or card |
| 📊 Usage limits | Free users get 5 questions/day — Pro users get unlimited access |
| 🔒 Admin dashboard | Private dashboard at /admin showing users, revenue, and top questions |
---
## Tech Stack
| Layer | Technology |
|---|---|
| Backend | Python 3.12, Flask |
| AI | Anthropic Claude (claude-sonnet-4) |
| Weather | Open-Meteo API (free, no key needed) |
| Payments | Paystack (Ghana Mobile Money + card) |
| Database | SQLite (built into Python, zero config) |
| Deployment | Render.com |
| Frontend | HTML, CSS, Vanilla JavaScript |
---
## Project Structure
```
nkosoo-ai/
├── app.py # Main Flask app — all routes, AI, payments, admin
├── requirements.txt # Python dependencies
├── Procfile # Render start command
├── README.md # This file
└── templates/
├── index.html # Main farmer-facing UI
├── admin.html …