How appireddy-hemanth/agriconnect works
AgriLink Pro connects farmers who post labour or machinery jobs with labour teams and machine owners who browse and accept assignments. Its dashboards also support negotiation, payment tracking, reviews, profiles, and administration. The backend exposes these domains through Express routes backed by PostgreSQL; the frontend provides role-based dashboards and voice-assisted, multilingual forms. Dashboard-to-API links are shown as unverified because the excerpts do not expose their HTTP calls; documented product stages and backend route registrations are retained.
Main entry points: app.js Express API · App.jsx Role-based routing · pool.js PostgreSQL connection pool · FarmerDashboard.jsx Farmer dashboard
Components 20
Web application
- Role-based routing
frontend/src/App.jsx - Voice input
frontend/src/hooks/useSpeechToText.js
Work matching
- Farmer dashboard
frontend/src/routes/FarmerDashboard.jsx - Labour dashboard
frontend/src/routes/LabourDashboard.jsx - Machine dashboard
frontend/src/routes/MachineDashboard.jsx - Work listings
backend/src/routes/works.js
Work transactions
- Negotiations
backend/src/routes/negotiations.js - Payments
backend/src/routes/payments.js - Reviews and ratings
backend/src/routes/reviews.js
Accounts and administration
- Profile settings
frontend/src/routes/ProfileSettings.jsx - Login and registration
frontend/src/routes/Login.jsx - Admin dashboard
frontend/src/routes/AdminDashboard.jsx - Authentication routes
backend/src/routes/auth.js - Profile routes
backend/src/routes/profile.js - Admin routes
backend/src/routes/admin.js
API and persistence
- Express API
backend/src/app.js - JWT authentication
backend/src/middleware/auth.js - PostgreSQL connection pool
backend/src/db/pool.js
Other components
- Farm users
- PostgreSQL database
Connections 40
- Farm users → Role-based routing: uses
frontend/src/App.jsx - Role-based routing → Login and registration: routes to
frontend/src/App.jsx - Role-based routing → Farmer dashboard: routes to
frontend/src/App.jsx - Role-based routing → Labour dashboard: routes to
frontend/src/App.jsx - Role-based routing → Machine dashboard: routes to
frontend/src/App.jsx - Role-based routing → Admin dashboard: routes to
frontend/src/App.jsx - Farmer dashboard → Work listings: posts work
- Labour dashboard → Work listings: browses and accepts
- Machine dashboard → Work listings: browses and accepts
- Farmer dashboard → Negotiations: negotiates
- Labour dashboard → Negotiations: negotiates
- Machine dashboard → Negotiations: negotiates
- Farmer dashboard → Payments: tracks payments
- Farmer dashboard → Reviews and ratings: submits reviews
- Labour dashboard → Reviews and ratings: views ratings
- Machine dashboard → Reviews and ratings: views ratings
- Farmer dashboard → Voice input: uses voice input
frontend/src/routes/FarmerDashboard.jsx - Role-based routing → Express API: calls API
- Express API → Authentication routes: routes requests
backend/src/app.js - Express API → Work listings: routes requests
backend/src/app.js - Express API → Admin routes: routes requests
backend/src/app.js - Express API → Profile routes: routes requests
backend/src/app.js - Express API → Negotiations: routes requests
backend/src/app.js - Express API → Payments: routes requests
backend/src/app.js - Express API → Reviews and ratings: routes requests
backend/src/app.js - Authentication routes → JWT authentication: authenticates
backend/src/routes/auth.js - Work listings → JWT authentication: authenticates
backend/src/routes/works.js - Negotiations → JWT authentication: authenticates
backend/src/routes/negotiations.js - Payments → JWT authentication: authenticates
backend/src/routes/payments.js - Reviews and ratings → JWT authentication: authenticates
backend/src/routes/reviews.js - Admin routes → JWT authentication: authenticates
backend/src/routes/admin.js - Profile routes → JWT authentication: authenticates
backend/src/routes/profile.js - Authentication routes → PostgreSQL connection pool: queries
backend/src/routes/auth.js - Work listings → PostgreSQL connection pool: queries
backend/src/routes/works.js - Negotiations → PostgreSQL connection pool: queries
backend/src/routes/negotiations.js - Payments → PostgreSQL connection pool: queries
backend/src/routes/payments.js - Reviews and ratings → PostgreSQL connection pool: queries
backend/src/routes/reviews.js - Admin routes → PostgreSQL connection pool: queries
backend/src/routes/admin.js - Profile routes → PostgreSQL connection pool: queries
backend/src/routes/profile.js - PostgreSQL connection pool → PostgreSQL database: connects to
backend/src/db/pool.js