How sohanyadav20/sichai_app works
This is a MERN irrigation-register application for tracking farmers, irrigation work, payments, and outstanding dues. Admins manage farmer records and enter or edit irrigation and payment data; farmers can look up their own record by phone. The React app calls the API client, which sends requests to the Express routes; those routes validate and calculate costs, summaries, and dashboard totals while using Mongoose models backed by MongoDB. The README documents the main capabilities; some UI and API implementation details are inferred from the available excerpts.
Main entry points: routes/api.js Register API · App.jsx Register UI · server.js Express server · src/api.js API client
Components 11
Web app
- Register UI
frontend/src/App.jsx - API client
frontend/src/api.js
Backend API
- Express server
backend/server.js - Register API
backend/routes/api.js
Domain records
- Farmer model
backend/models/Farmer.js - Irrigation entry
backend/models/Entry.js - Payment record
backend/models/Payment.js
Persistence
- MongoDB
Other components
- Admin
- Farmer
Connections 13
- Admin → Register UI: manages records
- Farmer → Register UI: looks up record
- Register UI → API client: requests data
- API client → Register API: sends API requests
- Express server → Register API: mounts routes
- Express server → MongoDB: connects
- Register API → Farmer model: reads and writes
- Register API → Irrigation entry: reads and writes
- Register API → Payment record: reads and writes
- Farmer model → MongoDB: persists records
- Irrigation entry → MongoDB: persists entries
- Payment record → MongoDB: persists payments
- Register UI → WhatsApp: opens due reminder