A modern waste management platform with user scheduling, admin dashboard, and real-time notifications.
- 🗓️ Schedule Pickups - Users can schedule waste collection with map-based location selection
- 📊 Admin Dashboard - Manage users, pickups, and homepage statistics
- 🔔 Notifications - Real-time notifications for pickup status updates
- 🌍 Interactive Map - Select pickup location using Leaflet maps
- 📱 Responsive Design - Works on desktop and mobile
Frontend: React, Vite, Tailwind CSS, Framer Motion, Lucide Icons, Leaflet
Backend: Node.js, Express.js, MongoDB (Mongoose), JWT Authentication
- Node.js v18+
- MongoDB Atlas account (or local MongoDB)
- npm or yarn
git clone https://github.com/yourusername/ecoSync.git
cd ecoSyncnpm installCreate a .env file in the root directory:
PORT=5000
MONGODB_URI=mongodb+srv://YOUR_USERNAME:YOUR_PASSWORD@cluster.mongodb.net/ecosync
JWT_SECRET=your_super_secret_jwt_key_here
⚠️ Replace with your actual MongoDB Atlas connection string
node server/seedAdmin.jsThis creates an admin account:
- Email: admin@ecosync.com
- Password: admin123
Run both frontend and backend together:
npm run dev:fullOr run separately:
# Terminal 1 - Backend
npm run server
# Terminal 2 - Frontend
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:5000/api
| Command | Description |
|---|---|
npm run dev |
Start frontend (Vite) |
npm run server |
Start backend (Nodemon) |
npm run dev:full |
Start both frontend & backend |
npm run build |
Build for production |
ecoSync/
├── src/ # Frontend (React)
│ ├── components/ # UI components
│ │ ├── admin/ # Admin dashboard components
│ │ ├── dashboard/ # User dashboard components
│ │ ├── landing/ # Landing page components
│ │ ├── layout/ # Navbar, Footer
│ │ └── ui/ # Reusable UI (Map picker, Notifications)
│ ├── pages/ # Page views
│ ├── context/ # Auth context
│ └── api/ # Axios API configuration
├── server/ # Backend (Express)
│ ├── config/ # Database configuration
│ ├── middleware/ # Auth middleware
│ ├── models/ # Mongoose models (User, Pickup, Notification)
│ ├── routes/ # API routes
│ └── index.js # Server entry point
└── public/ # Static assets
After running seedAdmin.js:
| Role | Password | |
|---|---|---|
| Admin | admin@ecosync.com | admin123 |
Users can register through the app.