Skip to content

ecoSync is a waste management logistics platform built with React, Node.js, and MongoDB. It provides real-time fleet tracking, automated waste segregation guidance, and analytics for municipal waste collection.

Notifications You must be signed in to change notification settings

imsahil11/ecoSync

Repository files navigation

EcoSync

A modern waste management platform with user scheduling, admin dashboard, and real-time notifications.

React Node.js MongoDB

Features

  • 🗓️ 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

Tech Stack

Frontend: React, Vite, Tailwind CSS, Framer Motion, Lucide Icons, Leaflet
Backend: Node.js, Express.js, MongoDB (Mongoose), JWT Authentication


Prerequisites

  • Node.js v18+
  • MongoDB Atlas account (or local MongoDB)
  • npm or yarn

Local Development Setup

1. Clone the repository

git clone https://github.com/yourusername/ecoSync.git
cd ecoSync

2. Install dependencies

npm install

3. Configure environment variables

Create 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

4. Seed admin user (first time only)

node server/seedAdmin.js

This creates an admin account:

5. Run the application

Run both frontend and backend together:

npm run dev:full

Or run separately:

# Terminal 1 - Backend
npm run server

# Terminal 2 - Frontend
npm run dev

6. Access the app


Available Scripts

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

Project Structure

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

Default Accounts

After running seedAdmin.js:

Role Email Password
Admin admin@ecosync.com admin123

Users can register through the app.

About

ecoSync is a waste management logistics platform built with React, Node.js, and MongoDB. It provides real-time fleet tracking, automated waste segregation guidance, and analytics for municipal waste collection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages