How kishoremuddana/farm2home works
Farm2Home is a grocery marketplace with customer shopping and ordering, seller product submissions, officer inspections, and admin management. A customer browses category products, adds items to a locally stored cart or buys directly, selects an address and payment mode, places an order, then views or cancels it. The Flask application provides the HTTP API and accesses MySQL; browser scripts implement role-specific workflows. The excerpts show selected API calls and SQL, but the README is empty and most backend routes and page wiring were not sampled, so uncertain connections are omitted.
Main entry points: app.py Flask API · checkout.js Checkout · product.js Product catalog · admin.js Admin console
Components 14
Customer shopping
- Storefront
frontend/pages - Product catalog
frontend/js/product.js - Cart and wishlist
frontend/js/cart.js - Checkout
frontend/js/checkout.js - Order history
frontend/js/myorders.js - Profile and addresses
frontend/js/userProfile.js - Login and registration
frontend/js/login.js
Marketplace operations
- Seller dashboard
frontend/js/seller-dashboard.js - Inspection dashboard
frontend/js/officer-dashboard.js - Admin console
frontend/js/admin.js
Backend services
- Flask API
backend/app.py
Persistence
- MySQL
- Product uploads
uploads
Other components
- Customer
Connections 17
- Customer → Storefront: browses
- Storefront → Product catalog: loads scripts
- Product catalog → Flask API: fetches products
frontend/js/product.js - Product catalog → Cart and wishlist: adds items
frontend/js/product.js - Customer → Checkout: checks out
- Cart and wishlist → Checkout: opens checkout
frontend/js/cart.js - Checkout → Flask API: places order
frontend/js/checkout.js - Checkout → Profile and addresses: opens profile
frontend/js/checkout.js - Order history → Flask API: loads orders
frontend/js/myorders.js - Profile and addresses → Flask API: manages profile
frontend/js/userProfile.js - Login and registration → Flask API: authenticates
- Seller dashboard → Flask API: submits products
frontend/js/seller-dashboard.js - Inspection dashboard → Flask API: submits reports
frontend/js/officer-dashboard.js - Admin console → Flask API: manages marketplace
frontend/js/admin.js - Flask API → MySQL: queries records
backend/app.py - Flask API → Product uploads: saves images
backend/app.py - Admin console → Flask API: reviews inspections
frontend/js/admin.js