PlantScan is a modern, AI-powered web application that analyzes images of plants and generates detailed reports on their species, health status, care recommendations, and interesting facts. The app leverages Google Gemini (Gemini-1.5-Flash) for generative AI analysis, sharp for image processing, and pdfkit for downloadable PDF reports.
- 📸 Image Upload: Upload plant photos (max 5MB) via a simple form.
- 🤖 AI Analysis: Uses Google Generative AI (Gemini) to identify species, assess health, and suggest care tips.
- 📄 PDF Reports: Download a beautifully formatted PDF report including analysis and image.
- 🗑️ Auto Cleanup: Uploaded and temporary files are automatically cleaned up.
- ⚙️ Environment Config: Easy setup with environment variables.
- Node.js & Express: Backend server and API routing.
- Google Generative AI:
@google/generative-aipackage for plant analysis. - Multer: File upload handling with size limits.
- Sharp: High-performance image processing.
- PDFKit: Dynamic PDF generation.
- dotenv: Environment variable management.
-
Clone the repo
git clone https://github.com/ayush2635/PlantScan.git cd PlantScan -
Install dependencies
npm install
-
Create a
.envfile at the project root:PORT=5000 GEMINI_API_KEY=your_google_gemini_api_key NODE_ENV=development
-
Run the app
npm start
-
Open
http://localhost:5000in your browser.