How foridul35962/agrilink works
AgriLink is a bilingual agriculture marketplace connecting farmers, aratdars and retailers, with an admin moderation layer. Its main trading journey runs from a farmer’s product listing and auction, through aratdar bidding and order fulfillment, to aratdar inventory and retailer orders. Separate capabilities include member approval, crop recommendations, dashboards, reports and live notifications. The graph preserves these documented product areas; detailed wiring is shown only where the sampled source supports it.
Main entry points: app.js Express API · product.controller.js Products and auctions · dashboard.controller.js Role analytics · auth.controller.js Authentication
Components 34
Platform users
- Farmer
- Aratdar
- Retailer
- Admin
Web client
- Sign in and registration
client/src/app/(auth) - Farmer workflows
client/src/app/(farmer) - Aratdar workflows
client/src/app/aratdar - Retailer workflows
client/src/app/retailer - Admin workflows
client/src/app/admin - Crop library
client/src/app/crop - Product marketplace
client/src/app/products - Inventory marketplace
client/src/app/inventory - Notification centre
client/src/app/notifications - Auth API client
client/src/store/slice/authSlice.ts
Marketplace services
- Express API
server/src/app.js - Auth routes
server/src/routes/auth.route.js - Authentication
server/src/controllers/auth.controller.js - Products and auctions
server/src/controllers/product.controller.js - Order lifecycle
server/src/controllers/order.controller.js - Inventory
server/src/controllers/inventory.controller.js - Crop recommendations
server/src/controllers/crop.controller.js - Member approval
server/src/controllers/admin.controller.js - Reports and moderation
server/src/controllers/report.controller.js - Role analytics
server/src/controllers/dashboard.controller.js - Notifications
server/src/controllers/notification.controller.js
Data and integrations
- User records
server/src/models/Users.model.js - Pending registrations
server/src/models/RequestUsers.model.js - Product records
server/src/models/Product.model.js - Auction and bids
server/src/models/auctions.model.js - Order records
server/src/models/Order.model.js - Inventory records
server/src/models/Inventory.model.js - Crop rules
server/src/models/Crop.model.js - Recommendation rules
server/src/models/CropRecommendation.model.js - Redis cache and OTP
server/src/config/redis.js
Connections 39
- Farmer → Farmer workflows: uses
- Aratdar → Aratdar workflows: uses
- Retailer → Retailer workflows: uses
- Admin → Admin workflows: uses
- Farmer → Product marketplace: lists products
- Aratdar → Product marketplace: places bids
- Retailer → Inventory marketplace: places orders
- Admin → Crop library: manages crops
- Admin → Admin workflows: approves members
- Sign in and registration → Auth API client: submits credentials
- Auth API client → Express API: HTTP requests
- Express API → Auth routes: mounts
- Auth routes → Authentication: dispatches
- Authentication → User records: reads and writes
- Authentication → Pending registrations: creates requests
- Authentication → Redis cache and OTP: stores OTP state
- Express API → Member approval
- Express API → Reports and moderation
- Express API → Products and auctions
- Express API → Order lifecycle
- Express API → Crop recommendations
- Express API → Inventory
- Express API → Role analytics
- Express API → Notifications
- Products and auctions → Product records: reads and writes
- Products and auctions → Auction and bids: uses auctions
- Products and auctions → Order records: creates orders
- Products and auctions → Redis cache and OTP: reads cache
- Order lifecycle → Order records: reads and writes
- Order lifecycle → Inventory records: updates stock
- Inventory → Inventory records: reads and writes
- Inventory → Order records: creates orders
- Crop recommendations → Crop rules: reads and writes
- Crop recommendations → Recommendation rules: reads rules
- Crop recommendations → Redis cache and OTP: caches weather
- Role analytics → Redis cache and OTP: reads cache
- Role analytics → Product records: queries stats
- Role analytics → Auction and bids: queries stats
- Role analytics → Order records: queries stats