Skip to content

Latest commit

Β 

History

History
129 lines (102 loc) Β· 3.27 KB

File metadata and controls

129 lines (102 loc) Β· 3.27 KB

🌿 Plant Disease Detector - React Native App

This is a React Native mobile app built with Expo that allows users to capture or upload plant images and detect potential diseases using a Flask-based AI model. πŸš€


πŸ“Œ Features

βœ… Camera Integration – Capture plant images directly
βœ… Gallery Upload – Select images from the device
βœ… AI Disease Detection – Sends images to the Flask API for predictions
βœ… Clean UI – User-friendly interface with smooth navigation
βœ… Multi-Screen Navigation – Organized structure using Expo Router


πŸ“‚ Project Structure

plant-disease-detector/
β”œβ”€β”€ app/                # Main screens
β”‚   β”œβ”€β”€ index.js        # Home screen
β”‚   β”œβ”€β”€ _layout.js      # Layout wrapper for navigation
β”‚   β”œβ”€β”€ camera.js       # Camera functionality
β”‚   β”œβ”€β”€ results.js      # Displays prediction results
β”‚   └── about.js        # About page
β”œβ”€β”€ components/         # Reusable UI components
β”‚   β”œβ”€β”€ Button.js       
β”‚   β”œβ”€β”€ DiseaseCard.js  
β”‚   β”œβ”€β”€ Header.js       
β”‚   └── LoadingOverlay.js  
β”œβ”€β”€ services/           # API communication
β”‚   └── api.js          
β”œβ”€β”€ constants/          # UI constants (Colors, Layout)
β”‚   β”œβ”€β”€ Colors.js       
β”‚   └── Layout.js       
β”œβ”€β”€ assets/             # Static assets (images, fonts)
β”‚   β”œβ”€β”€ images/         
β”‚   └── fonts/          
β”œβ”€β”€ app.json            # Expo configuration  
β”œβ”€β”€ babel.config.js     # Babel settings  
β”œβ”€β”€ package.json        # Dependencies & scripts  
└── README.md           # Documentation  

πŸ”§ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/zeroruntime/DetectMe-frontend.git
cd DetectMe-frontend

2️⃣ Install Dependencies

Make sure you have Node.js and Expo CLI installed.

npm install

3️⃣ Start the App

For Android:

npm run android

For iOS (Mac only):

npm run ios

For Web Preview:

npm run web

For Expo:

npx expo start

πŸ“‘ API Integration

The app communicates with the Flask backend for disease detection.
Modify services/api.js to match your backend URL:

import axios from 'axios';

const API_URL = 'http://your-backend-ip:5000';

πŸ“œ Dependencies

πŸ“Œ Key libraries used in this project:

  • expo-camera – Capture images
  • expo-image-picker – Upload from gallery
  • axios – API requests
  • react-navigation – Multi-screen navigation

Install missing dependencies with:

npm install

πŸ“Έ Screens

1️⃣ Home Screen – Welcome screen with buttons to capture or upload images
2️⃣ Camera Screen – Uses device camera to take pictures
3️⃣ Results Screen – Displays disease predictions and confidence score


πŸ”— Future Enhancements

βœ… Improve UI/UX with better styling
βœ… Support more plant diseases
βœ… Offline prediction using on-device TensorFlow


🀝 Contributing

Feel free to fork, create issues, or submit PRs! πŸŽ‰


🏷 License

MIT License Β© 2025 DetectMe Team