π Hackathon Winner 2026 - Revolutionizing agriculture with AI, blockchain transparency, and real-time trading
AgroPulse is not just another agricultural marketplaceβit's a comprehensive platform that combines cutting-edge technology to solve real-world agricultural challenges. Built for hackathons with enterprise-grade features.
- Smart Price Prediction: Machine learning algorithms analyze market trends, weather data, and historical prices to predict optimal selling times
- Crop Disease Detection: AI-powered image recognition for early disease detection in crops
- Quality Assessment: Automated quality grading using computer vision
- Market Intelligence: Real-time market analysis and trend forecasting
- Multi-Factor Authentication: Advanced security with TOTP and biometric options
- Rate Limiting: DDoS protection and API abuse prevention
- Audit Logging: Complete transaction and user activity tracking
- Account Lockout: Automatic account protection against brute force attacks
- Encrypted Communications: End-to-end encryption for all transactions
- Live Auctions: WebSocket-powered real-time bidding with instant updates
- Live Notifications: Push notifications for bids, messages, and market alerts
- Real-Time Chat: Instant messaging between buyers and sellers
- Live Market Data: Real-time price updates from mandi markets
- Immutable Transactions: Blockchain-based transaction logging for complete transparency
- Smart Contracts: Automated contract execution for trade agreements
- Digital Certificates: Verifiable certificates for crop quality and origin
- Supply Chain Tracking: End-to-end traceability from farm to consumer
- Market Insights: Comprehensive market analysis with trend predictions
- Farmer Dashboard: Personalized insights and recommendations
- Buyer Analytics: Purchase history and market intelligence
- Performance Metrics: ROI tracking and optimization suggestions
- Progressive Web App: Installable mobile experience
- QR Code Integration: Quick sharing and verification
- Offline Capability: Core features work without internet
- Cross-Device Sync: Seamless experience across all devices
- Next.js 15.5 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Socket.io - Real-time communication
- React Query - Data fetching and caching
- Next.js API Routes - Serverless API endpoints
- Prisma ORM - Type-safe database operations
- PostgreSQL - Robust relational database
- NextAuth.js - Authentication and authorization
- TensorFlow.js - Client-side machine learning
- OpenAI API - Advanced AI predictions
- Computer Vision - Image processing and analysis
- bcryptjs - Password hashing
- JWT - Token-based authentication
- Rate Limiting - API protection
- Helmet - Security headers
- Blockchain - Transaction integrity
- Node.js 18+
- PostgreSQL database
- npm or yarn
-
Clone the repository
git clone https://github.com/your-username/agropulse.git cd agropulse -
Install dependencies
npm install
-
Environment Setup
cp .env.example .env.local # Edit .env.local with your database URL and other secrets -
Database Setup
npx prisma generate npx prisma migrate dev npx prisma db seed
-
Start Development Server
npm run dev
-
Open your browser
http://localhost:3000
docker compose up --buildThis starts:
agropulse-apponhttp://localhost:3000agropulse-dbonlocalhost:5432
The app container runs Prisma migrations automatically before startup.
docker compose downTo also remove the database volume:
docker compose down -vdocker build -t agropulse .
docker run --rm -p 3000:3000 -e DATABASE_URL="postgresql://postgres:postgres@host.docker.internal:5432/agropulse" -e AUTH_SECRET="replace-with-strong-secret" -e NEXT_PUBLIC_APP_URL="http://localhost:3000" agropulse- Users: Farmers, buyers, and administrators
- CropListings: Agricultural produce listings
- Bids: Auction system for price discovery
- BlockchainTransactions: Immutable transaction records
- AuditLogs: Security and compliance logging
- AIPredictions: ML-generated market insights
- Real-time bidding with WebSocket support
- Multi-language support (10+ languages)
- Role-based access control
- File upload with security scanning
- QR code generation for listings
- JWT-based authentication
- Role-based permissions (Farmer, Buyer, Admin)
- Session management with automatic expiry
- Account lockout after failed attempts
- Password hashing with bcrypt
- Input validation and sanitization
- SQL injection prevention
- XSS protection
- CSRF protection
- Rate limiting on all endpoints
- Request size limits
- CORS configuration
- Security headers with Helmet
- Complete audit logging
- Transaction traceability
- User activity monitoring
- Compliance reporting
// Example API usage
const prediction = await fetch('/api/ai/price-prediction', {
method: 'POST',
body: JSON.stringify({
cropName: 'Wheat',
location: 'Maharashtra',
quantity: 1000
})
});- Disease detection in crop images
- Quality assessment
- Automated grading
- Harvest time optimization
// Verify transaction integrity
const verification = await fetch(`/api/blockchain/verify/${transactionId}`);
const result = await verification.json();
// Returns: { isValid: true, dataIntegrity: true, blockIntegrity: true }- Automated payment releases
- Quality guarantee contracts
- Delivery confirmation
- Dispute resolution
- Market price trends
- User engagement statistics
- Transaction volume analysis
- Geographic distribution
- Crop performance insights
- Live price feeds
- Auction activity
- User notifications
- System health monitoring
- English (en)
- Hindi (hi)
- Marathi (mr)
- Telugu (te)
- Tamil (ta)
- Kannada (kn)
- Malayalam (ml)
- Gujarati (gu)
- Punjabi (pa)
- Bengali (bn)
- RTL language support
- Localized date/time formatting
- Currency localization
- Cultural adaptation
- Installable on mobile devices
- Offline functionality
- Push notifications
- Native app-like experience
- Cross-platform compatibility
# Run unit tests
npm run test
# Run E2E tests
npm run test:e2e
# Run linting
npm run lintnpm run build
vercel --proddocker build -t agropulse .
docker run -p 3000:3000 agropulseWe welcome contributions! Please see our Contributing Guide for details.
- Follow TypeScript best practices
- Write comprehensive tests
- Follow conventional commits
- Maintain code coverage > 80%
This project is licensed under the MIT License - see the LICENSE file for details.
- π₯ 1st Place - AI Innovation Category
- π₯ 1st Place - Best Agricultural Solution
- π₯ 2nd Place - Most Innovative Use of Blockchain
- π People's Choice Award - Community Favorite
- Documentation: docs.agropulse.com
- Discord: Join our community
- Email: support@agropulse.com
- Issues: GitHub Issues
- Next.js Team for the amazing framework
- Prisma Team for the excellent ORM
- Vercel for hosting and deployment
- OpenAI for AI capabilities
- Socket.io for real-time features
Built with β€οΈ for farmers, by developers who care about agriculture
β Star this repo if you find it useful!