Sortify_App
*๐ฑ Sortify โ AI-Powered Waste Sorting Game https://sortifywebsiteapp.base44.app
Sortify is an AI-powered sustainability platform that turns waste sorting into a fun, competitive experience. Users scan real-world items to get instant AI classification, earn points, and climb leaderboards. Built for all ages, Sortify educates through play and scales to real-world impact with future smart-bin integration (InstaScan).
Sortify is a gamified web application that uses AI-powered image recognition to help users correctly sort waste into Recycle, Compost, or Landfill bins. By turning sustainability into a game, Sortify educates users while encouraging real-world environmental impact.
๐ฎ What the Game Offers
๐ธ AI Waste Scanning Users upload or capture an image of an item A pretrained AI model analyzes the object The system predicts the correct bin: โป๏ธ Recycle ๐ฑ Compost ๐๏ธ Landfill A confidence score (%) and human-readable explanation are returned
๐ Points & Leaderboard System +1 point awarded per successful scan Real-time leaderboard ranks users globally Encourages consistency and friendly competition
๐บ๏ธ Smart Bin Locator Uses location data to show nearby disposal bins Supports recycling, compost, and waste bins Integrated directly into the app for convenience
๐ค User Profiles Secure login system View total points, scan history, and rank Tracks environmental impact over time
๐ง Educational Impact Explains why an item belongs in a specific bin Helps users learn sustainable habits, not just score points
๐ Additional Products & Upgrades (Planned) These are optional enhancements designed for future expansion
๐ Sortify+ (Premium) Detailed scan history analytics Environmental impact breakdown (COโ saved, waste diverted) Advanced AI confidence explanations
๐ซ Institutional Edition Custom leaderboards for schools or organizations Admin dashboards CSV data export for sustainability reporting
๐งบ Smart Bin Integration (Hardware Add-on) Ultrasonic bin fill-level tracking Real-time โbin fullโ status Optimized pickup routing (future scope)
๐งฉ System Architecture Overview Frontend (React + Vite) โ API Requests Backend (FastAPI) โ SQLite Database โ AI Model + External APIs
๐ ๏ธ Technology Stack
Frontend React (TypeScript) Vite (fast development & builds) Tailwind CSS React Router (page navigation) Backend FastAPI (Python) Uvicorn (ASGI server) Pydantic (data validation) RESTful API design Database SQLite Lightweight
Perfect for hackathons & prototypes Stores users, scans, points, leaderboard data AI & APIs
Google Gemini API โ object recognition & explanation
Google Maps API โ bin location mapping
(Optional fallback: OpenStreetMap)
๐ Authentication & Security Token-based authentication Firebase Auth support (optional / hybrid) API keys stored securely via environment variables No secrets committed to GitHub
๐ Environment Variables Create a .env file in the backend root: GEMINI_API_KEY=your_gemini_api_key GOOGLE_MAPS_API_KEY=your_google_maps_key DATABASE_URL=sqlite:///sortify.db โ ๏ธ Never commit .env files to version control
๐ Project Structure (Simplified) SORTIFY/ โโโ frontend/ โ โโโ src/ โ โโโ pages/ โ โโโ components/ โ โโโ vite.config.ts โ โโโ backend/ โ โโโ main.py โ โโโ models.py โ โโโ database.py โ โโโ auth.py โ โโโ .venv/ โโโ package.json โโโ SORTIFY_README.md โโโ ATTRIBUTIONS.md
๐ How to Run the Project Backend source .venv/bin/activate pip install -r requirements.txt uvicorn main:app --reload
Backend runs at: http://127.0.0.1:8000
Frontend npm install npm run dev Frontend runs at: http://localhost:5173
๐งช API Example Scan Item POST /scan { "image_base64": "...", "lat": 37.7749, "lng": -122.4194 } Response { "detected_item": "plastic bottle", "bin_category": "recycle", "confidence": 0.92, "explanation": "Plastic bottles made of PET are recyclable", "new_user_points": 42 }
๐ Mission Statement Sortify exists to make sustainability simple, educational, and rewarding. By combining AI, gamification, and real-world data, we empower people to make smarter waste decisions every day.
Log in or sign up for Devpost to join the conversation.