A comprehensive digital platform that transforms agricultural waste management through intelligent solutions, connecting farmers with buyers and optimizing supply chain processes.
Greenify is a React-based web application that addresses the critical challenge of agricultural waste management in India. The platform provides a complete ecosystem for farmers to list their agricultural waste, buyers to discover and purchase waste materials, and includes AI-powered recommendations for optimized farming practices.
- π€ AI Lab: Intelligent agricultural assistant providing personalized recommendations
- π Digital Marketplace: Connect farmers with buyers for agricultural waste
- π Dashboard Analytics: Comprehensive analytics for farmers and buyers
- π Learning Resources: Educational content for sustainable farming practices
- π Secure Authentication: Auth0-powered authentication system
- π± Responsive Design: Mobile-first design with modern UI/UX
- React 18.2.0 - Core framework
- React Router DOM - Client-side routing
- Tailwind CSS - Styling and responsive design
- Framer Motion - Animations and transitions
- Radix UI - Accessible UI components
- Recharts - Data visualization
- Lucide React - Modern icons
- Auth0 - Identity management and authentication
- JWT Tokens - Secure API communication
- Create React App - Build tooling
- ESLint - Code linting
- PostCSS - CSS processing
src/
βββ components/
β βββ ui/ # Reusable UI components
β β βββ avatar.jsx
β β βββ button.jsx
β β βββ card.jsx
β β βββ dropdown-menu.jsx
β β βββ progress.jsx
β βββ TopNavigation.js # Main navigation component
β βββ card.js # Farmer product cards
β βββ landing_sec*.js # Landing page sections
βββ pages/
β βββ AILab.js # AI-powered recommendations
β βββ DashboardPage.js # Analytics dashboard
β βββ FarmerDashboard.js # Farmer-specific dashboard
β βββ FarmerRegistration.js # Farmer onboarding
β βββ marketplace.js # Waste marketplace
β βββ ResourcesPage.js # Learning materials
β βββ RoleSelection.js # User role selection
β βββ WasteDetail.js # Individual waste listing details
β βββ landing.js # Landing page
βββ hooks/
β βββ useAuthToken.js # Authentication hook
βββ lib/
β βββ utils.js # Utility functions
βββ assets/ # Images and static files
- Node.js (version 16.x or higher)
- npm or yarn package manager
- Auth0 account for authentication setup
-
Clone the repository
git clone <repository-url> cd knowcode_protobuf_frontend
-
Install dependencies
npm install
-
Environment Setup Create a
.envfile in the root directory:REACT_APP_AUTH0_DOMAIN=your-auth0-domain REACT_APP_AUTH0_CLIENT_ID=your-auth0-client-id REACT_APP_AUTH0_AUDIENCE=your-auth0-audience
-
Start the development server
npm start
-
Build for production
npm run build
- Create an Auth0 application
- Configure allowed callback URLs
- Set up social connections (Google, Facebook, etc.)
- Update environment variables with your Auth0 credentials
- Profile Management: Complete farmer registration with farm details
- Waste Listings: Create, update, and manage agricultural waste listings
- Status Tracking: Real-time status updates for waste listings
- Analytics: View performance metrics and insights
- Search & Filter: Advanced search capabilities for waste products
- Product Discovery: Browse available agricultural waste by type, location, and price
- Direct Contact: WhatsApp integration for instant communication
- Real-time Updates: Live inventory and availability status
- Smart Predictions: AI-powered crop yield and waste predictions
- Price Analysis: Market price comparisons and trends
- Resource Optimization: Recommendations for efficient resource utilization
- Data Visualization: Interactive charts and graphs for insights
- Educational Content: Best practices for waste management
- Sustainability Guides: Environmental impact reduction strategies
- Market Insights: Industry trends and opportunities
- Technical Documentation: Implementation guides and tutorials
- Primary: Green (#10B981) - Emerald (#059669)
- Secondary: Teal (#14B8A6) - Blue (#3B82F6)
- Accent: Yellow (#F59E0B) - Orange (#F97316)
- Neutral: Gray scale for text and backgrounds
Built on Radix UI primitives for accessibility and consistency:
- Avatar components for user profiles
- Card layouts for content organization
- Dropdown menus for navigation
- Progress indicators for loading states
- Form controls with validation
// Example API call with authentication
const response = await fetch('/api/endpoint', {
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
}
});POST /api/v1/users/register/complete- Complete user registrationGET /api/v1/waste/all- Fetch all waste listingsPOST /api/v1/waste/add- Add new waste listingPATCH /api/v1/waste/:id/status- Update waste statusGET /api/v1/users/data/:auth0Id- Get user profile data
Run the test suite:
npm testFor coverage reports:
npm test -- --coveragenpm run build
# Deploy the 'build' folder to your hosting service- Use functional components with React Hooks
- Follow ESLint configuration
- Implement responsive design patterns
- Add proper error handling and loading states
- Write descriptive commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
- Auth0 for authentication services
- Vercel for hosting and deployment
- Tailwind CSS for styling framework
- Radix UI for accessible components
- Framer Motion for animations
- All contributors and beta testers
Built with β€οΈ for sustainable agriculture and environmental conservation