EcoSnap is a web application that helps users make eco-friendly product choices by analyzing product images, finding similar products, and calculating carbon footprints.
- Product Analysis: Upload product images to analyze ingredients and packaging materials using Google's Gemini API.
- Similar Products: Find eco-friendly alternatives to your current products.
- Carbon Footprint: Calculate and compare the environmental impact of products.
- Product Search: Search through analyzed products to find eco-friendly options.
- Frontend: React, Material-UI
- Backend: Node.js, Express
- Database: MongoDB Atlas
- AI: Google Gemini API
- Deployment: Cloudflare
- Node.js (v18 or higher)
- npm or yarn
- MongoDB Atlas account
- Google Gemini API key
- Cloudflare account (for deployment)
-
Clone the repository:
git clone https://github.com/kesharibhai84/EcoSnap.git cd EcoSnap
-
Install backend dependencies:
cd backend npm install
-
Install frontend dependencies:
cd ../frontend npm install
-
Create a
.env
file in the backend directory with the following variables:MONGODB_URI=your_mongodb_atlas_connection_string GEMINI_API_KEY=your_gemini_api_key CLOUDFLARE_ACCOUNT_ID=your_cloudflare_account_id CLOUDFLARE_API_TOKEN=your_cloudflare_api_token CLOUDFLARE_ZONE_ID=your_cloudflare_zone_id PORT=5000
-
Start the application:
cd .. ./start.sh
-
Open your browser and navigate to
http://localhost:3000
EcoSnap/
├── backend/ # Node.js/Express backend
│ ├── src/
│ │ ├── controllers/ # Request handlers
│ │ ├── models/ # MongoDB models
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic
│ │ ├── config/ # Configuration files
│ │ ├── middleware/ # Express middleware
│ │ └── server.js # Entry point
│ ├── .env # Environment variables
│ └── package.json # Backend dependencies
├── frontend/ # React frontend
│ ├── public/ # Static files
│ ├── src/
│ │ ├── components/ # Reusable components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ ├── utils/ # Utility functions
│ │ └── App.js # Main component
│ └── package.json # Frontend dependencies
├── .gitignore # Git ignore file
├── README.md # Project documentation
└── start.sh # Script to start both servers
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini API for image analysis
- MongoDB Atlas for database hosting
- Cloudflare for deployment and hosting