Understand, track, and reduce your carbon footprint β one habit at a time.
A beautiful, full-featured carbon footprint dashboard built for the
DEV Weekend Challenge: Earth Day Edition.
β¨ View Live Demo Β»
Β·
π Report Bug
Β·
π‘ Request Feature
Climate change is the defining challenge of our time, but individual action often feels disconnected from real impact. EcoTrack bridges that gap by turning complex carbon footprint data into a personal, visual, and actionable dashboard.
This project is my submission for the DEV Weekend Challenge: Earth Day Edition , tackling the "Build for the Planet" prompt by empowering individuals to understand their impact and make informed, sustainable choices.
β‘ Pro Tip for Judges: EcoTrack leverages GitHub Copilot throughout its development, accelerating the coding process and demonstrating a practical use of AI pair programming β a key category in this challenge.
|
Track emissions across 15+ lifestyle categories, from daily commutes and home energy to diet and shopping habits. |
Calculations adapt to your location using live carbon intensity data from Electricity Maps, making your footprint more accurate. |
|
Understand your impact with interactive bar and pie charts. Toggle between views. Save and track your progress over time. |
Get tailored, actionable tips based on your exact inputsβnot generic advice. Every suggestion includes estimated COβ savings. |
|
Your data is saved locally and optionally synced to Supabase using a device ID (no login required). Complete privacy, full convenience. |
Share your results on X, Facebook, LinkedIn, or copy a link. Built-in tooltips and a "How it Works" modal educate users about climate metrics. |
This project is a showcase of modern, vanilla web technologiesβno heavy frameworks required.
- Frontend: HTML5, CSS3 (Flexbox/Grid, Glassmorphism), JavaScript (ES6+)
- Visualization: Chart.js for beautiful and interactive charts
- Backend & Storage: Supabase (PostgreSQL) for anonymous cloud sync
- Data Sources:
- Emission factors: EPA, IPCC, Poore & Nemecek (2018) Science
- Grid intensity: Electricity Maps API (approximated)
- Icons & Fonts: Font Awesome & Google Fonts (Inter)
- AI Assistance: Developed with GitHub Copilot to accelerate feature implementation
Getting a local copy up and running is incredibly easyβno npm install, no build steps.
- A modern web browser (Chrome, Firefox, Safari, Edge)
- (Optional) A Supabase account for cloud sync features
-
Clone the repository:
git clone https://github.com/setuju/ecotrack.git
-
Navigate to the project directory:
cd ecotrack -
Run with Python's built-in server (or any static server):
python3 server.py
Alternatively, use
python3 -m http.server 8000or the Live Server extension in VS Code. -
Open your browser and visit
http://localhost:8000.
To enable cloud sync, create a free Supabase project and run the following SQL in the SQL Editor:
-- Create the footprints table
CREATE TABLE footprints (
id BIGINT PRIMARY KEY,
device_id TEXT NOT NULL,
total INTEGER NOT NULL,
inputs JSONB NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
-- Enable Row Level Security and allow anonymous insert/select
ALTER TABLE footprints ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Enable insert for all" ON footprints FOR INSERT WITH CHECK (true);
CREATE POLICY "Enable select based on device_id" ON footprints FOR SELECT USING (device_id = current_setting('request.jwt.claims')::json->>'sub');Then, update config.js with your Supabase URL and Anon Key.
ecotrack/
βββ index.html # Main application structure
βββ style.css # Styling (Glassmorphism, responsive, tooltips)
βββ script.js # Core logic, calculations, Supabase integration
βββ config.js # Environment configuration (Supabase keys)
βββ server.py # Simple Python development server
βββ assets/ # Logo, screenshots, and favicon
βββ LICENSE
βββ README.md # You are here!
This submission aligns perfectly with the DEV Weekend Challenge's judging criteria:
- π― Relevance to Theme: Directly addresses "Build for the Planet" by creating a tool for personal climate action.
- π‘ Creativity: Combines a beautiful, intuitive UI with a robust backend (Supabase) to offer a full-stack experience, all in vanilla JavaScript.
- βοΈ Technical Execution: Implements a complex calculator, interactive charts, anonymous cloud sync, and share functionality in a clean, maintainable codebase.
- βοΈ Writing Quality: Both this README and the in-app text are written to be clear, engaging, and actionable.
- π οΈ Use of Prize Technology: Actively used GitHub Copilot to write functions, generate boilerplate, and debug, significantly speeding up development.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- 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
Setuju β @setuju
Project Link: EcoTRACK
DEV Community Post: Read the story behind EcoTrack
Live Demo: ecotrack-pro.netlify.app
π Every calculation is a step toward a greener planet. Thank you for visiting! If you find this project useful, please consider giving it a β on GitHub!


