A mobile application that integrates a TensorFlow Lite model for real-time crop disease prediction, enabling farmers and agricultural professionals to quickly identify diseases affecting corn, potato, rice, and wheat crops through image recognition.
The application's user interface was designed in Figma to ensure a user-friendly and intuitive experience.
- Real-time Crop Disease Detection: Uses TensorFlow.js to identify diseases in corn, potato, rice, and wheat crops
- Image Capture & Upload: Take photos directly with the camera or select from gallery
- Social Features:
- Create and share posts about crop diseases
- Real-time comments and reactions
- Rating system
- User profiles with customizable information
- Interactive Maps: Google Maps integration for location-based features
- Smooth Animations: Powered by React Native Reanimated and GSAP
- User Authentication: Secure login and signup with Firebase Authentication
- Real-time Database: Cloud Firestore for storing user data and posts
- Pagination: Efficient data loading for better performance
- React Native (v0.74.2) - Cross-platform mobile app development
- Expo (v51.0.17) - Build, deploy, and iterate quickly
- TensorFlow.js (v4.17.0) - JavaScript library for training and deploying ML models
- @tensorflow/tfjs-react-native (v1.0.0) - TensorFlow.js platform adapter for React Native
- Teachable Machine - Model trained with 15 crop disease classes
- Firebase (v10.8.0)
- Firebase Authentication - User authentication
- Cloud Firestore - NoSQL database for storing posts, comments, and user data
- @react-navigation/native (v6.1.10) - Routing and navigation
- @react-navigation/bottom-tabs (v6.5.14) - Bottom tab navigation
- @react-navigation/native-stack (v6.9.18) - Stack navigation
- React Native Paper (v5.12.3) - Material Design components
- React Native Elements (@rneui/themed v4.0.0-rc.8) - Cross-platform UI toolkit
- styled-components (v6.1.8) - CSS-in-JS styling
- react-native-vector-icons (v10.0.3) - Customizable icons
- React Native Reanimated (v3.10.1) - Fluid animations and interactions
- GSAP (v3.12.5) - Professional-grade animation library
- gsap-rn (v0.0.18) - GSAP for React Native
- React Native Maps (v1.14.0) - Google Maps integration
- expo-camera (v15.0.14) - Camera functionality
- expo-image-picker (v15.0.6) - Image selection from gallery
- expo-location (v17.0.1) - Location services
- react-native-ratings (v8.1.0) - Star rating component
- moment (v2.30.1) - Date and time manipulation
- @apollo/client (v3.10.8) - GraphQL client (for GitHub API integration)
- axios (v1.6.7) - HTTP client
- @reduxjs/toolkit (v2.0.1) - State management
- react-redux (v9.1.0) - React bindings for Redux
- Node.js - JavaScript runtime
- npm or Yarn - Package manager
- Expo CLI - Command-line tool for Expo
The app uses a TensorFlow.js model trained with Teachable Machine to detect:
- Corn: Common Rust, Gray Leaf Spot, Healthy, Northern Leaf Blight
- Potato: Early Blight, Healthy, Late Blight
- Rice: Brown Spot, Healthy, Leaf Blast, Neck Blast
- Wheat: Brown Rust, Healthy, Yellow Rust
The model processes images at 224x224 resolution and provides real-time predictions.
Before setting up the project, ensure you have the following installed:
- Node.js (v16 or higher) - Download
- npm (comes with Node.js) or Yarn
- Git - Download
- Expo CLI (will be installed globally)
- VS Code or Android Studio (for Android development) or Xcode (for iOS development on macOS)
- Expo Go app on your mobile device (for testing)
git clone https://github.com/shoaibramim/Krishibid.git
cd KrishibidUsing npm:
npm install --legacy-peer-depsOr using Yarn:
yarn installNote: The --legacy-peer-deps flag is used to handle peer dependency conflicts.
The Firebase configuration is already included in firebase.js. However, for production use, you should:
- Create your own Firebase project at Firebase Console
- Enable Authentication (Email/Password provider)
- Create a Firestore Database
- Copy your Firebase config and replace the values in firebase.js:
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID",
};Create a .env file in the root directory for environment variables:
EXPO_PUBLIC_Github_Access_Token=your_github_token_hereNote: The GitHub token is used for Apollo GraphQL integration. If you're not using GitHub API features, you can skip this.
If you want to use Google Maps features:
- Get an API key from Google Cloud Console
- Add the API key to app.json under the appropriate platform configuration
npm start
# or
expo startThis will open the Expo Developer Tools in your browser.
- Install Expo Go app on your phone
- Scan the QR code from the Expo Developer Tools using:
- Android: Expo Go app
- iOS: Camera app (will open in Expo Go)
npm run android
# or
expo start --androidnpm run ios
# or
expo start --iosnpm run web
# or
expo start --web# Install EAS CLI globally
npm install -g eas-cli
# Login to Expo account
eas login
# Configure the build
eas build:configure
# Build APK
eas build --platform android --profile previeweas build --platform iosKrishibid/
βββ App.js # Main application entry point
βββ app.json # Expo configuration
βββ babel.config.js # Babel configuration
βββ firebase.js # Firebase configuration
βββ metro.config.js # Metro bundler configuration
βββ package.json # Dependencies and scripts
βββ assets/ # Static assets
β βββ fonts/ # Custom fonts (DM Sans)
β βββ trained_model/ # TensorFlow model files
β βββ model.json
β βββ metadata.json
β βββ weights.bin
βββ components/ # Reusable components
β βββ PostCard.js # Post component for feed
βββ pages/ # Application screens
β βββ About.js # About screen
β βββ BottomTabs.js # Bottom tab navigator
β βββ ClickOrSelectImage.js # Disease detection screen
β βββ CreatePost.js # Create post screen
β βββ EditProfile.js # Edit profile screen
β βββ Feed.js # Home feed screen
β βββ Login.js # Login screen
β βββ Notifications.js # Notifications screen
β βββ Profile.js # User profile screen
β βββ Search.js # Search screen
β βββ SignUp.js # Registration screen
β βββ StarterScreen.js # Initial welcome screen
βββ styles/ # Styling files
β βββ PostStyle.js # Post component styles
βββ ERD/ # Entity Relationship Diagrams
-
Metro bundler issues
# Clear cache and restart expo start -c -
Dependency conflicts
# Clean install rm -rf node_modules package-lock.json npm install --legacy-peer-deps -
Android build issues
- Ensure Android SDK is properly installed
- Check Java version (JDK 11 or higher recommended)
-
iOS build issues (macOS)
- Ensure Xcode is installed
- Run
pod installin theiosdirectory (if applicable)
-
TensorFlow model loading issues
- Ensure model files are in
assets/trained_model/ - Check that
model.jsonandweights.binare properly bundled
- Ensure model files are in
npm start- Start the Expo development servernpm run android- Run on Android device/emulatornpm run ios- Run on iOS device/simulatornpm run web- Run in web browser
Contributions are welcome! Please feel free to submit a Pull Request.
This project is private. All rights reserved.
Shoaib Uddin
- GitHub: @shoaibramim
For support, issues, or feature requests, please open an issue on the GitHub repository.
Note: This app was developed as part of an academic project demonstrating the integration of machine learning with mobile application development for agricultural technology solutions.