A comprehensive recycling management system with:
- Mobile app for users/recyclers (Flutter)
- Admin website for recycling companies (React.js)
- Backend API (Node.js)
- Database (MongoDB)
- AI-powered recyclable item recognition
Eco Track
├── backend/ # Node.js + MongoDB backend
├── admin-website/ # React.js admin frontend
├── user-app/ # Flutter user mobile app
└── ai-service/ # AI image recognition service
- User Registration, Authentication & Profile Management
- Educational Resources
- Recyclable Item Submission (with AI scanning)
- Pickup Scheduling & Tracking
- Live Location Tracking of Recycling Trucks
- Notifications
- Payment Processing & Rewards
- User Management
- Recyclable Item Review & Approval
- Pickup Scheduling & Route Optimization
- Real-time Location Monitoring
- Payment Management
- Frontend (Web): React.js (HTML, CSS, JavaScript)
- Frontend (Mobile): Flutter
- Backend: Node.js
- Database: MongoDB
- AI Service: Node.js with TensorFlow.js (mock implementation)
- Navigate to the
backenddirectory - Install dependencies:
npm install - Start the server:
npm start - The backend will be available at
http://localhost:5000
- Navigate to the
admin-websitedirectory - Install dependencies:
npm install - Start the development server:
npm start - The admin website will be available at
http://localhost:3000
- Navigate to the
user-appdirectory - Install dependencies:
flutter pub get - Run the app:
flutter run - The app will run on an emulator or connected device
- Navigate to the
ai-servicedirectory - Install dependencies:
npm install - Start the service:
npm start - The AI service will be available at
http://localhost:5001
To test the registration functionality:
- Make sure the backend server is running
- Navigate to the
backenddirectory - Run the registration test:
npm run test:registration
This will test admin registration and user registration with different combinations of address and postal code.
To test the API endpoints directly:
- Make sure the backend server is running
- Navigate to the
backenddirectory - Run the API test:
npm run test:api
This will test the basic API endpoints and help diagnose connectivity issues.
The registration flow has been optimized to ensure seamless navigation to the home page after successful registration:
- User fills in registration details in the mobile app
- Upon successful registration, the app:
- Shows a success message
- Saves authentication token to device storage
- Navigates to the home page after a short delay
- User can immediately access all features without additional login steps
The system includes robust error handling for network issues and provides clear feedback to users.
The backend API is available at http://localhost:5000/api
POST /api/auth/register- Register a new user (address is optional, postalCode is required)POST /api/auth/register-admin- Register a new admin (first admin registration is public, subsequent registrations require admin authentication)POST /api/auth/login- Login userGET /api/auth/profile- Get user profilePUT /api/auth/profile- Update user profile
POST /api/items- Submit a new recyclable itemGET /api/items/user- Get user's itemsGET /api/items- Get all pending items (admin only)PUT /api/items/:id/review- Review an item (admin only)
GET /api/pickups/user- Get user's pickupsGET /api/pickups- Get all pickups (admin only)PUT /api/pickups/:id- Update pickup schedule (admin only)
POST /api/payments- Process a paymentGET /api/payments/user- Get user's payment historyGET /api/payments- Get all payments (admin only)PUT /api/payments/:id/complete- Complete a payment (admin only)
GET /api/educational- Get all educational resourcesGET /api/educational/search- Search resources by categoryGET /api/educational/:id- Get a specific resourcePOST /api/educational- Create a resource (admin only)PUT /api/educational/:id- Update a resource (admin only)DELETE /api/educational/:id- Delete a resource (admin only)
GET /api/notifications- Get user's notificationsPUT /api/notifications/:id/read- Mark notification as readGET /api/notifications/unread-count- Get unread notifications count
GET /api/trucks- Get all trucks (admin only)GET /api/trucks/:id- Get a specific truck (admin only)POST /api/trucks- Create a truck (admin only)PUT /api/trucks/:id- Update a truck (admin only)PUT /api/trucks/:id/location- Update truck location (admin only)
GET /api/ai/health- Check AI service healthGET /api/ai/categories- Get supported categories
- User registers/logs in through the mobile app
- User submits recyclable items with photos
- If AI recognition is enabled, the backend sends the image to the AI service
- Admin reviews submitted items through the admin website
- Accepted items are automatically scheduled for pickup
- Users can track pickup schedules and truck locations
- After collection, payments are processed and rewards are awarded
- Users receive notifications throughout the process
The system uses MongoDB with the following collections:
- Users
- RecyclableItems
- Pickups
- Trucks
- Payments
- EducationalResources
- Notifications
- All API endpoints (except login/register) require authentication
- Admin-only endpoints require admin role
- Passwords are hashed before storage
- JWT tokens are used for authentication
- HTTPS should be used in production
- Implement real AI model for image recognition
- Add route optimization for pickup trucks
- Implement push notifications
- Add analytics dashboard for admins
- Integrate with payment gateways
- Add social features for users