🌾 Farm Millet

Complete Backend API for Supply Chain & Marketplace

Technology Stack

PHP 8+ Pure PHP Backend
MySQL InnoDB Engine
JWT Authentication
PHPMailer SMTP Email
Razorpay Payment Gateway
PDO Database Security
READY

🚀 Quick Start

Get started with the backend in minutes

  • Composer dependencies installed
  • Database schema ready
  • Environment configured
  • API routes defined
Test Connection

📚 Documentation

Complete guides and references

  • Setup Guide
  • API Testing Examples
  • Project Structure
  • Quick Start Guide
View Docs

🔐 User Roles

Three distinct user types

  • Farmer - Supply Management
  • SHG/FPO - Processing & Sales
  • Consumer - Orders & Tracking
API Examples

✨ Features

  • OTP-based registration
  • Email verification (SMTP)
  • JWT authentication
  • Supply chain tracking
  • Traceability records
  • Order management
  • Payment integration
  • Status timeline

🛡️ Security

  • Password hashing
  • SQL injection prevention
  • Input validation
  • Role-based access
  • JWT middleware
  • HTTPS ready

📊 Database

  • 12 optimized tables
  • Foreign key constraints
  • Indexed queries
  • InnoDB engine
  • UTF-8 support
  • Extensible schema

API Base URL

<<<<<<< HEAD http://localhost/Millets1/api/ ======= http://localhost/Millets/api/ >>>>>>> 79dbae34229155f1c8d67de204c85df212678a23

All endpoints return JSON responses

🌾 Farmer APIs

Supply management and analytics

POST /api/farmer/supply GET /api/farmer/supply GET /api/farmer/payment-history GET /api/farmer/sales-summary

🏢 SHG/FPO APIs

Processing and product management

GET /api/shg/supply PUT /api/shg/supply/accept/{id} POST /api/shg/product PUT /api/shg/order/status/{id}

🛒 Consumer APIs

Shopping and order tracking

GET /api/consumer/products POST /api/consumer/order GET /api/consumer/order GET /api/consumer/order/{id}/track