This is a submission for the Weekend Challenge: Earth Day Edition
๐ฑ What I Built
I built EcoTrack Pro โ a beautiful, privacy-first carbon footprint calculator that helps individuals understand and reduce their environmental impact.
The problem: Most carbon calculators are either too simplistic (3 questions) or buried in corporate reports. People want to know their actual impact and get actionable steps to reduce it.
The solution: EcoTrack Pro asks 15+ lifestyle questions (transport, energy, food, waste, shopping), calculates annual COโe emissions using peerโreviewed data, and provides personalized, quantified recommendations โ not generic tips.
Key features:
- ๐ 15+ input categories with sensible defaults
- โก Realโtime grid intensity by country (Electricity Maps data)
- ๐ Interactive pie & bar charts (toggleable)
- ๐ก Personalized recommendations with estimated COโ savings
- โ๏ธ Anonymous cloud sync via Supabase (no login required!)
- ๐ Beautiful glassmorphic UI, fully responsive
- ๐ Share results on X, Facebook, LinkedIn
๐ฅ Demo
Live Demo: ecotrack-pro.netlify.app
Screenshots:
| The apps | Calculator |
|---|---|
![]() |
![]() |
๐ป Code
GitHub Repository: github.com/setuju/ecotrack
The entire project is vanilla HTML/CSS/JavaScript โ no frameworks, no build steps. Just clone and open index.html.
git clone https://github.com/setuju/ecotrack.git
cd ecotrack
python3 -m http.server 8000
๐ ๏ธ How I Built It
Tech Stack
- Frontend: HTML5, CSS3 (Glassmorphism, CSS Grid/Flexbox), Vanilla JavaScript (ES6+)
- Charts: Chart.js (both pie and bar views)
- Backend/Storage: Supabase (PostgreSQL) with anonymous deviceโID sync
- Data Sources: EPA, IPCC, Poore & Nemecek (2018) Science, Electricity Maps
-
Dev Server: Python
http.server
The Hardest Parts
1. Balancing accuracy with simplicity
I needed enough inputs to be meaningful, but not so many that users bounce. I grouped 15+ fields into collapsible sections and preโfilled defaults based on global averages.
2. Anonymous cloud sync without login
I didn't want to force signโup. Solution: generate a persistent device_id in localStorage, and if the user accepts cookies, sync their footprint to Supabase using that ID. RowโLevel Security ensures they only see their own data.
3. Chart.js "undefined" errors
When toggling between pie and bar charts, I kept getting broken charts. The fix: properly destroy the previous Chart instance before creating a new one, and always use a fresh canvas context.
How GitHub Copilot Helped (Prize Category)
I actively used GitHub Copilot throughout development. Here's exactly where it shined:
| Task | Copilot's Help |
|---|---|
| Emission factor lookup | Wrote the entire EMISSION_FACTORS object with realistic values after I typed // per km gasoline car
|
| Chart configuration | Generated the complete Chart.js options object โ I only tweaked colors |
| Tooltip CSS | Created the .tooltip and .tooltiptext classes from a single comment |
| Share button logic | Wrote the shareToX() and shareToFacebook() functions with correct URL encoding |
| Recommendation messages | Suggested realistic tips like "Reducing weekly driving by 20 km saves ~200 kg COโ/year" |
Without Copilot, I would have spent hours on boilerplate and docs. With it, I focused on UX and architecture.
๐ Prize Categories
I'm submitting this project for the following prize category:
- โ Best Use of GitHub Copilot
(I used Copilot to accelerate development โ generating emission factors, chart configs, share logic, and personalized recommendation text.)
๐ Thank You
Thank you to the DEV Community and the Weekend Challenge judges for organizing this inspiring event. It was a joy to build something meaningful for Earth Day.
If you find this project useful, I'd really appreciate a โญ on GitHub!
This is a submission for the Weekend Challenge: Earth Day Edition


Top comments (2)
48-hour builds are such a great forcing function for shipping! Copilot accelerating the boilerplate while you focus on the carbon calculation logic is exactly how AI pair programming should work.
@aibughunter Exactly! The 48h constraint really strips away the fluff. Copilot handled the repetitive scaffolding so I could keep the core emission logic accurate and the UX clean. Glad that came across!