See what your home's electricity costs you, and the planet.
Green Awareness is a free household energy and carbon calculator. People add the appliances in their home, pick their country, and instantly see their electricity cost, energy use and CO₂ footprint, followed by a personal plan of the changes that would save them the most.
Live site: greenawareness.org
- Three simple steps: pick your country, add your appliances, see your results.
- Quick add in plain words. Type "65-inch LG TV 4 hours a day, 2 fridges, washing machine 3 times a week" and the appliances are added for you. It understands counts, sizes, power ratings, usage, seasons, typos and removals, and it runs entirely in the browser. Nothing you type is sent anywhere.
- 142 countries with real household electricity prices in local currency and grid carbon intensity, shown on a zoomable, colour-coded world map.
- 34 appliance presets with realistic defaults, plus custom appliances, big +/− controls, standby power and seasonal use.
- Results per day, month or year with everyday comparisons (car distance, trees, phone charges) and a breakdown of where the money goes.
- A personal savings plan: tips worked out from your own appliances, with the money and CO₂ each one saves. Tick the ones you'll do.
- English, Turkish and Arabic, including a full right-to-left layout for Arabic.
- Private by design: your list is stored in your browser's local storage and never uploaded.
- Light and dark mode, works on phones, and exports your results to CSV.
You need Node.js 18.18 or newer.
git clone https://github.com/RamiMizyed/green-awareness.git
cd green-awareness
npm install
npm run devThen open http://localhost:3000.
| Command | What it does |
|---|---|
npm run dev |
Starts the development server |
npm run build |
Builds the production site |
npm start |
Serves the production build |
npm run lint |
Runs ESLint |
npm run update-regions |
Downloads the latest prices, carbon data and exchange rates and rebuilds the country list (see Data) |
Quick add works without any setup or API key. If you'd also like hard-to-parse messages to go to Claude (Anthropic's AI), add an API key to .env.local (or to your Vercel project's environment variables):
ANTHROPIC_API_KEY=your-key-hereWith a key set, messages go to Claude first and fall back to the built-in matcher if the call fails. The on-page privacy note switches automatically to say that typed text is sent to the AI. This costs money per request, so set a spending limit in the Anthropic console if you enable it.
- Appliances used by the hour: power (W) × hours a day × days a week, averaged over the year and scaled by the months it's used.
- Appliances counted per load or charge (washing machine, dishwasher, electric car): energy per use × uses a week.
- Standby power is added for every hour a device isn't in use.
- Cost = energy × your price per kWh. CO₂ = energy × your grid's carbon intensity.
Only electricity is counted. Gas heating, transport, food and shopping aren't included. The same explanation appears in the "How it works" section of the site.
| What | Source |
|---|---|
| Grid carbon intensity (kg CO₂e per kWh) | Ember via Our World in Data, latest year per country |
| Household electricity prices | GlobalPetrolPrices.com |
| Exchange rates | ExchangeRate-API open endpoint |
| World map | Natural Earth via world-atlas |
| Flags | country-flag-icons |
| Everyday comparisons | US EPA figures for car emissions and phone charging |
Prices and carbon data change over time. To refresh them:
npm run update-regionsThis rewrites src/lib/data/regions.ts and public/flags/. Review the diff before committing, as the sources occasionally rename countries.
src/
app/
page.tsx The page: calculator and footer
layout.tsx Fonts, metadata, theme and nav
api/assistant/route.ts Optional Claude-powered quick add
components/
calculator/ Steps, map, appliance list, results, savings plan
ui/ Shared UI (buttons, dialogs, nav, switchers)
lib/
calc.ts Energy, cost and CO₂ calculations
tips.ts Savings recommendations
store.ts App state, saved in local storage
assistant/local.ts In-browser quick-add parser
data/appliances.ts Appliance presets and categories
data/regions.ts Country data (generated)
i18n/ Translations (en, tr, ar)
scripts/
update-regions.mjs Rebuilds the country data
- Copy
src/lib/i18n/en.tsto a new file, for examplede.ts, and translate the strings. TypeScript will fail the build if any key is missing. - Register it in
src/lib/i18n/index.tsx(theLangtype,DICTSandLANGS), in the language map insrc/lib/i18n/boot.ts, and in thelanglist andLANGUAGE_NAMEinsrc/app/api/assistant/route.ts. - For a right-to-left language, set
meta.dirto"rtl".
Next.js 15, React 19, TypeScript, Tailwind CSS 4, Radix UI, Zustand, d3-geo and Lucide icons. Deployed on Vercel: every push to master goes live.
Issues and pull requests are welcome, especially:
- Corrections to translations from native speakers
- Better appliance defaults, with a source
- New languages
Please run npm run lint and npm run build before opening a pull request.
Made by Rami Mizyed.