AgriTrack is a Flutter-based mobile application designed to revolutionize farming through AI-powered solutions. The app helps farmers optimize crop production, detect diseases early, make data-driven decisions, and maximize profits through smart technology.
- Upload photos of crops to instantly identify diseases
- Get detailed treatment recommendations
- Access historical disease data for your farm
- Purchase recommended agricultural products directly through the platform
- Compare prices from various suppliers
- Track your orders and delivery status
- Real-time weather insights for your specific location
- Resource usage optimization recommendations (water, fertilizer, etc.)
- Season planning based on climate predictions
- Access real-time market prices for your crops
- Trend analysis and future price predictions
- Optimal harvest timing recommendations
- Comprehensive overview of farm performance
- Task management system
- Resource usage analytics
- Yield tracking and forecasting
- Frontend: Flutter (Dart)
- State Management: Provider/Bloc
- Backend: Supabase
- Authentication: Custom auth with third-party options (Google, Facebook)
- AI Integration: TensorFlow Lite for on-device image processing
- Maps & Location: Google Maps API
- Storage: Supabase Storage
- Analytics: Firebase Analytics
agritrack/
├── lib/
│ ├── config/ # App configuration, constants, theme
│ ├── core/ # Core functionality, utilities, helpers
│ ├── data/ # Data layer (repositories, models, services)
│ │ ├── models/ # Data models
│ │ ├── repositories/ # Data repositories
│ │ └── services/ # API services
│ ├── domain/ # Business logic
│ │ ├── entities/ # Business entities
│ │ └── usecases/ # Business use cases
│ ├── presentation/ # UI layer
│ │ ├── common/ # Common widgets, dialogs
│ │ ├── screens/ # App screens
│ │ │ ├── auth/ # Authentication screens
│ │ │ ├── dashboard/ # Dashboard screens
│ │ │ ├── disease/ # Disease detection screens
│ │ │ ├── ecommerce/ # E-commerce screens
│ │ │ ├── market/ # Market prediction screens
│ │ │ └── profile/ # User profile screens
│ │ ├── widgets/ # Reusable widgets
│ │ └── bloc/ # State management
│ ├── routes.dart # App routes
│ └── main.dart # Entry point
├── assets/ # Assets (images, fonts, etc.)
├── test/ # Tests
└── pubspec.yaml # Dependencies
- Flutter SDK (2.10.0 or higher)
- Dart SDK (2.16.0 or higher)
- Android Studio / VS Code
- An active Supabase account
- Google Maps API key (for location features)
-
Clone the repository:
git clone https://github.com/victorpreston/agritrack-app.git cd agritrack
-
Install dependencies:
flutter pub get
-
Create a
.env
file in the root directory with your API keys:SUPABASE_URL=your_supabase_url SUPABASE_ANON_KEY=your_supabase_anon_key GOOGLE_MAPS_API_KEY=your_google_maps_api_key
-
Run the app:
flutter run
We follow the official Dart style guide. Please ensure your code follows these conventions before submitting PRs.
AgriTrack follows a clean architecture approach with the following layers:
- Presentation Layer: UI components, screens, widgets
- Domain Layer: Business logic, use cases
- Data Layer: Data sources, repositories, models
We use the BLoC pattern for state management. Please follow these guidelines:
- Create separate BLoCs for different features
- Keep BLoC logic simple and focused
- Use events for user interactions
- Use states to represent UI states
- Follow conventional commit messages
- Keep commits small and focused
- Write descriptive PR descriptions
- Unit tests:
flutter test
- Integration tests:
flutter test integration_test
- Widget tests: included in the main test suite
The app follows a professional, future-oriented design language with:
- Clean, minimalist interfaces
- High contrast for outdoor visibility
- Intuitive navigation
- Responsive layouts for different screen sizes
- Accessibility considerations
-
Create a new Supabase project
-
Set up the following tables:
- users
- farms
- crops
- disease_detections
- market_prices
- orders
- products
-
Configure authentication with both email/password and third-party providers
- Generate keystore:
keytool -genkey -v -keystore agritrack.keystore -alias agritrack -keyalg RSA -keysize 2048 -validity 10000
- Build APK:
flutter build apk --release
- Build App Bundle:
flutter build appbundle --release
- Set up certificates in Apple Developer account
- Build IPA:
flutter build ipa --release
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Flutter Team
- Supabase
- TensorFlow