A React-based web application that uses AI to detect recyclable items through camera input and rewards users with green coins for proper recycling.
- 📱 Mobile-First Design: Optimized for mobile devices with a responsive glassmorphic UI
- 🤖 AI Detection: Utilizes Teachable Machine and Clarifai for smart waste recognition
- 💰 Reward System: Earn green coins for identifying recyclable items
- 🎯 Smart Bin Recommendations: Color-coded guidance for proper recycling
- 📱 QR Code Generation: Redeem coins for real-world rewards
- 🗺️ Map Integration: Find nearby recycling centers
- ✨ Smooth Animations: Confetti effects and micro-interactions for feedback
- Frontend: React 18, TypeScript, Tailwind CSS, Vite
- Backend: Express.js, Node.js
- AI: Teachable Machine, Clarifai API
- Database: Firebase (optional) or In-memory storage
- Hosting: Localhost / Firebase Hosting / Ngrok
-
Clone the repository
git clone https://github.com/ArhaanDev24/ecolens.git cd ecolens
-
Install frontend dependencies
npm install
-
Start the frontend server
npm run dev
-
Install and start the backend server
cd server npm install npm run dev
-
Visit the app
Open http://localhost:5173 in your browser and allow camera access.
Ngrok allows you to share your local development server over the internet — useful for mobile device testing with camera input.
-
Download Ngrok and install it
-
Authenticate (only once):
ngrok config add-authtoken <your_token>
-
Start tunneling your Vite dev server (default: port 5173):
ngrok http 5173
-
Ngrok will generate a public URL like
https://abcd1234.ngrok.io
.
Open that link on your phone or share it for external testing.
⚠️ Make sure your device allows camera access over Ngrok HTTPS links.
-
Install Firebase CLI
npm install -g firebase-tools
-
Login to Firebase
firebase login
-
Update
.firebaserc
with your project ID -
Build the project
npm run build
-
Deploy
firebase deploy
Create a .env
file in the root directory:
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_PROJECT_ID=your_firebase_project_id
VITE_FIREBASE_APP_ID=your_firebase_app_id
VITE_TEACHABLE_MACHINE_MODEL_URL=your_model_url
VITE_CLARIFAI_API_KEY=your_clarifai_key
# Frontend
npm install
npm run dev
# Backend
cd server
npm install
npm run dev
- Fork the repository
- Create a new feature branch
- Commit and push your changes
- Submit a pull request
This project is licensed under the MIT License.
You're free to use, modify, and distribute this project as long as you include the original license.