# AgriAI Africa MVP
AgriAI Africa is an intelligent agriculture management platform that helps farmers monitor their farms, track fields, and get AI‑driven yield predictions based on soil type and field data. The MVP includes user authentication, farm/field management, and a mock AI prediction endpoint, built with modern technologies on both backend and frontend.
---
## Table of Contents
- Overview
- Key Features
- Tech Stack
- Architecture
- Getting Started
- Prerequisites
- Backend Setup
- Frontend Setup
- API Documentation
- Frontend Overview
- Deployment
- Contributing
- License
---
## Overview
Farmers often lack easy‑to‑use tools to digitise their field data and receive actionable insights. AgriAI Africa provides a simple interface to:
- Register and manage user accounts.
- Create farms and fields with details such as area, soil type, and current crop.
- Get AI‑powered yield predictions based on soil and area (mock version for MVP, ready to integrate a real model).
The project is split into two main parts:
- **Backend** – RESTful API built with Node.js, Express, TypeScript, Prisma, and SQL Server.
- **Frontend** – React single‑page application using TypeScript, Tailwind CSS, shadcn/ui, Zustand, React Query, and React Router.
---
## Key Features
- **User Authentication** – Register, login, and JWT‑based protected routes.
- **Farm Management** – Create, view, update, and delete farms.
- **Field Management** – Within each farm, manage fields with name, area, soil type, and crop.
- **AI Predictions** – Submit soil type and area to receive a mock yield prediction (confidence and recommendation).
- **Responsive UI** – Mobile‑friendly design with shadcn/ui components.
- **State Management** – Zustand for auth, React Query for server state.
- **Type Safety** – Full TypeScript support on both ends.
---
## Tech Stack
### Backend
- **Runtime**: Node.js
- **Framework**: Express
- **Language**: TypeScript
- **ORM**: Prisma with SQL Server
- **Authentication* …