Full-Stack Web App · Apr 2025

SOLARSAVE

Your location's solar potential, instantly — in dollars and CO₂, not kWh/m².

A full-stack web app that shows exactly how much solar energy potential any location has — and what that means for your wallet and the planet. Enter a city, zip code, or address and get real NREL irradiance data, estimated annual savings, and CO₂ offset figures in seconds.

TimelineApr 26–28, 2025
RoleFull-Stack Developer
TypePersonal Project
DataNREL + OpenCage

The Challenge

Solar adoption is often blocked not by cost, but by uncertainty — most people have no idea how much sunlight their location actually gets, or what that translates to in dollars saved or emissions avoided. Existing calculators tend to be complex, form-heavy, or require users to already know their energy usage in detail.

The Solution

SolarSave reduces the interaction to a single input — your location. The server geocodes it using OpenCage, fetches real irradiance data from the NREL Solar Resource API, and returns a clear picture: peak sun hours per day, estimated annual savings, and CO₂ offset. No solar expertise required.

01

Flexible Location Input

Accepts city names, zip codes, or full addresses. The backend uses the OpenCage Geocoder API to convert any human-readable location to precise coordinates, filtering out low-confidence results to ensure accurate solar data retrieval.

  • City, zip, or full address
  • Low-confidence results filtered
  • Precise lat/lng to NREL
02

Real NREL Solar Data

Coordinates are sent to the NREL Solar Resource API, which returns real-world irradiance data (kWh/m²/day) for that specific location from NREL's national solar database — not estimates or regional averages, but actual measured data.

  • NREL national solar database
  • Average peak sun hours/day
  • Real irradiance measurements
03

Savings & CO₂ Estimates

Solar potential is translated into two tangible outputs: estimated annual electricity savings in dollars, and estimated CO₂ offset in metric tons. These make the abstract concept of "solar irradiance" immediately meaningful to the user.

  • Annual savings estimate ($)
  • CO₂ offset (metric tons)
  • Multi-page React + Express

Frontend

React 19 · React Router v7 · Axios · React Toastify

Backend

Node.js · Express 5

External APIs

OpenCage Geocoder · NREL Solar Resource API

2 External APIs chained per request
1 Input required — just a location
3 Outputs: sun hours, savings, CO₂
2 Independent servers — client + API
01

Chaining External APIs

Geocoding first, then solar lookup, required careful error handling at each step. A low-confidence geocoding result needed to be caught before hitting NREL, or users would get solar data for the wrong location entirely.

02

Translating Data for Non-Technical Users

"4.8 kWh/m²/day" means nothing to most people. The key design challenge was converting raw irradiance numbers into savings dollars and CO₂ tons — units people actually care about.

03

Multi-Page Architecture

Using React Router v7 to build a multi-page flow (search → results) instead of a single-page form kept the UI focused and prevented users from being overwhelmed with inputs and outputs on one screen.

04

API Key Security

Keeping both API keys on the server side via environment variables, never exposed to the frontend, was non-negotiable. Even for a personal project, good security habits matter.

Next project ConnectAble