# SalamaFarm Partner Agrovets
Vendor portal for registered SalamaFarm agrovet partners: store onboarding, inventory, M-Pesa (Paystack Kenya) counter sales, farmer messaging, and post-purchase follow-ups.
**Stack**
- **Backend** — Django REST API (JWT, multi-tenant store scoping) under `backend/`
- **Frontend** — React + TanStack Start / Vite under the repo root
- **Payments** — Paystack Kenya (subaccounts, M-Pesa charge, webhooks)
## Quick Start with Docker (Recommended)
**Prerequisites:** Docker and Docker Compose
```bash
# Clone and setup
git clone
cd SalamaFarm-Partner-Agrovets
# Copy and configure environment
cp .env.docker.example .env
# Edit .env with your SECRET_KEY, POSTGRES_PASSWORD, and Paystack keys
# Build and run all services
docker-compose up --build
# Access the application
# Frontend:
localhost
# Backend API:
localhost
# PostgreSQL: localhost:5432
```
**Development mode** (with hot-reload):
```bash
docker-compose -f docker-compose.yml -f docker-compose.override.yml up --build
# Frontend dev server:
localhost
# Backend with runserver:
localhost
```
## Manual Setup (Alternative)
**Prerequisites:**
- **Node.js** 20+ and **npm** (frontend)
- **Python 3.12** for the backend (prefer `/usr/local/bin/python3.12` on macOS Homebrew; do not use an older system Python)
- Django targets **5.2 LTS** (`Django>=5.2,<5.3`)
## Backend setup
```bash
cd backend
/usr/local/bin/python3.12 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env — set SECRET_KEY; add PAYSTACK_SECRET_KEY / PAYSTACK_PUBLIC_KEY for payments
python manage.py migrate
python manage.py runserver
```
API:
127.0.0.1
Admin: `/admin/` (`createsuperuser` when needed)
More detail: `backend/README-BACKEND.md`.
Default settings: `config.settings.dev`. CORS for local Vite origins (`5173`, `3000`, `8080`) is configured there.
## Frontend setu …