A Next.js powered voice agent platform that helps farmers get real-time commodity prices through automated phone calls. Farmers simply call a Twilio number, speak their location, and receive price information via SMS.
Status: β Production Ready https://mera-mandi.vercel.app/
- Voice Agent: Automated phone calls using Twilio
- Speech Recognition: Understand farmer inputs via voice
- Real-time Pricing: Fetch live government commodity prices
- SMS Notifications: Send price alerts via SMS
- Multi-language Support: Support for multiple Indian languages
- Email Alerts: Optional email notifications
- User Authentication: Secure login and registration
- Location Tracking: State and district-based price queries
βββββββββββββββββββ
β Farmer β
β (Phone Call) β
ββββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββββββββββββ
β Twilio Voice API β
β (Voice Recognition) β
ββββββββββ¬βββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββ
β Next.js Backend β
β (Voice Processing) β
ββββββββββ¬βββββββββββββββββ
β
ββββββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββ ββββββββββββββββββββ
β Government API β β MongoDB β
β (Prices) β β (User Data) β
ββββββββββββββββββββ ββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββ
β Twilio SMS API β
β (Send Prices to Phone) β
βββββββββββββββββββββββββββ
- Node.js 18+ installed
- MongoDB Atlas account (free tier available)
- Twilio account with SMS and Voice capabilities
- Clone and Install
npm install- Setup Environment Variables (
.env.local)
MONGODB_URI=your_mongodb_connection_string
TWILIO_ACCOUNT_SID=your_account_sid
TWILIO_AUTH_TOKEN=your_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone
GOV_API_KEY=your_government_api_key
USE_MOCK_DATA=false
- Run Development Server
npm run dev- Visit the App Open http://localhost:3000
src/
βββ app/
β βββ api/ # API routes (auth, prices, Twilio webhooks)
β βββ home/ # Home page
β βββ prices/ # Price lookup page
β βββ profile/ # User profile page
β βββ page.tsx # Landing page
βββ components/ # Reusable React components
βββ models/ # MongoDB schemas (User, Alert, CallSession)
βββ services/ # Business logic (emailer, govApi, notifier)
βββ constants/ # Language and location data
βββ lib/ # Utilities (MongoDB connection)
βββ styles/ # Global styles
public/ # Static assets
- Frontend: React 19, Next.js 16, Tailwind CSS
- Backend: Next.js API Routes
- Database: MongoDB with Mongoose ODM
- Voice/SMS: Twilio API
- Authentication: JWT with bcryptjs
- Translation: Google Cloud Translate
- Email: Nodemailer
| Variable | Description | Required |
|---|---|---|
MONGODB_URI |
MongoDB connection string | β |
TWILIO_ACCOUNT_SID |
Twilio account ID | β |
TWILIO_AUTH_TOKEN |
Twilio authentication token | β |
TWILIO_PHONE_NUMBER |
Your Twilio phone number | β |
GOV_API_KEY |
Government API key for commodity prices | β |
USE_MOCK_DATA |
Use mock data instead of real API |
1. Farmer Calls
- Farmer dials your Twilio number
2. Voice Flow
- Bot asks: "What's your name?"
- Bot asks: "Which state are you from?"
- Bot asks: "Which district?"
- Bot asks: "What crop are you interested in?"
3. Data Processing
- Voice is converted to text
- System fetches commodity prices from government API
- User preferences are saved to MongoDB
4. SMS Alert
- Farmer receives SMS with current prices
- Price alerts are created in the database
[ADD SCREENSHOT HERE - User dashboard with price alerts]
[ADD SCREENSHOT HERE - Real-time price listings]
[ADD DIAGRAM HERE - Call flow and voice interaction sequence]
[ADD DIAGRAM HERE - MongoDB collections and relationships]
Production Website: [ADD PRODUCTION LINK HERE]
Meet the team behind Meri Mandi:
| Name | Role | |
|---|---|---|
| Saksham Arora | ||
| Anubhav Dash | ||
| Yashasvi Rastogi | ||
| Tejaswani Nayak |
We welcome contributions from the community! Here's how you can help:
Frontend Improvements
- [ADD AREA FOR TEAM - UI/UX enhancements]
- [ADD AREA FOR TEAM - Mobile responsiveness]
- [ADD AREA FOR TEAM - Accessibility improvements]
Backend Features
- [ADD AREA FOR TEAM - Voice processing optimization]
- [ADD AREA FOR TEAM - API performance improvements]
- [ADD AREA FOR TEAM - Database query optimization]
Documentation
- [ADD AREA FOR TEAM - API documentation]
- [ADD AREA FOR TEAM - Deployment guides]
- [ADD AREA FOR TEAM - Troubleshooting guides]
Testing
- [ADD AREA FOR TEAM - Unit tests]
- [ADD AREA FOR TEAM - Integration tests]
- [ADD AREA FOR TEAM - E2E tests]
Localization
- [ADD AREA FOR TEAM - Add new language support]
- [ADD AREA FOR TEAM - Improve existing translations]
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Check Twilio credentials are correct
- Verify phone number has voice capabilities enabled
- Ensure user is speaking clearly during call
- Verify
TWILIO_PHONE_NUMBERis correct - Check Twilio account has SMS balance
- Ensure phone number format is correct (with country code)
- Verify
GOV_API_KEYis valid - Check internet connection
- Try enabling
USE_MOCK_DATA=truefor testing
- Verify
MONGODB_URIconnection string - Check MongoDB Atlas IP whitelist includes your server
- Ensure credentials are correct
[ADD LICENSE HERE - MIT, Apache 2.0, etc.]
Project Lead: [ADD NAME AND EMAIL]
Questions? [ADD CONTACT METHOD]
Found a bug? [ADD ISSUE SUBMISSION LINK]
Last Updated: February 2026
Version: 1.0.0