Skip to content

Climate change is the defining challenge of our time, but individual action can make a real difference. EcoTrack provides the tools and insights you need to understand your environmental impact and make informed decisions for a sustainable future.

Notifications You must be signed in to change notification settings

nihannihu/EcoTrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

EcoTrack - Climate Change & Sustainability Platform

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)

🌟 Features

1. Carbon Footprint Calculator

  • Track daily activities (transportation, energy, food, waste, water)
  • Real-time COβ‚‚ emission calculations
  • Personalized reduction tips
  • Visual charts and analytics
  • Monthly/yearly summaries

2. Smart Waste Sorting

  • AI-powered waste classification
  • Instant disposal instructions
  • Environmental impact information
  • Comprehensive waste categories database

3. Renewable Energy Tracker

  • Log solar, wind, hydro, and other renewable sources
  • Carbon offset calculations
  • Energy generation vs. consumption tracking
  • Savings and impact reports

4. Plastic Pollution Monitor

  • Track plastic usage by type
  • Set reduction goals
  • Monitor recycling rates
  • Progress tracking and alerts

5. Real-Time Notifications

  • WebSocket-powered live updates
  • Achievement notifications
  • Goal progress alerts
  • Community statistics

6. Personalized Eco Tips

  • AI-driven recommendations
  • Impact-based suggestions
  • Category-specific advice

πŸš€ Technology Stack

Backend

  • Node.js - Runtime environment
  • Express.js - Web framework
  • MongoDB - Database
  • Mongoose - ODM
  • Socket.IO - Real-time communication
  • JWT - Authentication
  • bcryptjs - Password hashing

Frontend

  • HTML5 - Markup
  • CSS3 - Styling (Flexbox/Grid)
  • JavaScript (ES6+) - Interactivity
  • Chart.js - Data visualization
  • Font Awesome - Icons

πŸ“¦ Installation

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB (v4.4 or higher)
  • npm or yarn

Steps

  1. Clone the repository
git clone <repository-url>
cd "mega climate change and sustainability"
  1. Install dependencies
npm install
  1. Configure environment variables Create a .env file 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
  1. Start MongoDB
mongod
  1. Run the application

Development mode:

npm run dev

Production mode:

npm start
  1. Access the application Open your browser and navigate to:
http://localhost:5000

πŸ—‚οΈ Project Structure

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

πŸ“‘ API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - User login
  • GET /api/auth/profile - Get user profile
  • PUT /api/auth/profile - Update user profile
  • POST /api/auth/refresh-token - Refresh JWT token

Carbon Footprint

  • POST /api/carbon-activities - Add activity
  • GET /api/carbon-activities - Get activities
  • PUT /api/carbon-activities/:id - Update activity
  • DELETE /api/carbon-activities/:id - Delete activity
  • GET /api/carbon-footprint/summary - Get summary
  • GET /api/carbon-footprint/tips - Get personalized tips

Waste Sorting

  • POST /api/waste/classify - Classify waste item
  • GET /api/waste/categories - Get waste categories

Renewable Energy

  • POST /api/renewable-energy - Log energy data
  • GET /api/renewable-energy - Get energy logs
  • GET /api/renewable-energy/summary - Get summary

Plastic Usage

  • POST /api/plastic-usage - Log plastic usage
  • GET /api/plastic-usage - Get plastic logs
  • GET /api/plastic-usage/summary - Get summary

Notifications

  • GET /api/notifications - Get notifications
  • POST /api/notifications/mark-read/:id - Mark as read
  • DELETE /api/notifications/:id - Delete notification

Utilities

  • GET /api/activities/types - Get activity types
  • GET /api/environmental-data/carbon-factors - Get emission factors
  • GET /api/stats/global - Get global statistics

🎨 Features Highlight

Carbon Emission Factors

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)

Smart Features

  • 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

πŸ”’ Security Features

  • JWT-based authentication
  • Password hashing with bcrypt
  • Input validation with express-validator
  • CORS protection
  • Environment variable protection

🌐 Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

πŸ“± Responsive Design

Fully responsive design optimized for:

  • Desktop (1200px+)
  • Tablet (768px - 1199px)
  • Mobile (< 768px)

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the ISC License.

πŸ‘₯ Authors

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.

πŸ™ Acknowledgments

  • Carbon emission factors from EPA and IPCC
  • Font Awesome for icons
  • Chart.js for visualizations
  • Socket.IO for real-time features

πŸ“ž Support

For support, email support@ecotrack.com or open an issue in the repository.

πŸš€ Future Enhancements

  • 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

πŸ” SEO & Social Media Presence

This project is optimized for search engine visibility with specific focus on the creator's online identities:

Nihan Nihu's Digital Presence:

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! 🌍

About

Climate change is the defining challenge of our time, but individual action can make a real difference. EcoTrack provides the tools and insights you need to understand your environmental impact and make informed decisions for a sustainable future.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published