WasteWise is a comprehensive solution for urban waste management, featuring a mobile app for citizens and collectors, a web admin dashboard for oversight, and an IoT-ready backend for real-time monitoring.
- Backend: Node.js, Express, MongoDB, Socket.io (Real-time updates)
- Mobile: React Native (Expo), Redux Toolkit, Lucide Icons
- Frontend: React (Vite/Tailwind) - Admin Dashboard
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- MongoDB (Local instance or MongoDB Atlas URI)
- EAS CLI (
npm install -g eas-cli) for mobile builds - Expo Go (On your mobile device for testing)
The backend serves both the mobile app and the web dashboard.
- Navigate to Folder:
cd backend - Install Dependencies:
npm install
- Environment Variables: Create a
.envfile in thebackendfolder:For the full set of required variables, copy backend/.env.example and fill in your real values.PORT=5000 MONGO_URI=your_mongodb_atlas_uri JWT_SECRET=your_secret_key CLIENT_URL=http://localhost:5173
- Run Dev Server:
npm run dev
- Seed Test Data (Important for first-time setup):
node seed_test_data.js
Use the same backend keys in both places:
- Local development: create
backend/.envfrom backend/.env.example - Render production: set the same variables in the Render service environment
Required values include MongoDB, JWT, CORS URLs, Cloudinary, and Brevo API:
BREVO_API_KEY=<your Brevo API key>BREVO_SENDER_EMAIL=<your verified Brevo sender email>BREVO_SENDER_NAME=WasteWiseBREVO_API_TIMEOUT_MS=15000
Do not commit your real .env file to git.
The mobile app handles garbage reporting, reward tracking, and bin discovery.
-
Navigate to Folder:
cd mobile -
Install Dependencies:
npm install
-
Configure API URL: Open
src/utils/constants.jsand update theBASE_URLwith your Local IP Address:export const BASE_URL = 'http://192.168.x.x:5000/api';
Tip: Find your IP by running
ipconfig(Windows) orifconfig(Mac). -
Run Development Server:
npx expo start
-
Open on Device: Scan the QR code with the Expo Go app.
To create a standalone installable file:
- Login to Expo:
eas login - Build:
eas build -p android --profile production - Download: Download the APK from the link provided after the build finishes.
- Navigate to Folder:
cd frontend - Install Dependencies:
npm install
- Run Dev Server:
npm run dev
- EADDRINUSE (Port 5000 busy): Another process is using the port. Run
npx kill-port 5000to clear it. - Network Error in Mobile: Ensure your phone and computer are on the same Wi-Fi. Check that your Windows Firewall isn't blocking port 5000.
- Camera/Location Crash: Ensure you are using a physical device. Emulators often struggle with camera permissions.
- Points not showing: Use the
seed_test_data.jsscript in the backend to populate your account with initial data.
/backend: Express API, Mongoose Models, Controllers./mobile: React Native app source code./frontend: Admin Dashboard web application./backend/uploads: Store for reported garbage images.