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.

Built With

Share this project:

Updates