EcoSort is a comprehensive waste management platform designed to tackle environmental challenges in Bangladesh. The system features AI-powered chatbot assistance, real-time waste vehicle tracking, multi-role authentication (Citizen, Waste Manager, Admin), and location-based services for efficient waste management.
- ๐ค AI Chatbot Assistant: Google Gemini-powered chatbot providing instant waste management guidance and answers
- ๐บ๏ธ Live Waste Map: Real-time tracking of waste collection vehicles with interactive Leaflet maps
- ๐ Recycling Centers Locator: Find nearby recycling facilities with category filters (plastic, glass, metal, paper, electronics)
- ๐ฅ Multi-Role Authentication: Role-based access for Citizens, Waste Managers, and Admins
- ๐ Segregation Guide: Comprehensive searchable database of waste disposal methods
- ๐ Collection Reminders: Timely alerts for waste collection schedules
- ๐ Community Impact Points: Gamified system rewarding eco-friendly actions
- ๐ User Dashboard: Track personal environmental impact and progress
- Citizen (Forest Green Theme): Access to all waste management features and AI assistance
- Waste Manager (Ash Gray Theme): Manage waste collection routes and vehicle tracking
- Admin (Amber/Orange Theme): System administration and user management
- React 19 with Vite 7.2.4
- React Router for navigation
- Tailwind CSS v4 for styling
- Framer Motion for smooth animations
- Lucide React for icons
- React Leaflet + Leaflet for interactive maps
- React Toastify for notifications
- Zustand for state management
- Socket.io Client for real-time features
- Axios for API calls
- Node.js with Express
- MongoDB for database
- Multer for file uploads
- CORS enabled
- Google Gemini AI: AI chatbot assistant
- OpenStreetMap + Leaflet: Map rendering
- OpenCage Geocoding: Address lookup and reverse geocoding
- OpenWeather API: Weather data integration
- Node.js (v16 or higher)
- npm or yarn
- Git
- API Keys (see API_SETUP_GUIDE.md for details)
```bash git clone https://github.com/niloy200119/EcoSort.git cd EcoSort ```
```bash cd server npm install ```
```bash cd ../client npm install ```
Create .env.development file in the client folder:
```bash cd client ```
Add the following configuration:
```env
VITE_API_BASE_URL=http://localhost:5000
VITE_GEMINI_API_KEY=your_gemini_api_key_here
VITE_GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here
VITE_OPENCAGE_API_KEY=your_opencage_api_key_here
VITE_WEATHER_API_KEY=your_openweather_api_key_here ```
๐ For detailed API setup instructions, see API_SETUP_GUIDE.md
```bash
cd server
npm run dev
```
The server will run on http://localhost:5000
```bash
cd client
npm run dev
```
The frontend will run on http://localhost:5173
Open your browser and navigate to http://localhost:5173
- Navigate to
/register - Choose your role: Citizen, Waste Manager, or Admin
- Fill in the required information:
- Email: Must contain
@and end with.com - NID: Must be exactly 10 digits
- Password: Minimum 6 characters
- Organization (for Waste Managers and Admins)
- Email: Must contain
- Green toast notifications will alert you of any validation errors
- Navigate to
/login - Select your role and enter credentials
- Each role has a distinct theme:
- Citizen: Forest Green (#2E6F40)
- Admin: Amber/Orange (#f59e0b)
- Waste Manager: Ash Gray (#6b7280)
- Browse the Segregation Guide
- View the recycling facilities map
- Access the 404 error page (try navigating to an invalid route!)
- Chat with AI Chatbot Assistant (powered by Google Gemini)
- View Live Waste Collection Map with real-time vehicle tracking
- Find nearby recycling centers with category filters
- Save favorite recycling locations
- Set up collection reminders
- Track personal impact points
- View scan history
- Access Waste Manager Dashboard (Ash Gray theme)
- Manage waste collection routes
- Track waste collection vehicles in real-time
- Update collection schedules
- Monitor collection efficiency
- Access Admin Dashboard (Orange theme)
- Manage waste classification database
- Update recycling facility information
- Manage user accounts
- Broadcast announcements
- System configuration and monitoring
- Home (
/) - Landing page with feature overview and role selection - Register (
/register) - Multi-role registration with validation - Login (
/login) - Role-based authentication - Dashboard (
/dashboard) - User statistics and activity tracking - Live Waste Map (
/map) - Real-time vehicle tracking and recycling centers - Guide (
/guide) - Searchable waste disposal database - Scanner (
/scanner) - AI-powered waste identification - Scan Result (
/scan-result) - Detailed disposal instructions - Waste Manager Dashboard (
/waste-manager) - Ash gray themed manager interface - Admin Dashboard (
/admin) - Orange themed admin interface - 404 Not Found (
*) - Animated error page with sad face and tears
- AIChatbot - Floating chatbot with Google Gemini AI integration (bottom-left, forest green theme)
- NavbarNew - Role-aware navigation with theme switching
- Chat - Real-time messaging component
- ThemeProvider - Dynamic theme switching based on user role
POST /api/scan- Upload image for AI classificationGET /api/health- Server health checkGET /api/centers- Get recycling centersPOST /api/auth/register- User registrationPOST /api/auth/login- User authenticationGET /api/users- Get user list (admin only)
All external APIs are configured in client/src/config/api.js:
```javascript export const EXTERNAL_APIS = { GEMINI_API_KEY: import.meta.env.VITE_GEMINI_API_KEY, GOOGLE_MAPS_API_KEY: import.meta.env.VITE_GOOGLE_MAPS_API_KEY, OPENCAGE_API_KEY: import.meta.env.VITE_OPENCAGE_API_KEY, WEATHER_API_KEY: import.meta.env.VITE_WEATHER_API_KEY, }; ```
See API_SETUP_GUIDE.md for detailed setup instructions.
The application uses a sophisticated role-based theming system:
- Background: Forest Green gradient (
#1a4d2e โ #2E6F40 โ #1a4d2e)
- Primary:
#2E6F40(Forest Green) - Accent:
#1a5a30(Dark Green) - Background: Transparent (inherits global forest green)
- Text: White (
#ffffff)
- Primary:
#f59e0b(Amber) - Accent:
#d97706(Dark Amber) - Background: Transparent (inherits global forest green)
- Text: White (
#ffffff)
- Primary:
#6b7280(Ash Gray) - Accent:
#4b5563(Dark Gray) - Background: Gray gradient (
#374151 โ #6b7280 โ #374151) - Text: White (
#ffffff)
- Color: Forest Green (
#2E6F40) - Theme: Dark mode with white text
- Position: Top-right
- Auto-close: 3 seconds
- A.B.M. Mostakim Niloy - Reg: 2021331088
- Md. Saminul Amin - Reg: 2021331014
- Abdul Samad Shanto - Reg: 2021331059
This project is created for academic purposes.
- Real CNN model integration for waste image classification
- Complete MongoDB database integration with all models
- JWT-based authentication system
- Real-time notifications via Socket.io
- Mobile app version (React Native)
- Advanced analytics dashboard
- Multi-language support (Bengali, English)
- Community forums and discussions
- Corporate dashboard for businesses
- QR code scanning for waste bins
- Blockchain-based reward system
- Weather-based collection scheduling
- Integration with city waste management systems
- โ Google Gemini AI chatbot integration
- โ Live waste vehicle tracking with Leaflet maps
- โ Multi-role authentication (Citizen, Waste Manager, Admin)
- โ Role-based theming system
- โ Form validation with toast notifications
- โ Email validation (@ and .com required)
- โ NID validation (exactly 10 digits)
- โ Password validation (minimum 6 characters)
- โ Animated 404 error page
- โ OpenCage geocoding integration
- โ Recycling center locator with category filters
- โ Real-time vehicle position updates
- โ User geolocation features
The application enforces strict validation rules for user security:
- Must contain
@symbol - Must end with
.com - Pattern:
/^[^\s@]+@[^\s@]+\.com$/ - Example:
user@example.comโ |user@exampleโ
- Must be exactly 10 digits
- No letters or special characters allowed
- Pattern:
/^\d{10}$/ - Example:
1234567890โ |123456789โ
- Minimum 6 characters required
- Example:
mypass123โ |passโ
All validation errors are displayed using greenish toast notifications (#2E6F40) in the top-right corner with a 3-second auto-close timer.
For questions or feedback, please reach out to the team members.
Made with ๐ for a cleaner Bangladesh