Skip to content

Repository files navigation

Roof Measure

Roof Size & Pitch Estimator web app based on Google Geocoding + Google Solar APIs.

Features

  • Address input
  • Geocoding to lat/lng
  • Solar buildingInsights:findClosest with HIGH then MEDIUM fallback
  • Roof area output in m² and sq ft
  • Roofing squares
  • Representative pitch (area-weighted) in degrees and x:12
  • Optional segment table
  • Google Static Map target-house image
  • ChatGPT vision roof analysis (outline + ridges + measurement line-items)
  • Server-side API key protection

API

POST /api/roof-estimate

Request:

{ "address": "21106 Kenswick Meadows Ct, Humble, TX 77338" }

Setup

Prerequisites for your Google Cloud key:

  • Geocoding API enabled
  • Solar API enabled
  • Static Maps API enabled

Additional AI analysis config:

  • OPENAI_API_KEY: API key for OpenAI Responses API
  • Optional: OPENAI_ROOF_MODEL (default gpt-5)
  1. Copy env file:
cp .env.example .env.local
  1. Set your key:
GOOGLE_MAPS_API_KEY=your_google_api_key
  1. Install and run:
npm install
npm run dev

Open http://localhost:3000.

Notes

  • This app is an estimator.
  • It does not provide ridge/hip/valley/eave/rake/gutter line-item measurements.

About

Roof size & pitch estimator using Google Geocoding and Solar APIs

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages