EcoSmart is a UX-first web & PWA prototype helps users find nearby e-waste bins, deposit items via AI-powered scanning, and get immediate rewards.
- Smart Finder: Locate compatible bins with realtime status.
- AI Detection: Identify e-waste type and condition using multimodal AI (simulated via Edge Function/API).
- Gamification: Earn points, badges, and view environmental impact (CO2 saved).
- Admin Dashboard: Optimize collection routes based on bin fill levels.
- Frontend: Next.js 15 (App Router), Tailwind CSS v4, Lucide Icons.
- Backend: Next.js API Routes (acting as Edge Functions for demo), Supabase (Database).
- AI: OpenRouter (Google Gemini 2.0 Flash) for image analysis.
- Maps: Simulated Mapbox/Google Maps integration.
-
Clone & Install
git clone <url> cd ios-ewaste-app npm install
-
Environment Variables Copy
.env.exampleto.env.localand fill in your keys:cp .env.example .env.local
Required Keys:
NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY,OPENROUTER_API_KEY. -
Database Setup (Supabase)
- Go to Supabase SQL Editor.
- Run the contents of
supabase/migrations/20240202000000_schema.sql. - Run the contents of
supabase/seed.sqlto populate bins and users.
-
Run Development Server
npm run dev
Open http://localhost:3000.
- Landing: Click "Find Nearest Bin".
- Finder: Select "Phone" type. Tap on a bin marker or list item -> Navigate.
- Bin: Arrive at bin. Tap "Tap to Scan QR" to simulate connection.
- Deposit:
- Take a photo of an e-waste item (or upload sample).
- Adjust "Simulated Weight" slider.
- Click "Analyze Item".
- View AI result (Type, Confidence, Value).
- Click "Confirm".
- Profile: View updated points and CO2 stats.
- Simulations: Hardware sensors (weight scale) and bin screens are simulated via UI controls.
- Map: The map is a visual simulation for the MVP to avoid API key dependencies during review, but designed to drop-in Mapbox GL.
- AI Fallback: If no OpenRouter key is provided, the system uses a heuristic fallback (mock) to ensure the demo always works.