A comprehensive digital agriculture platform that empowers farmers with smart tools, real-time weather data, crop disease detection, market analysis, and direct marketplace access. Built with modern web technologies and supporting multilingual capabilities.
- Crop Disease Detection: AI-powered image analysis for identifying plant diseases
- Weather Monitoring: Real-time weather data and forecasts for farming decisions
- Market Analysis: Live market prices and trends for agricultural products
- Government Schemes: Access to agricultural subsidies and government programs
- Buy & Sell: Direct farmer-to-consumer marketplace
- Seller Panel: Comprehensive dashboard for sellers to manage products
- Smart Recommendations: AI-powered product suggestions
- AI Chatbot: Intelligent farming assistant for queries and guidance
- Multilingual Support: Available in English and Tamil (தமிழ்)
- Role-Based Access: Different interfaces for farmers, buyers, and administrators
- Mobile Responsive: Optimized for all devices
- Secure Authentication: Powered by Clerk authentication
- User Profiles: Personalized dashboards and settings
- Admin Panel: Administrative tools and analytics
- Protected Routes: Secure access to sensitive features
- Frontend: React 18, TypeScript, Vite
- Styling: Tailwind CSS, shadcn/ui components
- Authentication: Clerk
- State Management: React Context API
- Routing: React Router DOM
- API Integration: TanStack Query
- Animations: Framer Motion
- Charts: Recharts
- Icons: Lucide React
- Weather API: OpenMeteo
- Node.js (v18 or higher)
- npm or yarn
-
Clone the repository
git clone <YOUR_GIT_URL> cd agrismart
-
Install dependencies
npm install
-
Set up authentication
- Sign up at Clerk
- Create a new application
- Copy your
VITE_CLERK_PUBLISHABLE_KEY - Update
src/main.tsxwith your key (see CLERK_SETUP.md)
-
Start development server
npm run dev
-
Open in browser Navigate to
http://localhost:5173
src/
├── components/ # Reusable UI components
│ ├── ui/ # shadcn/ui components
│ ├── home/ # Home page sections
│ ├── layout/ # Layout components
│ └── ...
├── contexts/ # React contexts
│ ├── AuthContext.tsx # Authentication context
│ └── LanguageContext.tsx # Internationalization
├── hooks/ # Custom React hooks
├── pages/ # Application pages/routes
├── services/ # API services
├── data/ # Static data and translations
├── assets/ # Images and static assets
├── lib/ # Utility libraries
└── utils/ # Utility functions
The application supports multiple languages:
- English (en) - Default
- தமிழ் (Tamil) (ta) - Complete translation
- Add new keys to
src/data/translations.json - Use the
useLanguagehook in components:import { useLanguage } from '@/contexts/LanguageContext'; function MyComponent() { const { t } = useLanguage(); return <h1>{t("section.title")}</h1>; }
See README_TRANSLATION.md for detailed implementation guide.
This project uses Clerk for authentication. Follow these steps:
-
Get your Clerk keys
- Sign up at Clerk
- Create a new application
- Copy your publishable key
-
Configure the application
- Update
src/main.tsxwith your Clerk publishable key - The app includes pre-built auth components and protected routes
- Update
See CLERK_SETUP.md for detailed setup instructions.
The project uses a design system approach:
- Tailwind CSS: Utility-first CSS framework
- shadcn/ui: High-quality, accessible components
- CSS Custom Properties: Semantic color tokens
- Dark/Light Mode: Built-in theme switching
- Colors are defined as HSL values in
src/index.css - Components use semantic tokens from
tailwind.config.ts - Custom variants available for different use cases
- Hero section with platform overview
- Feature highlights and statistics
- User testimonials and call-to-action
- Real-time weather data
- 7-day forecasts
- Agricultural weather insights
- Crop disease detection using AI
- Image upload and analysis
- Treatment recommendations
- Live commodity prices
- Market trends and analytics
- Price prediction models
- Product catalog with search and filters
- Direct farmer connections
- Secure transaction handling
/auth- Authentication pages/profile- User profile management/admin- Administrative dashboard
The project doesn't use traditional env files. Instead:
- Clerk publishable key is set directly in
main.tsx - API endpoints are configured in service files
- Feature flags can be added to context providers
- Weather data: OpenMeteo API
- Authentication: Clerk
- Custom APIs can be added in
src/services/
- Navigate to Project → Settings → Domains in Lovable
- Connect your custom domain
- Follow the DNS configuration instructions
The app can be deployed to any static hosting service:
- Vercel
- Netlify
- GitHub Pages
- AWS S3 + CloudFront
Build command: npm run build
Output directory: dist
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
- TypeScript for type safety
- ESLint for code linting
- Prettier for code formatting (via ESLint config)
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow the existing code style and patterns
- Use TypeScript for all new code
- Add proper error handling and loading states
- Test on both mobile and desktop
- Ensure accessibility standards are met
This project is licensed under the MIT License - see the LICENSE file for details.
- Community: Discord
- Video Tutorials: YouTube Playlist
Made with ❤️ for farmers and agricultural communities worldwide
