🌾 Harvest Hub
💡 Inspiration
The inspiration for Harvest Hub came from observing how small farmers and home gardeners often end up with extra produce that goes to waste, while many low-income families struggle to afford fresh food.
The middlemen system leaves farmers underpaid and consumers overcharged.
I wanted to build a community-centered platform that ensures fair trade, reduces waste, and promotes social good.
By combining technology, transparency, and empathy, Harvest Hub connects growers, buyers, and NGOs — ensuring that every crop finds a home, and every meal counts.
🌱 What It Does
Harvest Hub is a web-based platform that:
- Allows farmers and gardeners to list surplus crops for sale, donation, or barter.
- Calculates fair prices — higher than middlemen rates but lower than retail.
- Provides a barter system for trading items without money (e.g., potatoes for rice).
- Enables donation mode, where crops can be marked for local NGOs or families.
- Uses bank transfer verification — buyers upload a payment screenshot, and the owner manually confirms the transaction.
- Displays real-time community analytics (total donations, sales, and fair price trends) through an interactive dashboard built with Plotly Dash.
🏗️ How We Built It
1. Database — PostgreSQL
We designed a relational schema with normalized tables:
- Users: stores user details and roles (Farmer, Buyer, NGO).
- Listings: contains crop details, quantity, pricing type (Sell, Donate, Barter).
- Transactions: tracks all exchanges between users, including payment confirmation status.
- Payments: stores payment details, including uploaded screenshots and approval flags.
2. Backend — Python Flask + JWT
- Implemented a Flask REST API for CRUD operations on listings, users, and payments.
- Used JWT (JSON Web Tokens) for secure authentication and session management.
- Integrated bank payment verification by allowing buyers to upload payment proof (e.g., screenshot of a transaction).
- Added a Fair Price Algorithm to ensure balanced pricing:
$$ P_{fair} = \frac{P_{market} + P_{farmer}}{2} $$
where
( P_{market} ) = retail market price
( P_{farmer} ) = price typically offered by middlemen
3. Frontend — HTML, CSS, JavaScript
- Designed a responsive and clean user interface for listing, buying, donating, and bartering crops.
- Implemented Fetch API and Axios for communication between the frontend and Flask backend.
- Developed payment upload forms where buyers can submit bank transfer screenshots.
- Added confirmation dashboards for owners to verify and approve payments.
4. Visualization — Plotly Dash
- Built an interactive analytics dashboard to monitor:
- Total crops listed per category
- Donations and barter exchanges
- Fair price comparisons and transaction success rates
- Total crops listed per category
⚙️ Challenges We Ran Into
- Payment Verification: Designing a secure and reliable flow for manual confirmation of bank transfers.
- JWT Management: Handling token expiration and ensuring safe API calls.
- Integration Between Dash and Flask: Maintaining routing consistency between analytical and transactional modules.
- Database Optimization: Handling multiple concurrent requests and ensuring transaction safety in PostgreSQL.
- Fair Price Calibration: Creating a formula that balances affordability for buyers and fair profit for farmers.
🏆 Accomplishments That We’re Proud Of
- Built a fully functional prototype integrating multiple technologies (Flask, Dash, PostgreSQL).
- Implemented a bank payment verification system that ensures transaction authenticity.
- Designed a fair pricing mechanism promoting both farmer welfare and buyer affordability.
- Created data-driven dashboards for transparency and community insight.
- Contributed to sustainable food management by reducing waste and promoting fairness.
📚 What We Learned
- How to build a complete web solution from database design to frontend deployment.
- Implementing secure authentication using JWT.
- Managing file uploads and storing payment confirmations safely.
- Visualizing data effectively using Plotly Dash.
- Understanding how digital systems can support social impact and community empowerment.
🚀 What’s Next for Harvest Hub
- Mobile App Development: Building a Flutter app for easier access by rural farmers.
- Automated Payment Verification: Integrating APIs from digital banks for instant payment status checks.
- AI-Powered Price Prediction: Using machine learning to forecast optimal crop prices.
- Real-Time Notifications: For payment confirmations and new listing alerts.
- NGO Collaboration: Expanding partnerships for surplus redistribution and donations.
✨ Harvest Hub strives to make farming fair, food accessible, and communities empowered — one harvest at a time. 🌾
Log in or sign up for Devpost to join the conversation.