A full-featured web application connecting farmers directly with agricultural buyers, featuring real-time vehicle booking, tracking, billing, and integrated UPI payments.
- User authentication (email/phone)
- Profile management with Aadhar verification
- Browse available buyer listings with commodity filtering
- Filter buyers by price, distance, quality, and payment conditions
- Select preferred buyers for selling produce
- Book transportation vehicles with real-time tracking
- Track vehicle location and arrival status
- Receive payment through UPI integration
- User authentication (email/phone)
- Complete business profile with GSTIN
- Create commodity listings (Wheat, Rice, Maize, Barley, Paddy, Oilseeds, etc.)
- Manage buy listings and update prices dynamically
- View farmer details and locations
- Manage incoming orders
- Create billing and invoices
- Send payments to farmers via UPI
- Register vehicles (mini-trucks, pickup vans, big trucks)
- List vehicles with capacity and pricing
- Manage vehicle availability
- Track active bookings
- Real-time location updates
- Razorpay integration for UPI payments
- Secure payment processing
- Payment verification
- Transaction history
- Next.js 16 - React framework with App Router
- TypeScript - Type safety
- Tailwind CSS - UI styling
- React Hook Form - Form management
- Next.js API Routes - Serverless backend
- MongoDB - NoSQL database
- Mongoose - ODM for MongoDB
- JWT - Authentication tokens
- bcryptjs - Password hashing
- Razorpay - Payment processing
- Node.js 18+
- npm or yarn
- MongoDB Atlas account
- Razorpay account
-
Install dependencies
npm install
-
Setup environment variables
cp .env.local.example .env.local
-
Configure .env.local with your credentials
-
Run development server
npm run dev
-
Open browser
http://localhost:3000
agrieasy/
├── app/
│ ├── auth/ # Authentication pages
│ ├── farmer/ # Farmer portal
│ ├── buyer/ # Buyer portal
│ ├── transporter/ # Transporter portal
│ └── api/ # API routes
├── lib/
│ ├── models/ # MongoDB schemas
│ └── mongodb.ts
├── public/ # Static assets
└── package.json
POST /api/auth/register- Register new userPOST /api/auth/login- Login user
GET /api/listings- Get all listings with filtersPOST /api/listings- Create new listing
GET /api/bookings- Get user bookingsPOST /api/bookings- Create new booking
GET /api/vehicles- Get available vehiclesPOST /api/vehicles- Add new vehicle
GET /api/billing- Get billing recordsPOST /api/billing- Create billing
POST /api/payment- Initialize paymentPOST /api/payment/verify- Verify payment
The project is ready to deploy to Vercel:
- Push to GitHub
- Connect to Vercel
- Add environment variables
- Deploy
MIT License - see LICENSE file for details.
AgriEasy.com - Empowering farmers and buyers through direct digital commerce.