EcoShift is a full-stack web application that helps individuals track sustainable daily habits, measure their environmental impact, and understand how everyday choices contribute to reducing CO₂ emissions.
The platform transforms sustainability activities into measurable insights through CO₂ savings calculations, interactive analytics, habit tracking, user profiles, date-based filtering, and exportable reports.
Environmental Sustainability & Habit Tracking
Many people want to adopt sustainable habits but struggle to understand the measurable environmental impact of their everyday actions. EcoShift addresses this gap by converting common sustainable activities into understandable CO₂ savings metrics.
EcoShift allows users to:
- Create and manage personal profiles.
- Select and record sustainable activities.
- Specify the quantity and date of each activity.
- Calculate estimated CO₂ savings using predefined emission factors.
- View individual and community-level environmental impact.
- Analyze progress through interactive charts.
- Export collected data and reports for further analysis or presentation.
The backend processes each activity using predefined CO₂ factors and stores the resulting records in a lightweight SQLite database.
User
↓
Create Profile
↓
Select Sustainable Habit
↓
Log Activity
↓
CO₂ Savings Calculation
↓
SQLite Database
↓
Analytics & Dashboard
↓
Reports / CSV / Presentation Data
- CO₂ emission factors are based on predefined standard estimates for supported activities.
- Example: avoiding approximately 0.21 kg CO₂ per kilometer of car travel by choosing cycling instead.
- Users are expected to accurately report their sustainable activities.
- The prototype is designed for a single-server deployment.
- CO₂ savings represent estimated environmental impact rather than laboratory-level measurements.
Track everyday environmentally friendly activities such as:
- Cycling
- Plant-based meals
- Recycling
- Walking
- Public transportation
- And other configurable sustainability actions
Monitor important sustainability metrics including:
- Total CO₂ saved
- Total sustainable actions
- Active users
- Average CO₂ savings per person
- Category-wise impact
- Top-performing users
- Impact within a selected date range
Users can:
- Create profiles
- Store basic profile information
- Switch between profiles
- Manage individual sustainability activity records
Each sustainability activity can include:
- Habit type
- Quantity
- Date
- Optional notes
- Automatically calculated CO₂ savings
Analyze environmental impact using:
- Custom date ranges
- Quick date selections
- Historical activity records
- Filtered dashboard statistics
Interactive visualizations powered by Chart.js provide a clearer understanding of:
- CO₂ savings trends
- Activity categories
- User performance
- Overall community impact
EcoShift provides multiple ways to use the collected data:
- CSV export
- Summary reports
- Individual user reports
- Presentation-ready data
- Stakeholder-oriented insights
Browser local storage is used for:
- Auto-saving form information
- Maintaining user preferences
- Improving the overall user experience
EcoShift follows a modular MVC-inspired architecture to keep application logic organized and maintainable.
EcoShift
│
├── Frontend
│ ├── HTML
│ ├── CSS / Bootstrap
│ ├── JavaScript
│ └── Chart.js
│
├── Backend
│ ├── Node.js
│ ├── Express.js
│ ├── REST API
│ └── Middleware
│
├── Database
│ └── SQLite
│
└── Configuration
└── config.json
- Separation of concerns
- Modular backend organization
- RESTful API design
- Centralized configuration
- Lightweight database architecture
- Maintainable application structure
The application incorporates several security-focused practices:
- Helmet for HTTP security headers
- Strict Content Security Policy (CSP)
- Express Rate Limit for request throttling
- Express Validator for input validation
- HPP for HTTP Parameter Pollution protection
- Request payload limits
- Server-side validation
- Controlled API endpoints
These measures help reduce common web application security risks while keeping the prototype lightweight.
EcoShift is designed with accessibility in mind and follows WCAG-oriented practices including:
- Semantic HTML
- ARIA attributes where required
- Keyboard-friendly interactions
- Accessible form controls
- Readable typography
- Sufficient color contrast
- Approximately 4.5:1 or greater contrast for standard text where applicable
| Layer | Technologies |
|---|---|
| Frontend | HTML5, CSS3, Bootstrap, JavaScript |
| Visualization | Chart.js |
| Backend | Node.js, Express.js |
| Database | SQLite |
| Utilities | date-fns, body-parser, CORS |
| Security | Helmet, Express Rate Limit, Express Validator, HPP |
| Configuration | JSON |
ecoshift-carbon-footprint-tracker/
│
├── .gitignore
├── LICENSE
├── README.md
├── co2_challenge.db
├── config.json
├── package.json
├── package-lock.json
└── server.js
The application is structured to support further modularization as the project grows.
Make sure the following are installed:
- Node.js v14 or later
- npm
You can verify your installation with:
node --version
npm --versiongit clone https://github.com/rishav8877/ecoshift-carbon-footprint-tracker.gitcd ecoshift-carbon-footprint-trackernpm installnpm startFor development:
npm run devVisit:
http://localhost:3000
The landing page introduces EcoShift with key features and a clear call-to-action for users to get started.
A summary dashboard displaying total CO₂ saved, active users, total actions, and average savings per person within a selected date range.
A form to log sustainable actions with fields for habit selection, date, quantity, and optional notes.
A list of recently logged sustainable actions with details like date, quantity, and CO₂ savings.
A profile creation form for entering user details such as name, email, and internship start date.
An export and reporting interface offering options to download CSV data, generate summary reports, and prepare presentation-ready insights.
Provides raw activity data suitable for:
- Microsoft Excel
- Google Sheets
- Data analysis
- Further processing
Provides an executive-level overview containing important sustainability metrics.
Provides user-specific sustainability progress and activity summaries.
Generates stakeholder-ready insights that can be used for:
- Demonstrations
- Sustainability presentations
- Project evaluations
- Community reporting
Application settings can be managed through:
config.json
The configuration system supports settings related to:
- Application themes
- Language preferences
- Date formats
- CO₂ emission factors
- Data retention
- Export formats
Default retention period:
365 days
- CSV
- HTML
EcoShift exposes RESTful API endpoints for managing users, habits, activity logs, and dashboard information.
GET /api/habitsRetrieve available sustainability habits.
POST /api/users
GET /api/usersCreate and retrieve user profiles.
POST /api/users/:userId/habits
GET /api/users/:userId/habitsManage habits associated with a specific user.
POST /api/logs
GET /api/users/:userId/logsCreate and retrieve sustainability activity records.
GET /api/dashboardRetrieve aggregated sustainability and CO₂ impact metrics.
EcoShift uses predefined emission factors to estimate the environmental impact of logged activities.
A simplified calculation can be represented as:
CO₂ Savings = Activity Quantity × CO₂ Saving Factor
For example:
Cycling Distance = 10 km
Estimated CO₂ Saving Factor = 0.21 kg/km
Estimated CO₂ Saved = 10 × 0.21
= 2.10 kg CO₂
These values are estimates intended to make sustainability impact easier to understand and compare.
EcoShift is not limited to individual progress.
By aggregating activity data, the platform can demonstrate collective environmental impact through:
- Total community CO₂ savings
- Combined sustainable actions
- User participation
- Category-level contribution
- Top-performing participants
This helps turn individual sustainable choices into a measurable community-level outcome.
1. User opens EcoShift
↓
2. Creates a profile
↓
3. Selects sustainable habits
↓
4. Logs daily activities
↓
5. Backend calculates CO₂ savings
↓
6. Data is stored in SQLite
↓
7. Dashboard updates automatically
↓
8. User analyzes progress
↓
9. Data can be exported as reports
EcoShift was developed with the following goals:
- Make environmental impact easier to understand
- Encourage consistent sustainable habits
- Quantify everyday sustainability decisions
- Provide accessible sustainability analytics
- Enable community-level impact tracking
- Make environmental data easy to export and present
Potential future improvements include:
- Cloud database integration
- Progressive Web App support
- Sustainability reminders and notifications
- AI-powered sustainability recommendations
- Location-aware activity tracking
- Gamification and achievement badges
- Weekly and monthly sustainability goals
- Advanced carbon-footprint categories
- Community challenges and leaderboards
- Authentication and role-based access
- Advanced analytics and predictive insights
- Multi-language support
| Requirement | Implementation |
|---|---|
| Repository Visibility | Public GitHub Repository |
| Repository Size | Designed to remain under 10 MB |
| Git Strategy | Main branch |
| Backend | Node.js + Express.js |
| Database | SQLite |
| API | RESTful API endpoints |
| Security | Helmet, Rate Limiting, Validation, HPP |
| Accessibility | Semantic HTML, ARIA, contrast-focused design |
| Analytics | Chart.js |
| Export | CSV, HTML, PDF |
| Configuration | config.json |
This project is licensed under the MIT License.
See the LICENSE file for more information.
Special thanks to:
- Challenge stakeholders and mentors for their feedback
- The open-source community
- Chart.js for data visualization
- Bootstrap for responsive UI components
- date-fns for date manipulation utilities
- Express.js and the Node.js ecosystem for backend development
Track your habits. Measure your impact. Shift towards a greener future.
EcoShift turns everyday sustainable actions into measurable environmental impact — helping individuals and communities understand how small changes can create meaningful results.