A comprehensive, secure, and modern waste management platform that connects users with recycling centers, enables efficient waste collection, and promotes sustainable practices through a reward-based ecosystem.
EcoPoint is a full-stack application consisting of:
- Frontend: Modern React/TypeScript web application with beautiful UI
- Backend: Secure Node.js/Express API with MongoDB
- Mobile Support: Progressive Web App (PWA) capabilities
The platform serves multiple user types:
- Regular Users: Submit waste, earn points, redeem rewards
- Businesses: Manage ads, verify coupons, participate in the ecosystem
- Admins: Oversee operations, manage users, review submissions
- Waste Submission & Tracking: Users can submit recyclable waste with photo verification
- Point-Based Reward System: Earn points for sustainable practices
- Coupon Marketplace: Redeem points for discounts at participating businesses
- Recycling Center Locator: Find nearby recycling facilities
- Pickup Scheduling: Schedule convenient waste collection times
- Educational Resources: Learn about proper waste management and recycling
- JWT-based Authentication with refresh tokens
- HMAC Request Signing for mobile app security
- Role-Based Access Control (USER/BUSINESS/ADMIN)
- Device-bound Security to prevent API abuse
- Rate Limiting & CORS Protection
- Input Validation with Zod schemas
- Responsive Design works on all devices
- Modern UI Components built with Shadcn/ui and Radix UI
- Real-time Updates with TanStack Query
- Accessible Interface following WCAG guidelines
- Progressive Web App features for mobile-like experience
EcoPoint/
├── Backend/ # Node.js/Express API Server
│ ├── src/
│ │ ├── controllers/ # Route handlers
│ │ ├── middleware/ # Auth, validation, security
│ │ ├── models/ # MongoDB schemas
│ │ ├── routes/ # API endpoints
│ │ ├── utils/ # Helper functions
│ │ └── server.js # Application entry point
│ └── package.json
├── Frontend/ # React/TypeScript Web App
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utilities and configurations
│ │ ├── pages/ # Application routes/pages
│ │ ├── types/ # TypeScript definitions
│ │ └── App.tsx # Main application component
│ └── package.json
├── README.md # This file
└── LICENSE # MIT License
- Node.js 18+
- MongoDB 4.4+
- npm or yarn
git clone https://github.com/Git-Rexdev/EcoPoint.git
cd EcoPoint
cd Backend
npm install
# Create environment file
cp .env.example .env
# Edit .env with your MongoDB connection string and JWT secrets
# Start development server
npm run dev
The backend will run on http://localhost:3000
cd Frontend
npm install
# Start development server
npm run dev
The frontend will run on http://localhost:5173
NODE_ENV=development
PORT=3000
MONGODB_URI=mongodb://localhost:27017/ecopoint
JWT_ACCESS_SECRET=your-super-secret-access-key
JWT_REFRESH_SECRET=your-super-secret-refresh-key
JWT_ACCESS_EXPIRES_IN=15m
JWT_REFRESH_EXPIRES_IN=7d
CORS_ORIGIN=http://localhost:5173
The frontend automatically connects to http://localhost:3000
in development mode.
POST /api/auth/register
- User registrationPOST /api/auth/login
- User loginPOST /api/auth/refresh
- Refresh access tokenPOST /api/auth/logout
- User logout
GET /api/ads
- List advertisements (public)POST /api/waste/submit
- Submit waste for review (authenticated)GET /api/points/balance
- Get user's point balanceGET /api/coupons
- List available couponsPOST /api/coupons/redeem
- Redeem coupon with pointsPOST /api/coupons/verify
- Verify coupon usage (business)
POST /api/waste/:id/review
- Review waste submissionsGET /api/users
- Manage usersPOST /api/ads
- Create advertisementsPOST /api/coupons
- Create coupons
For detailed API documentation, see Backend README.
- Runtime: Node.js 18+
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT with refresh tokens
- Security: Helmet, CORS, HPP, Rate Limiting
- Validation: Zod schemas
- Password Hashing: Argon2
- Development: Nodemon for hot reloading
- Framework: React 18.3.1 with TypeScript
- Build Tool: Vite 5.4.19
- Styling: Tailwind CSS 3.4.17
- UI Components: Shadcn/ui with Radix UI primitives
- State Management: TanStack Query for server state
- Forms: React Hook Form with Zod validation
- Routing: React Router DOM 6.30
- Icons: Lucide React & FontAwesome
- Charts: Recharts for data visualization
Mobile requests are secured with HMAC-SHA256 signatures:
const signature = HMAC_SHA256(secret, deviceId + clientId + nonce + timestamp + body)
- User registers/logs in with credentials + deviceId
- Server returns JWT access/refresh tokens + device credentials
- Client signs subsequent requests with device secret
- Server validates signatures and JWT tokens
- CORS Allowlist: Restricts cross-origin requests
- Rate Limiting: Prevents abuse and DoS attacks
- Input Validation: All inputs validated with Zod schemas
- SQL Injection Protection: MongoDB with parameterized queries
- XSS Protection: Helmet middleware with CSP headers
- Color Palette: Eco-friendly greens with modern accents
- Typography: Clean, readable fonts optimized for accessibility
- Components: Consistent design language across all interfaces
- Responsive: Mobile-first design that scales to desktop
- Accessibility: WCAG 2.1 AA compliant components
- Dashboard: Overview of user activity and statistics
- Centers: Interactive map of recycling centers
- Pickup: Schedule waste collection appointments
- Rewards: Browse and redeem available coupons
- Guide: Educational content about recycling
- Profile: User account management
npm start # Production server
npm run dev # Development with nodemon
npm run dev # Development server
npm run build # Production build
npm run build:dev # Development build
npm run lint # ESLint code quality check
npm run preview # Preview production build
- ESLint: Configured for React and TypeScript
- TypeScript: Strict type checking enabled
- Prettier: Code formatting (recommended)
- Git Hooks: Pre-commit linting (optional)
EcoPoint is designed as a Progressive Web App (PWA) with:
- Responsive Design: Works seamlessly on mobile devices
- Touch-Friendly Interface: Optimized for touch interactions
- Offline Capabilities: Basic functionality works offline
- App-Like Experience: Can be installed on mobile home screens
EcoPoint promotes sustainability by:
- Reducing Waste: Streamlining recycling processes
- Education: Teaching proper waste management
- Incentivization: Rewarding eco-friendly behaviors
- Efficiency: Optimizing collection routes and schedules
- Community: Building a network of environmentally conscious users
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes following our coding standards
- Test your changes thoroughly
- Commit with descriptive messages:
git commit -m 'Add amazing feature'
- Push to your branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Code Style: Follow existing patterns and conventions
- TypeScript: Use strict typing, avoid
any
types - Testing: Add tests for new features (when test suite is available)
- Documentation: Update relevant documentation
- Security: Follow security best practices
- Performance: Consider performance implications
- Bug fixes and improvements
- New features and enhancements
- Documentation improvements
- UI/UX enhancements
- Security improvements
- Performance optimizations
- Test coverage expansion
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License - Copyright (c) 2025 Manmohan & Piyush
Created by Manmohan & Piyush
For Team Vigilantes, SGIS, Kolhapur
For support, questions, or suggestions:
- Open an issue on GitHub
- Contact the development team
- Check existing documentation
Developer team contacts: zanwarmanmohan@gmail.com LinkedIn
EcoPoint - Advertise in an Eco-Friendly Way
Together, we can build a more sustainable future through technology and community engagement.