Skip to content

aayush-mitra/EcoSnap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EcoSnap

EcoSnap is a full-stack recycling assistant that lets users snap a photo of any waste item, get AI-powered guidance on recyclability, quantify their environmental impact, and earn points/levels for each action.

How It Works

  1. Capture – The Next.js client opens the device camera and uploads a snapshot of the item.
  2. Classify – The Express server stores the photo in Cloudinary, then calls Gemini to extract structured data (recyclable flag, impact metrics, prep steps, recommended drop-off).
  3. Score & Store – A custom points engine awards scores based on impact, size, and quantity, while a leveling system tracks cumulative points, items recycled, and CO₂ avoided. All activity is persisted in MongoDB for dashboards and analytics.
  4. Feedback – The UI surfaces a concise impact sentence, preprocessing tip, suggested location, full JSON response (for debugging), and current point/level progress.

Tech Stack

  • Frontend – Next.js 14 (App Router) with React 19 and Tailwind-style utility classes.
  • Backend – Express, Node.js 20, Mongoose, and Multer for uploads.
  • AI & Media – Google Gemini API (via @google/generative-ai) and Cloudinary for secure image storage.
  • Database – MongoDB Atlas for users, recycle events, and leveling metadata.

Setup

git clone https://github.com/your-org/EcoSnap.git cd EcoSnap

Server

cd server npm install cp .env.example .env # add Mongo, Cloudinary, Gemini keys npm run dev

Client

cd ../client npm install npm run dev


Visit `http://localhost:3000` (or your chosen port), authenticate, and navigate to `/recycle` to try the end-to-end flow.

## Credits

- **Next.js** (Vercel) – https://nextjs.org/license
- **React** (Meta Platforms) – MIT License
- **Express** – MIT License
- **Mongoose** – MIT License
- **Google Gemini API** – Google AI Studio Terms
- **Cloudinary** – Cloudinary Terms of Service

Per project policy: *If you use public frameworks or libraries, you must credit them in the README.* The list above covers every external framework/library used in EcoSnap.

About

Project for HackPrinceton

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 60.8%
  • JavaScript 28.0%
  • CSS 11.2%