Skip to content

Developerkrushna/Agrokart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌾 Agrokart - Complete Three-Sided Agricultural Marketplace

A comprehensive mobile-first marketplace connecting farmers, vendors, and delivery partners in the agricultural ecosystem.

πŸš€ Overview

Agrokart is a complete three-sided marketplace that revolutionizes agricultural commerce by connecting:

  • Customers/Farmers - Browse and purchase agricultural products
  • Vendors/Suppliers - Sell fertilizers, seeds, and farming equipment
  • Delivery Partners - Earn by delivering orders to farmers

πŸ“± Platform Features

πŸ›’ Customer Side (Farmers)

  • Mobile-First Design - Optimized for smartphones with Flipkart-style navigation
  • Product Catalog - Browse fertilizers, seeds, and agricultural equipment
  • Smart Search - AI-powered product recommendations
  • Multi-language Support - English, Hindi, and Marathi
  • Order Management - Place, track, and manage orders
  • Payment Options - UPI, COD, and digital payments
  • AI Chatbot - 24/7 customer support in multiple languages
  • Labor Hiring - Find and hire agricultural workers

πŸͺ Vendor Side (Suppliers)

  • Vendor Registration - Complete onboarding with business verification
  • Inventory Management - Real-time stock tracking and alerts
  • Order Processing - Accept/reject orders with automated workflows
  • Earnings Dashboard - Track sales, commissions, and payouts
  • Analytics - Customer insights and sales performance
  • Document Verification - GST, business license, and bank details
  • Multi-location Support - Serve multiple states and districts

🚚 Delivery Side (Logistics)

  • Partner Registration - Driver verification with document upload
  • Assignment System - Real-time delivery assignments
  • Route Optimization - GPS-based navigation and route planning
  • Proof of Delivery - Photo and signature capture
  • Earnings Tracking - Transparent payment and commission system
  • Performance Metrics - Ratings and delivery statistics
  • Flexible Schedule - Choose working hours and service areas

πŸ›  Tech Stack

Frontend

  • React.js 18 - Modern UI framework
  • Material-UI 5 - Professional component library
  • Capacitor - Cross-platform mobile app development
  • Redux Toolkit - State management
  • React Router 6 - Navigation and routing
  • i18next - Internationalization
  • Lottie React - Animations

Backend

  • Node.js with Express - RESTful API server
  • MongoDB - NoSQL database with Mongoose ODM
  • JWT - Authentication and authorization
  • Multer - File upload handling
  • bcryptjs - Password hashing

Mobile

  • Capacitor - Native mobile app wrapper
  • Android Studio - Android development
  • Progressive Web App - Offline capabilities

External Services

  • Firebase - Authentication and push notifications
  • Google Maps API - Location and routing services
  • Payment Gateways - UPI, card, and wallet integration
  • SMS/Email Services - Notification delivery

πŸ— Architecture

Three-Sided Marketplace Model

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  CUSTOMERS  β”‚    β”‚   VENDORS   β”‚    β”‚  DELIVERY   β”‚
β”‚  (Farmers)  β”‚    β”‚ (Suppliers) β”‚    β”‚  PARTNERS   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                   β”‚                   β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚  AGROKART   β”‚
                  β”‚  PLATFORM   β”‚
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Order Workflow

Customer Order β†’ Vendor Notification β†’ Vendor Acceptance β†’
Inventory Check β†’ Packaging β†’ Delivery Assignment β†’
Route Optimization β†’ Delivery β†’ Proof of Delivery β†’
Payment Settlement

πŸš€ Getting Started

Prerequisites

  • Node.js 16+ and npm
  • MongoDB 4.4+
  • Android Studio (for mobile development)
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/your-username/agrokart.git
    cd agrokart
  2. Backend Setup

    cd backend
    npm install
    
    # Start MongoDB
    mongod
    
    # Start backend server
    npm start
  3. Frontend Setup

    cd frontend
    npm install
    
    # Start development server
    npm start
  4. Mobile App Setup

    cd frontend
    
    # Build for production
    npm run build
    
    # Sync with Capacitor
    npx cap sync android
    
    # Open in Android Studio
    npx cap open android
    
    # Or build APK directly
    cd android
    ./gradlew assembleDebug

