BloomIQ is a production-level, AI-powered crop health monitoring application built with YOLOv8 for real-time flower and fruit stage detection. It combines modern web and mobile technologies to deliver accurate, fast, and visually rich crop analysis.
- Features
- Tech Stack
- Architecture
- Prerequisites
- Installation
- Usage
- API Documentation
- Deployment
- Contributing
- Beautiful plant-themed interface with natural animations
- Quick stats: weather, total analyses, recent reports
- Quick actions: Analyze Now, View Reports, Check Weather
- Upload or capture crop images
- Dual YOLOv8 Model Integration:
flower_model.pt- Flower stage detectionfruit_model.pt- Fruit stage detection
- Real-time inference and stage determination
- Confidence levels and health summaries
- Actionable care recommendations
- Complete analysis history
- Expandable detailed reports
- Detection counts and confidence metrics
- Care recommendations archive
- Live weather data (OpenWeatherMap API)
- Temperature, humidity, rainfall probability
- Smart farming recommendations based on conditions
- Watering and fertilization timing suggestions
- Email + Password authentication
- JWT-based secure sessions
- Profile management (name, region, language)
- Web: React.js 18
- Mobile: React Native (Android)
- Styling: TailwindCSS
- Animations: Framer Motion (web), React Native Reanimated (mobile)
- HTTP Client: Axios
- Server: Node.js + Express.js
- Database: SQLite (lightweight, file-based)
- Authentication: JWT (JSON Web Tokens)
- File Upload: Multer
- Framework: Python + Flask
- Model: YOLOv8 (Ultralytics)
- Image Processing: OpenCV, Pillow
- Weather: OpenWeatherMap API
βββββββββββββββββββ
β React Web β
β React Native β
ββββββββββ¬βββββββββ
β HTTP/REST
βΌ
βββββββββββββββββββ
β Node.js Server β
β (Express.js) β
ββββββ¬ββββββββ¬βββββ
β β
β ββββββββββββββββ
βΌ βΌ
βββββββββββ ββββββββββββββββββ
β SQLite β β Python Service β
β DB β β (YOLOv8) β
βββββββββββ ββββββββββββββββββ
- User uploads image β Express server
- Server sends image β Python Flask service
- Python loads both models:
flower_model.ptfruit_model.pt
- Both models run inference
- System compares confidence scores
- Returns dominant stage (Flower/Fruit) + recommendations
- Server stores result in database
- Client displays analysis
- Node.js 16.x or higher
- Python 3.9 or higher
- npm or yarn
- pip (Python package manager)
- React Native CLI
- Android Studio (for Android development)
- Java JDK 11 or higher
git clone <repository-url>
cd BloomIQ-v4cd backend
npm installcd python-service
pip install -r requirements.txt
cd ..cp .env.example .envEdit .env:
PORT=5000
JWT_SECRET=your-super-secret-jwt-key-change-this
PYTHON_SERVICE_URL=http://localhost:8000
WEATHER_API_KEY=your-openweathermap-api-keyPlace your trained models in backend/models/:
flower_model.ptfruit_model.pt
Note: If models are missing, the system uses YOLOv8n as fallback.
cd ../web
npm installCreate .env:
cp .env.example .envEdit .env:
REACT_APP_API_URL=http://localhost:5000/apicd ../mobile
npm installFor Android:
npx react-native run-androidcd backend
npm run devServer runs on http://localhost:5000
cd backend/python-service
python app.pyService runs on http://localhost:8000
cd web
npm startApp opens at http://localhost:3000
- Register/Login: Create account or sign in
- Dashboard: View stats and weather
- Analyze: Upload/capture crop image
- Results: View stage, confidence, recommendations
- Reports: Check analysis history
- Weather: Get farming recommendations
POST /api/auth/register
Content-Type: application/json
{
"email": "[email protected]",
"password": "password123",
"name": "John Doe",
"region": "California",
"language": "en"
}POST /api/auth/login
Content-Type: application/json
{
"email": "[email protected]",
"password": "password123"
}POST /api/analysis/analyze
Authorization: Bearer <token>
Content-Type: multipart/form-data
image: <file>Response:
{
"reportId": "uuid",
"stage": "Flower",
"confidence": 0.89,
"detections": [...],
"health_summary": "Detected 3 flowers...",
"recommendations": ["Ensure pollination", ...],
"imageUrl": "http://..."
}GET /api/weather/current?city=California
Authorization: Bearer <token>GET /api/reports
Authorization: Bearer <token>GET /api/reports/:id
Authorization: Bearer <token># Install PM2
npm install -g pm2
# Start Node.js
cd backend
pm2 start server.js --name bloomiq-backend
# Start Python (separate process)
cd python-service
pm2 start app.py --name bloomiq-python --interpreter python3# Example Dockerfile for backend
FROM node:18
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
EXPOSE 5000
CMD ["node", "server.js"]cd web
npm run build
# Deploy 'build' folder to:
# - Vercel
# - Netlify
# - AWS S3 + CloudFront
# - GitHub Pagescd mobile
# Android
npx react-native build-android --release
# Generate APK in android/app/build/outputs/apk/release/# Check if service is running
curl http://localhost:8000/health
# Restart service
cd backend/python-service
python app.py- Ensure
flower_model.ptandfruit_model.ptare inbackend/models/ - Check file permissions
- Verify PyTorch and Ultralytics are installed
# Reset database
cd backend
rm database.sqlite
npm run dev # Recreates tablesMIT License - See LICENSE file
- Fork the repository
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
For issues and questions:
- Open a GitHub Issue
- Email: [email protected]
- Ultralytics YOLOv8 - Object detection framework
- OpenWeatherMap - Weather data API
- React Team - Frontend framework
- Express.js - Backend framework
Made with π± by the BloomIQ Team