Professional plant identification with AI-powered health assessment - 100% Free APIs, Production-Ready, Fully Deployable
- π¬ Multi-AI Plant Identification - Plant.id, Google Gemini 2.5, PlantNet APIs
- π‘οΈ Smart Image Validation - Detects if uploaded image contains a plant
- π¦ Disease Detection - Identifies plant diseases and health issues
- π Health Assessment - AI-powered condition analysis
- π± Species Recognition - Common & scientific names, plant families
- π Tailored Care Guides - Species-specific recommendations
- π Seasonal Calendar - Year-round care schedule
- π§ Troubleshooting - Common problems and solutions
- π PDF Reports - Professional reports with plant images
- π° 100% FREE - No credit card required, 2,000+ free IDs/day
- π Production-Ready - Fully deployable on Vercel, Render, Railway
User Upload Image
β
Image Validation (Gemini 2.5) - Ensures it's a plant
β
Plant Identification:
1. Plant.id API (Primary) - 100/day FREE
2. Google Gemini 2.5 Flash (Backup) - 1,500/day FREE
3. PlantNet API (Backup) - 500/day FREE
4. Knowledge Base (Always works) - Unlimited
β
Care Recommendations (Knowledge Base)
β
PDF Report Generation
- Never fails completely
- Automatic fallback to next API if one fails
- Knowledge base provides general care if all APIs unavailable
git clone https://github.com/YOUR_USERNAME/Green-Sense.git
cd Green-Sense
npm install- Visit: https://aistudio.google.com/app/apikey
- Sign in with Google account
- Click "Create API Key"
- Copy the key (starts with
AIza...)
- Visit: https://web.plant.id/
- Sign up (free, no credit card)
- Get API key from dashboard
- Visit: https://my.plantnet.org/
- Create account
- Get API key
cp .env.example .envEdit .env file:
# Required - For plant identification and image validation
GEMINI_API_KEY=your_gemini_api_key_here
# Optional - For enhanced plant identification
PLANTID_API_KEY=your_plantid_api_key_here
# Optional - Additional fallback
PLANTNET_API_KEY=your_plantnet_api_key_herenpm starthttp://localhost:5000
Step 0/3: Validating image contains a plant...
β
Plant image validated (confidence: high)
Detected: Monstera plant
Step 1/3: Analyzing YOUR plant with Plant.id AI...
πΏ Plant.id identified: Monstera (Monstera deliciosa)
π Confidence: 87.3%
π·οΈ Family: Araceae
π Health: healthy
Step 2/3: Generating tailored care guide...
β
Care recommendations generated!
πΏ PLANT ANALYSIS REPORT
π IDENTIFICATION
β’ Common Name: Monstera
β’ Scientific Name: Monstera deliciosa
β’ Family: Araceae
β’ Confidence: 87.3%
π HEALTH ASSESSMENT
β’ Status: healthy
β’ No diseases detected
π CARE REQUIREMENTS
β’ Watering: Water when top 1-2 inches dry
β’ Light: Bright, indirect light
β’ Humidity: 50-60%, mist regularly
β’ Temperature: 65-80Β°F (18-27Β°C)
β’ Soil: Well-draining with peat moss
β’ Fertilizer: Monthly during growing season
π
SEASONAL CARE GUIDE
[Spring, Summer, Fall, Winter tasks]
π§ TROUBLESHOOTING GUIDE
[Yellow leaves, brown tips, wilting, etc.]
Step 0/3: Validating image contains a plant...
β Not a plant detected: cat
Reason: Image shows an animal, not a plant
Error: This appears to be cat, not a plant.
Please upload an image of a plant.
| Service | Daily Limit | Features | Cost |
|---|---|---|---|
| Google Gemini 2.5 | 1,500 | Vision + ID + Validation | FREE |
| Plant.id | 100 | ID + Health + Disease | FREE |
| PlantNet | 500 | ID + Scientific names | FREE |
| Knowledge Base | Unlimited | Care + Tips + Troubleshooting | FREE |
| Total | 2,100+ | Everything | $0/month |
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Add environment variables in Vercel dashboard:
# - GEMINI_API_KEY
# - PLANTID_API_KEY (optional)
# - PLANTNET_API_KEY (optional)- Backend: Node.js, Express
- AI APIs:
- Google Gemini 2.5 Flash (vision + text)
- Plant.id API (plant identification)
- PlantNet API (botanical database)
- Image Processing: Sharp
- PDF Generation: PDFKit
- Knowledge Base: JSON databases
- Deployment: Vercel serverless functions
Green-Sense/
βββ app.js # Main Express server
βββ public/
β βββ index.html # Frontend UI
βββ utils/
β βββ gemini-vision.js # Gemini 2.5 integration
β βββ plantid-api.js # Plant.id integration
β βββ care-engine.js # Care recommendations
β βββ image-validator.js # Plant image validation
βββ knowledge/
β βββ plant-care.json # Care database
β βββ plant-diseases.json # Disease database
βββ .env # Environment variables
βββ package.json # Dependencies
- β Images processed in memory, deleted after analysis
- β No data stored on server
- β No user tracking or analytics
- β API keys stored securely in environment variables
- β CORS enabled for secure cross-origin requests
Contributions are welcome! Please feel free to submit a Pull Request.
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini - For powerful vision AI capabilities
- Plant.id - For specialized plant identification
- PlantNet - For botanical database access
- Open-source community - For amazing tools and libraries
For questions or support, please open an issue on GitHub.
Built with πΏ for plant lovers everywhere
Upload your plant image and get instant analysis! π
When you upload a plant image, the AI provides:
1. PLANT IDENTIFICATION
- Specific species or genus
- Common and scientific names
- Key identifying features
- Plant family
2. HEALTH ASSESSMENT
- Overall health status
- Leaf condition analysis
- Disease/pest detection
- Stress indicators
3. SPECIFIC OBSERVATIONS
- Detailed description of YOUR plant
- Leaf characteristics
- Growth pattern
- Visible issues
4. CARE RECOMMENDATIONS
- Watering schedule (for this species)
- Light requirements
- Soil preferences
- Fertilization guide
- Pruning tips
- Temperature/humidity needs
5. IMMEDIATE ACTIONS
- Urgent issues to address
- Specific treatments
- Preventive measures
6. LONG-TERM CARE
- Seasonal care tips
- Common problems
- Growth expectations
- Repotting guidance
$0/month - Gemini API Free Tier:
- 15 requests per minute
- 1,500 requests per day
- 1 million requests per month
Perfect for personal use and portfolio projects!
| Component | Technology |
|---|---|
| AI Vision | Google Gemini 1.5 Pro |
| Backend | Node.js + Express |
| Image Processing | Sharp |
| PDF Generation | PDFKit |
| Frontend | Vanilla JS + TailwindCSS |
green-sense/
βββ app.js # Main server with Gemini integration
βββ package.json # Dependencies
βββ .env # API key (not in git)
βββ .env.example # Configuration template
βββ public/
β βββ index.html # Frontend interface
βββ upload/ # Temporary image storage
βββ reports/ # Generated PDF reports
- Input: Multipart form data with image file
- Process: Analyzes image with Gemini Vision AI
- Output: JSON with analysis and base64 image
- Input: JSON with analysis text and image
- Process: Generates PDF report
- Output: Downloadable PDF file
Green-Sense - AI-Powered Plant Health Analysis Platform
β’ Developed full-stack web application for plant identification and health assessment
β’ Integrated Google Gemini 1.5 Vision API for accurate image analysis and species identification
β’ Implemented multipart file upload with Sharp for image optimization
β’ Built PDF report generation system with embedded images using PDFKit
β’ Designed RESTful API with Express.js for seamless frontend-backend communication
β’ Optimized for zero-cost deployment using free tier APIs ($0/month operational cost)
β’ Demonstrated problem-solving by migrating from unstable APIs to reliable Gemini platform
Tech Stack: Node.js, Express.js, Google Gemini AI, Sharp, PDFKit, TailwindCSS
Q: Tell me about this project
"Green-Sense is an AI-powered plant health analyzer that uses Google's Gemini Vision API to identify plant species and assess their health from photos. Users upload images and receive detailed, species-specific care recommendations. The challenge was integrating vision AI reliably while maintaining zero operational costs."
Q: What was the biggest technical challenge?
"Initially, I tried using Hugging Face's free vision models, but they had reliability issues with the new Inference Providers API. I pivoted to Google's Gemini 1.5 Flash, which offers excellent vision capabilities with a generous free tier. This taught me the importance of API evaluation and having backup plans."
Q: How does it work technically?
"The backend uses Express with Multer for file uploads. Images are processed with Sharp for optimization, then sent to Gemini's vision model with a detailed botanical analysis prompt. The AI identifies the species, assesses health, and provides tailored care advice. Results are displayed in the browser and can be downloaded as PDF reports with PDFKit."
Q: How would you scale this?
"Current architecture handles 1,500 requests/day on free tier. For scaling, I'd implement Redis caching for repeated plant species, add user accounts with history tracking, implement rate limiting per user, and potentially add a CDN for static assets. Could also batch similar requests or use webhooks for async processing."
- Push code to GitHub
- Connect Render to repository
- Add
GEMINI_API_KEYenvironment variable - Deploy!
- Connect Railway to GitHub
- Set environment variable
- Auto-deploy on push
- Install Vercel CLI:
npm i -g vercel - Run:
vercel - Add environment variable in dashboard
β Never commit .env file - Already in .gitignore β Use environment variables - API keys not in code β Validate file uploads - Multer configuration β Clean up temp files - Automatic deletion after processing β Rate limiting - Built into Gemini API β CORS configured - Secure cross-origin requests
- Check
.envfile exists - Verify API key is correct
- Restart server after changing
.env
- Free tier: 1,500 requests/day
- Wait 24 hours or upgrade plan
- Check usage: https://aistudio.google.com/
- Max file size: 10MB
- Supported formats: JPG, PNG, WEBP
- Check
upload/directory permissions
- Ensure
reports/directory exists - Check disk space
- Verify PDFKit installation
- Gemini API: https://ai.google.dev/docs
- Express.js: https://expressjs.com/
- Sharp: https://sharp.pixelplumbing.com/
- PDFKit: https://pdfkit.org/
- User accounts and plant history
- Plant health tracking over time
- Community features (share plants)
- Mobile app (React Native)
- Multiple language support
- Plant disease database
- Care reminders and notifications
- Integration with plant care APIs
MIT License - Feel free to use for your portfolio!
- Google Gemini AI for vision capabilities
- TailwindCSS for beautiful UI
- The open-source community
Having issues? Check:
.envfile is configured correctly- Gemini API key is valid
- Dependencies are installed:
npm install - Server is running:
npm start - Port 5000 is not in use
Made with π for plant lovers and AI enthusiasts
Perfect for: Portfolio projects, job applications, learning AI integration
Status: β Production Ready | π° $0/month | π Deploy Anywhere