How vedsatpute07/smart-farmer-procurement works
Smart Farmer Procurement Platform supports farmer registration and OTP login, centre discovery and slot booking, then tokenized queue tracking through procurement and payment-status monitoring; staff and admins manage centre operations and records. The React app presents role-based workflows over an Express API backed by MongoDB. Booking and queue services coordinate transactional state and notifications. The graph reflects documented capabilities, but some controllers and frontend pages were not sampled, so uncertain internal calls are omitted.
Main entry points: models/index.js Domain models · routes/index.js API routing · App.jsx Role-based web app · notificationService.js Notification delivery
Components 27
Web application
- Role-based web app
frontend/src/App.jsx - Session context
frontend/src/context/AuthContext.jsx - Farmer workflows
frontend/src/pages - Staff operations UI
frontend/src/pages/StaffDashboard.jsx - Admin management UI
frontend/src/pages/AdminDashboard.jsx - Centre maps
frontend/src/components/CentreMap.jsx - API client
frontend/src/services/api.js
API and identity
- HTTP application
backend/src/app.js - API routing
backend/src/routes/index.js - Auth controller
backend/src/controllers/authController.js - OTP verification
backend/src/services/otpService.js
Procurement operations
- Booking endpoints
backend/src/controllers/bookingController.js - Booking and tokens
backend/src/services/bookingService.js - Centre discovery
backend/src/controllers/centreController.js - Slot management
backend/src/controllers/slotController.js - Queue endpoints
backend/src/controllers/queueController.js - Queue and status
backend/src/services/queueService.js - Procurement and payments
backend/src/controllers/recordController.js - Notification delivery
backend/src/services/notificationService.js
State and integrations
- Domain models
backend/src/models/index.js - MongoDB
- Twilio SMS
- Google Maps
- Razorpay test checkout
Other components
- Farmer
- Staff
- Administrator
Connections 39
- Farmer → Role-based web app: uses
- Staff → Role-based web app: uses
- Administrator → Role-based web app: uses
- Role-based web app → Session context: reads session
- Role-based web app → Farmer workflows: routes to
- Role-based web app → Staff operations UI: routes to
- Role-based web app → Admin management UI: routes to
- Farmer workflows → API client: requests data
- Staff operations UI → API client: requests data
- Admin management UI → API client: requests data
- Farmer workflows → Centre maps: shows locations
- Centre maps → Google Maps: renders maps
- API client → HTTP application: sends API requests
- HTTP application → API routing: dispatches
- API routing → Auth controller: dispatches
- API routing → Booking endpoints: dispatches
- API routing → Centre discovery: dispatches
- API routing → Slot management: dispatches
- API routing → Queue endpoints: dispatches
- API routing → Procurement and payments: dispatches
- Auth controller → OTP verification: issues and consumes
- Booking endpoints → Booking and tokens: delegates bookings
- Queue endpoints → Queue and status: delegates queue work
- Procurement and payments → Queue and status: changes queue state
- Booking and tokens → Notification delivery: creates and delivers
- Queue and status → Notification delivery: creates notifications
- OTP verification → Notification delivery: creates and delivers
- OTP verification → Twilio SMS: sends OTP
- Notification delivery → Twilio SMS: delivers SMS
- Procurement and payments → Razorpay test checkout: sandbox checkout
- Auth controller → Domain models: reads and writes
- OTP verification → Domain models: reads and writes
- Booking and tokens → Domain models: reads and writes
- Queue and status → Domain models: reads and writes
- Centre discovery → Domain models: reads and writes
- Slot management → Domain models: reads and writes
- Procurement and payments → Domain models: reads and writes
- Notification delivery → Domain models: stores delivery state
- Domain models → MongoDB: persists records