How rishabh01487/agrieasy-com1 works
AgriEasy is a multi-role agricultural marketplace, with AgriSocial, AgriPay and billing as substantial companion products. The main marketplace journey is buyers publishing commodity demand, farmers discovering it and arranging transport, then the parties tracking delivery and settling payment. The graph also preserves social publishing and messaging, wallet operations, and ledger-based billing. README statements establish the documented product flows; sampled route excerpts show selected API-to-model and shared-service relationships. Many routes and UI pages were not sampled, so their internal wiring is not inferred.
Main entry points: bookings/route.ts Bookings · page.tsx Social Feed & Posts · mongodb.ts MongoDB · listings/route.ts Demand Listings
Components 26
Marketplace & Transport
- Buyer Portal
app/buyer/create-listing/page.tsx - Demand Listings
app/api/listings/route.ts - Farmer Portal
app/farmer/book-vehicle/page.tsx - Bookings
app/api/bookings/route.ts - Location & Tracking
app/api/location/route.ts - Transporter Portal
app/transporter/bookings/page.tsx - Booking Records
lib/models/Booking.ts - Listing Records
lib/models/Listing.ts
AgriSocial
- Social Feed & Posts
app/agrisocial/page.tsx - Social APIs
app/api/social/posts/route.ts - Direct Messages
app/agrisocial/dm/page.tsx - KrishiClips
app/agrisocial/clips/page.tsx
Payments & Ledger
- AgriPay Wallet
app/agripay/page.tsx - Wallet & Payments
app/api/agripay/transfer/route.ts - Billing & Ledger
app/ledger/page.tsx - Bill Calculator
app/ledger/BillCalculator.tsx - Ledger API
app/api/ledger/route.ts
Identity & Data
- Registration & Login
app/auth/register/page.tsx - JWT Authentication
lib/auth.ts - User Profiles
lib/models/User.ts - MongoDB
lib/mongodb.ts - Audit Logging
lib/audit.ts
Other components
- Buyer
- Farmer
- Transporter
- Razorpay
Connections 29
- Buyer → Buyer Portal: creates demand
- Buyer Portal → Demand Listings: submits listings
- Demand Listings → Listing Records: creates & queries
app/api/listings/route.ts - Farmer → Farmer Portal: finds demand
- Farmer Portal → Bookings: books transport
- Bookings → Booking Records: creates & queries
app/api/bookings/route.ts - Bookings → Listing Records: checks listings
app/api/bookings/route.ts - Bookings → Audit Logging: records actions
app/api/bookings/route.ts - Transporter → Transporter Portal: manages bookings
- Farmer → Location & Tracking: shares location
- Location & Tracking → User Profiles: updates location
app/api/location/route.ts - Location & Tracking → Booking Records: updates tracking
app/api/location/route.ts - Farmer → Social Feed & Posts: posts & browses
- Social Feed & Posts → Social APIs: uses social features
- Social Feed & Posts → Direct Messages: messages users
- Social Feed & Posts → KrishiClips: browses clips
- Buyer → AgriPay Wallet: pays farmers
- Farmer → AgriPay Wallet: receives payments
- AgriPay Wallet → Wallet & Payments: initiates wallet actions
- Wallet & Payments → Razorpay: tops up via
- Buyer → Billing & Ledger: creates invoices
- Billing & Ledger → Bill Calculator: calculates bills
app/ledger/page.tsx - Billing & Ledger → Ledger API: manages entries
- Ledger API → MongoDB: connects to
app/api/ledger/route.ts - Registration & Login → JWT Authentication: authenticates
- JWT Authentication → User Profiles: checks revocation
lib/auth.ts - JWT Authentication → MongoDB: connects to
lib/auth.ts - Demand Listings → MongoDB: connects to
app/api/listings/route.ts - Bookings → MongoDB: connects to
app/api/bookings/route.ts