A community-driven waste management platform that incentivizes environmental sustainability through blockchain-powered rewards. Report waste, collect litter, earn points, and make cities greener!
- 🗑️ Report Waste - Submit waste reports with location, type, amount, and verification
- ♻️ Collect Waste - Accept collection tasks and earn rewards
- 🏆 Rewards System - Earn points for reporting and collecting waste, redeem for rewards
- 📊 Impact Dashboard - Track real-time statistics on waste collected, CO2 offset, and community contributions
- 🎯 Leaderboard - See top contributors in the community
- 🔐 Web3Auth - Secure authentication using Web3Auth with Ethereum wallet integration
- 🗺️ Google Maps Integration - Location-based waste reporting and tracking
- 🤖 AI Verification - Google Gemini AI for waste verification
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Database: PostgreSQL (Neon) with Drizzle ORM
- Authentication: Web3Auth (Sapphire Network)
- Styling: Tailwind CSS + shadcn/ui components
- Maps: Google Maps API
- AI: Google Gemini API
- Blockchain: Ethereum (Sepolia Testnet)
- Node.js 18+ and npm
- PostgreSQL database (Neon recommended)
- Web3Auth Client ID
- Google Maps API Key
- Google Gemini API Key
Create a .env file in the root directory:
# Database
DATABASE_URL=postgresql://user:password@host/database?sslmode=require
# Web3Auth (use NEXT_PUBLIC_ prefix for client-side access)
NEXT_PUBLIC_WEB3_AUTH_CLIENT_ID=your_web3auth_client_id
NEXT_PUBLIC_WEB3_AUTH_NETWORK=devnet # Change to 'mainnet' for production
# Google Services
GEMINI_API_KEY=your_gemini_api_key
GOOGLE_MAPS_API_KEY=your_google_maps_api_key# Install dependencies
npm install
# Push database schema
npm run db:push
# Run development server
npm run devOpen http://localhost:3000 to see the app.
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run db:push- Push database schema to Neonnpm run db:studio- Open Drizzle Studio (database GUI)
app/
├── Collection/ # Waste collection tasks
├── LeaderBoard/ # User rankings
├── Reports/ # Waste reporting interface
├── Rewards/ # Rewards redemption
└── Settings/ # User settings
components/
├── ui/ # shadcn/ui components
├── Header.tsx # Navigation with Web3Auth
└── ImpactCard.tsx # Impact statistics display
utils/database/
├── actions.ts # Database operations
├── schema.ts # Drizzle schema definitions
└── dbConfig.jsx # Database configuration
The app uses the following main tables:
- Users - User profiles and authentication
- Reports - Waste reports submitted by users
- CollectedWaste - Completed waste collection records
- Rewards - User points and reward records
- Transactions - Point earning and redemption history
- Notifications - User notifications
- Push your code to GitHub
- Import project in Vercel
- Add environment variables in Vercel project settings:
DATABASE_URLNEXT_PUBLIC_WEB3_AUTH_CLIENT_ID(use production client ID)NEXT_PUBLIC_WEB3_AUTH_NETWORK=mainnetGEMINI_API_KEYGOOGLE_MAPS_API_KEY
- Deploy!
Important: For production, create a separate Web3Auth client ID for mainnet from the Web3Auth Dashboard.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this project for your own purposes.