A comprehensive web platform for tracking carbon footprint, managing waste, monitoring renewable energy, and reducing plastic pollution. Built with Node.js, Express.js, MongoDB, and real-time WebSocket notifications.
Created by Nihan Nihu (nihannihu)
- GitHub: nihannihu
- Instagram: @nihannihuu
- LinkedIn: nihan-nihu
- Track daily activities (transportation, energy, food, waste, water)
- Real-time COβ emission calculations
- Personalized reduction tips
- Visual charts and analytics
- Monthly/yearly summaries
- AI-powered waste classification
- Instant disposal instructions
- Environmental impact information
- Comprehensive waste categories database
- Log solar, wind, hydro, and other renewable sources
- Carbon offset calculations
- Energy generation vs. consumption tracking
- Savings and impact reports
- Track plastic usage by type
- Set reduction goals
- Monitor recycling rates
- Progress tracking and alerts
- WebSocket-powered live updates
- Achievement notifications
- Goal progress alerts
- Community statistics
- AI-driven recommendations
- Impact-based suggestions
- Category-specific advice
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM
- Socket.IO - Real-time communication
- JWT - Authentication
- bcryptjs - Password hashing
- HTML5 - Markup
- CSS3 - Styling (Flexbox/Grid)
- JavaScript (ES6+) - Interactivity
- Chart.js - Data visualization
- Font Awesome - Icons
- Node.js (v14 or higher)
- MongoDB (v4.4 or higher)
- npm or yarn
- Clone the repository
git clone <repository-url>
cd "mega climate change and sustainability"- Install dependencies
npm install- Configure environment variables
Create a
.envfile in the root directory:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/climate-sustainability
JWT_SECRET=your_super_secret_jwt_key_change_in_production
JWT_EXPIRE=7d
NODE_ENV=development- Start MongoDB
mongod- Run the application
Development mode:
npm run devProduction mode:
npm start- Access the application Open your browser and navigate to:
http://localhost:5000
mega climate change and sustainability/
βββ models/ # MongoDB schemas
β βββ User.js
β βββ Activity.js
β βββ WasteType.js
β βββ RenewableEnergy.js
β βββ PlasticUsage.js
β βββ Notification.js
βββ routes/ # API routes
β βββ authRoutes.js
β βββ carbonRoutes.js
β βββ wasteRoutes.js
β βββ renewableRoutes.js
β βββ plasticRoutes.js
β βββ notificationRoutes.js
β βββ utilityRoutes.js
βββ middleware/ # Custom middleware
β βββ auth.js
β βββ validate.js
βββ utils/ # Utility functions
β βββ carbonCalculator.js
βββ public/ # Frontend files
β βββ index.html
β βββ login.html
β βββ register.html
β βββ dashboard.html
β βββ css/
β β βββ style.css
β β βββ auth.css
β β βββ dashboard.css
β βββ js/
β βββ main.js
β βββ auth.js
β βββ dashboard.js
βββ server.js # Express server
βββ package.json
βββ README.md
POST /api/auth/register- Register new userPOST /api/auth/login- User loginGET /api/auth/profile- Get user profilePUT /api/auth/profile- Update user profilePOST /api/auth/refresh-token- Refresh JWT token
POST /api/carbon-activities- Add activityGET /api/carbon-activities- Get activitiesPUT /api/carbon-activities/:id- Update activityDELETE /api/carbon-activities/:id- Delete activityGET /api/carbon-footprint/summary- Get summaryGET /api/carbon-footprint/tips- Get personalized tips
POST /api/waste/classify- Classify waste itemGET /api/waste/categories- Get waste categories
POST /api/renewable-energy- Log energy dataGET /api/renewable-energy- Get energy logsGET /api/renewable-energy/summary- Get summary
POST /api/plastic-usage- Log plastic usageGET /api/plastic-usage- Get plastic logsGET /api/plastic-usage/summary- Get summary
GET /api/notifications- Get notificationsPOST /api/notifications/mark-read/:id- Mark as readDELETE /api/notifications/:id- Delete notification
GET /api/activities/types- Get activity typesGET /api/environmental-data/carbon-factors- Get emission factorsGET /api/stats/global- Get global statistics
The platform uses scientifically-backed emission factors:
- Transportation: Car (0.192 kg COβ/km), Bus (0.089 kg/km), Train (0.041 kg/km)
- Energy: Electricity (0.5 kg COβ/kWh), Gas (2.0 kg/mΒ³)
- Food: Meat (27 kg COβ/kg), Vegetarian meals (2 kg/kg)
- Waste: Landfill (0.5 kg/kg), Recycled (-0.2 kg/kg)
- Auto-calculation: Emissions calculated automatically based on input
- Real-time updates: WebSocket notifications for achievements
- Personalized tips: AI-driven recommendations based on user behavior
- Goal tracking: Set and monitor carbon and plastic reduction goals
- Visual analytics: Interactive charts with Chart.js
- JWT-based authentication
- Password hashing with bcrypt
- Input validation with express-validator
- CORS protection
- Environment variable protection
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Fully responsive design optimized for:
- Desktop (1200px+)
- Tablet (768px - 1199px)
- Mobile (< 768px)
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the ISC License.
Built for climate action and sustainability awareness by Nihan Nihu.
Connect with Nihan Nihu:
- GitHub: nihannihu - Primary development work and open source contributions
- Instagram: @nihannihuu - Climate action updates and sustainability tips
- LinkedIn: nihan-nihu - Professional profile and networking
Nihan is a climate tech developer who built the EcoTrack sustainability platform to empower individuals to take meaningful climate action through data-driven insights and community engagement.
- Carbon emission factors from EPA and IPCC
- Font Awesome for icons
- Chart.js for visualizations
- Socket.IO for real-time features
For support, email support@ecotrack.com or open an issue in the repository.
- Mobile app (React Native)
- Machine learning for better waste classification
- Social features and community challenges
- Carbon offset marketplace integration
- Integration with smart home devices
- Gamification with badges and leaderboards
This project is optimized for search engine visibility with specific focus on the creator's online identities:
Nihan Nihu's Digital Presence:
- GitHub Username: nihannihu
- Instagram Handle: @nihannihuu
- LinkedIn Profile: nihan-nihu
Search Instructions: To find Nihan Nihu's work across platforms:
- Search "Nihan Nihu" on Google for comprehensive results
- Search "@nihannihuu" on Instagram for sustainability content
- Search "nihan-nihu" on LinkedIn for professional profile
- Search "nihannihu" on GitHub for open source projects
The platform implements structured data markup, meta tags, and canonical URLs to enhance search engine visibility and cross-platform recognition.
Make a difference, one action at a time! π