How bodhisattva-duduka/smartbin-codestromeco-hackathon works
SmartBin lets a user upload or capture a waste image, get an AI identification and disposal/recycling guidance, and review recent scans. The browser prepares the image and calls the Express API; the classify route calls Gemini and records results for server history. The UI also supports local saved history and, per the README, points and reset controls. A separate question-answer API is documented by its route. Some README-described capabilities are not visible in the sampled frontend excerpt, so their wiring is not inferred.
Main entry points: script.js Upload, scan, rewards · server.js Express server · classify.js Image classification · ask.js Question API
Components 12
Browser experience
- SmartBin UI
public/index.html - Upload, scan, rewards
public/script.js
Application API
- Express server
server.js - Image classification
routes/classify.js - Question API
routes/ask.js
AI services
- Gemini vision
- Gemini text
Scan history
- Server scan history
routes/classify.js - Browser scan history
public/script.js
Other components
- User
- Device camera
- Browser localStorage
Connections 14
- User → SmartBin UI: uses
- SmartBin UI → Upload, scan, rewards: runs
- Upload, scan, rewards → Device camera: captures from
- Upload, scan, rewards → Express server: requests
- Express server → Image classification: dispatches
- Image classification → Gemini vision: sends image prompt
- Gemini vision → Image classification: returns guidance
- Image classification → Server scan history: reads and writes
- Express server → Question API: dispatches
- Question API → Gemini text: sends question
- Gemini text → Question API: returns answer
- Upload, scan, rewards → Browser scan history: renders and saves
- Browser scan history → Browser localStorage: reads and writes
- Upload, scan, rewards → Express server: fetches history