EcoBin is a comprehensive full-stack web application designed to transform waste management through intelligent tools, community engagement, and sustainability education. Built with real environmental data, EcoBin educates users about the global waste crisis while providing practical tools for sustainable living.
- 2+ Billion tons of waste generated globally each year (70% increase expected by 2050)
- One-third of all food production is wasted globally
- Millions of marine animals die annually from plastic pollution
- Small percentage of plastic waste is actually recycled
# Navigate to project folder in Command Prompt
cd path\to\EcoBin
# First time setup
scripts\windows\setup-windows.bat
# Start development server
scripts\windows\start-windows.bat
# Access at http://localhost:5000# Install dependencies
npm install
# Start development server
npm run dev
# Access at http://localhost:5000- π€ AI-Powered Waste Analysis - Upload images for intelligent waste classification
- π Smart Pickup Scheduling - Schedule waste collection with calendar integration
- ποΈ Community Reporting - Report environmental issues in your area
- π Educational Platform - Interactive quizzes and learning resources
- π Rewards System - Earn eco-points and redeem sustainable rewards
- π Analytics Dashboard - Track your environmental impact
- React 18 with TypeScript
- Tailwind CSS + shadcn/ui components
- TanStack Query for state management
- Wouter for routing
- Vite for development and builds
- Node.js with Express.js
- MySQL/SQLite hybrid database
- Drizzle ORM for database operations
- Google Gemini AI for waste analysis
- Session-based authentication
# Clone repository
git clone <repository-url>
cd EcoBin
# Install dependencies
npm install
# Run database migrations (if using MySQL)
npm run db:migrate
# Start development server
npm run devEcoBin/
βββ client/ # Frontend React application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility functions
β βββ index.html
βββ server/ # Backend Express application
β βββ auth.ts # Authentication logic
β βββ db.ts # Database connection
β βββ gemini.ts # AI waste analysis
β βββ routes.ts # API routes
β βββ storage.ts # Database operations
βββ shared/ # Shared types and schemas
β βββ schema.ts # Database schema & types
βββ scripts/ # Utility scripts
β βββ windows/ # Windows batch files
β βββ export-data.js # Data export utility
β βββ import-data.js # Data import utility
βββ migrations/ # Database migrations
βββ data-export/ # Exported data files
The scripts/windows/ folder contains Windows-specific batch files for easy development:
| File | Purpose |
|---|---|
setup-windows.bat |
First-time setup with dependency installation |
start-windows.bat |
Start development server (recommended) |
dev-windows.bat |
Alternative development server start |
dev-npm.bat |
Start using npm run dev |
build.bat |
Build for production |
test.bat |
Run tests |
fix-windows-directory.bat |
Fix directory-related issues |
- Run Command Prompt as Administrator
- Ensure Node.js is properly installed
- Check PATH environment variables
- Use
fix-windows-directory.batfor permission issues
- Primary: MySQL (if available)
- Fallback: SQLite (automatic fallback)
- Benefits: Cross-platform compatibility, easy local development
# Export current data
node scripts/export-data.js
# Import data to new database
node scripts/import-data.jsEcoBin supports two authentication systems:
- Local Authentication (Default)
- Username/password system
- Access via
/authpage - Session-based with secure cookies
- Purpose: Waste image analysis and classification
- Features: Waste type detection, disposal advice, eco-points calculation
- Setup: Add
GOOGLE_AI_API_KEYto environment variables - Usage: Upload images through the Scanner page
POST /api/login- User loginPOST /api/register- User registrationPOST /api/logout- User logoutGET /api/user- Get current user
POST /api/waste-entries- Create waste entryGET /api/waste-entries- Get user's waste entriesPOST /api/pickup-schedules- Schedule pickupGET /api/pickup-schedules- Get pickup schedules
POST /api/community-reports- Create community reportGET /api/community-reports- Get community reportsGET /api/cleanup-events- Get cleanup eventsPOST /api/cleanup-events/:id/join- Join cleanup event
GET /api/analytics- Get user analyticsGET /api/rewards- Get available rewardsPOST /api/rewards/:id/redeem- Redeem reward
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation Issues: Check this README and try Windows batch files
- Database Issues: Use data export/import scripts for migration
- API Issues: Ensure environment variables are properly set
- Build Issues: Clear node_modules and reinstall dependencies
- Built using real environmental data to raise awareness
- Powered by Google Gemini AI for intelligent waste analysis
- Designed with sustainability and education in mind
Made with β»οΈ for a sustainable future