Skip to content

Latest commit

Β 

History

History
107 lines (71 loc) Β· 3.29 KB

File metadata and controls

107 lines (71 loc) Β· 3.29 KB

♻️ SmartWaste+

SmartWaste+ is a PWA-based waste management and reward platform aligned with SDG 11 (Sustainable Cities and Communities). It incentivizes users to exchange reusable waste (e.g., plastic bottles, cans, electronics) for points, which can be used to purchase items or services from participating shops.


πŸš€ Features

  • πŸ” Google Authentication

    • Login with Google (Firebase Auth)
    • Cookie/session handling for smoother UX
  • πŸ‘₯ Role-Based Access

    • Users: Earn/exchange points via QR or barcode
    • Admins (Shop Owners): Manage shops, approve exchanges
    • Superadmins: Global managers with point control and admin privileges
  • πŸ“¦ Reusable Component Utils

    • Modular component structure
  • 🌐 Progressive Web App (PWA)

    • Offline support with manifest.json, icons, sw.js
  • πŸ”” Push Notifications

    • Real-time alerts for exchanges, updates
  • πŸ“‘ Firebase Integration

    • Firestore DB and Google Auth
  • 🧠 IndexedDB

    • Store detailed user data locally for performance and offline support
  • πŸͺ Cookie Management

    • Persist login state and fallback data for crash recovery
  • 🧩 Middleware

    • Route protection and role validation

🧭 User Roles

Role Description
User Scans QR/barcodes to earn points for contributing reusable items. Can redeem points for goods/services.
Admin Shop owner. Verifies and exchanges points for reusable items. Manages stock and product listings.
Superadmin Oversees the platform. Manages admins and can issue infinite points.

πŸ› οΈ Tech Stack

  • Frontend: PWA, Tailwind CSS, IndexedDB
  • Auth: Firebase Google Login
  • Database: Firebase Firestore, IndexedDB (client-side)
  • Backend Logic: Firebase functions or local Node/Express (optional)
  • Notifications: Push API + Firebase Cloud Messaging
  • Storage: Cookies & IndexedDB for session & state persistence

πŸ—‚οΈ Project Structure (Key Folders)

smartwaste/
β”‚
β”œβ”€β”€ auth/          # Google login handling
β”œβ”€β”€ middleware/    # Role-based routing & access control
β”œβ”€β”€ utils/         # Common reusable components
β”œβ”€β”€ cookie/        # Session persistence and fallback crash data
β”œβ”€β”€ indexdb/       # Local user storage for smooth UX
β”œβ”€β”€ firebase/      # Firebase setup (DB + Auth)
β”œβ”€β”€ db/            # Database abstraction logic
β”œβ”€β”€ pwa/           # manifest.json, icons, service worker
β”œβ”€β”€ noti/          # Push notification handling

πŸ“Œ SDG Alignment

SmartWaste+ contributes to the UN Sustainable Development Goal 11: Sustainable Cities and Communities by promoting:

  • Responsible recycling behavior
  • Incentivized waste disposal
  • Digital infrastructure for circular economies

πŸ“± Demo & Deployment

PWA ready – install on your phone or desktop.

πŸ“¦ Demo link coming soon...


🀝 Contribution

Feel free to fork, open issues, or submit PRs!


πŸ“„ License

MIT License Β© 2025 SmartWaste Team