Environment Variables

Create .env files in both backend and frontend directories:

Backend (.env)

MONGODB_URI=mongodb://127.0.0.1:27017/agrokart
JWT_SECRET=your-secret-key
PORT=5000
HOST=0.0.0.0

Frontend (.env)

REACT_APP_API_URL=http://localhost:5000/api
REACT_APP_FIREBASE_API_KEY=your-firebase-key

πŸ“ Project Structure

agrokart/
β”œβ”€β”€ frontend/                    # React + Capacitor mobile app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/         # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/             # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ VendorRegistrationPage.js
β”‚   β”‚   β”‚   β”œβ”€β”€ VendorDashboardPage.js
β”‚   β”‚   β”‚   β”œβ”€β”€ DeliveryRegistrationPage.js
β”‚   β”‚   β”‚   └── DeliveryDashboardPage.js
β”‚   β”‚   β”œβ”€β”€ services/          # API services
β”‚   β”‚   β”œβ”€β”€ context/           # React contexts
β”‚   β”‚   β”œβ”€β”€ locales/           # Translation files
β”‚   β”‚   └── utils/             # Utility functions
β”‚   β”œβ”€β”€ android/               # Android app files
β”‚   β”œβ”€β”€ public/                # Static assets
β”‚   └── capacitor.config.ts    # Capacitor configuration
β”œβ”€β”€ backend/                    # Node.js Express server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ models/            # MongoDB models
β”‚   β”‚   β”‚   β”œβ”€β”€ User.js        # Enhanced with vendor/delivery profiles
β”‚   β”‚   β”‚   β”œβ”€β”€ VendorInventory.js
β”‚   β”‚   β”‚   β”œβ”€β”€ DeliveryAssignment.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Earnings.js
β”‚   β”‚   β”‚   └── Notification.js
β”‚   β”‚   β”œβ”€β”€ routes/            # API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ vendor.js      # Vendor-specific endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ delivery.js    # Delivery partner endpoints
β”‚   β”‚   β”‚   └── orders.js      # Enhanced order management
β”‚   β”‚   β”œβ”€β”€ services/          # Business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ notificationService.js
β”‚   β”‚   β”‚   └── workflowOrchestrator.js
β”‚   β”‚   └── middleware/        # Authentication & validation
β”‚   └── uploads/               # File storage
β”œβ”€β”€ docs/                      # Documentation
└── README.md                  # This file

πŸ”— API Endpoints

Customer APIs

  • POST /api/auth/register - Customer registration
  • GET /api/products - Browse products
  • POST /api/orders - Place order
  • GET /api/orders/my-orders - Order history

Vendor APIs

  • POST /api/vendor/register - Vendor registration
  • POST /api/vendor/upload-documents - Document verification
  • GET /api/vendor/dashboard - Vendor dashboard data
  • GET /api/vendor/inventory - Inventory management
  • POST /api/vendor/orders/:id/respond - Accept/reject orders

Delivery APIs

  • POST /api/delivery/register - Delivery partner registration
  • GET /api/delivery/dashboard - Delivery dashboard
  • GET /api/delivery/assignments/available - Available deliveries
  • POST /api/delivery/assignments/:id/accept - Accept delivery
  • POST /api/delivery/assignments/:id/status - Update delivery status

πŸ“± Mobile App Features

Customer App

  • Home Screen - Featured products and categories
  • Product Catalog - Browse with filters and search
  • Cart & Checkout - Seamless ordering experience
  • Order Tracking - Real-time delivery updates
  • Profile Management - Account and preferences
  • AI Chatbot - Multilingual customer support

Vendor App

  • Dashboard - Sales analytics and KPIs
  • Inventory - Stock management with alerts
  • Orders - Process and fulfill customer orders
  • Earnings - Revenue tracking and payouts
  • Analytics - Customer insights and trends

Delivery App

  • Assignment Board - Available delivery jobs
  • Navigation - GPS-guided route optimization
  • Proof of Delivery - Photo and signature capture
  • Earnings Tracker - Payment and commission details
  • Performance - Ratings and delivery statistics

Contributing

Please read our contributing guidelines before submitting pull requests.

License

This project is licensed under the MIT License.

About

Agrokart - Quick Agricultural products delivery platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors