explaingit

akaakshat246/ecoscore-browser-extension

16JavaScriptAudience · developerComplexity · 3/5Setup · hard

TLDR

A Chrome extension that shows an AI-generated sustainability rating and CO2 estimate on Amazon and Flipkart product pages, with greener alternatives and a personal progress tracker.

Mindmap

mindmap
  root((ecoscore))
    What it does
      Sustainability rating
      CO2 estimate
      Letter grade A+ to D
      Greener alternatives
    How it works
      Reads product title
      Calls Gemini AI
      Floating widget
    User Tracking
      Google sign-in
      CO2 avoided total
      Rank system
    Setup
      Local Node.js server
      Chrome dev mode
      Own API keys
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Get an instant CO2 estimate and letter grade on any Amazon or Flipkart product page while you browse.

USE CASE 2

See three greener alternative products suggested by AI each time you view a shopping page.

USE CASE 3

Track how much CO2 you have theoretically avoided over time and earn ranks like Climate Champion.

USE CASE 4

Use this project as a template for building your own AI-powered Chrome extension with a local Node.js backend.

Tech stack

JavaScriptNode.jsChrome Extensions APIGoogle Gemini AI

Getting it running

Difficulty · hard Time to first run · 1h+

Requires your own Gemini API key and Google OAuth credentials, plus loading the extension manually in Chrome developer mode and running a local Node.js server.

No license information was mentioned in the explanation.

In plain English

EcoScore AI is a Chrome browser extension that adds a sustainability rating to product pages on shopping websites like Amazon and Flipkart. When you visit a product page, the extension reads the product title and keywords, sends them to Google's Gemini AI, and gets back an estimated carbon footprint measured in kg CO2, along with a letter grade from A+ to D. The extension shows this information in a floating widget on the page. The widget displays the grade, a short explanation of why the product received it, and three suggested alternatives with a smaller environmental impact. The widget can be dragged around the page if it gets in the way. If you sign in with a Google account, the extension tracks your activity over time. It records how much CO2 you have theoretically avoided by choosing greener products, and assigns you a rank based on that total. Ranks go from Susty Novice at the low end to Climate Champion once you have saved 30 kg or more. A dashboard panel shows your stats and progress. The backend is a Node.js server you run locally on your own computer. It handles authentication through Google, stores user stats in a local JSON file, and communicates with the extension as you browse. Setup involves loading the extension manually in Chrome's developer mode, then starting the server from the backend folder. The extension is not yet ready to install from the Chrome Web Store. To use it, you need to supply your own Gemini API key and Google OAuth credentials, which means it is a developer-level setup rather than a plug-in-and-go product.

Copy-paste prompts

Prompt 1
Walk me through setting up the EcoScore Chrome extension from scratch: loading it in developer mode, starting the local Node.js backend, and adding my Gemini API key and Google OAuth credentials.
Prompt 2
How does the EcoScore extension send the product title to Gemini AI and parse back the CO2 estimate and letter grade? Show me the key code path.
Prompt 3
I want to add support for a new shopping site beyond Amazon and Flipkart in EcoScore. What part of the extension code detects the current page and extracts the product title?
Open on GitHub → Explain another repo

← akaakshat246 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.