Skip to content

Real business data via Google Places + Grow with BA rebrand#3

Open
growwithba wants to merge 2 commits into
mainfrom
claude/happy-brahmagupta-gc0x6v
Open

Real business data via Google Places + Grow with BA rebrand#3
growwithba wants to merge 2 commits into
mainfrom
claude/happy-brahmagupta-gc0x6v

Conversation

@growwithba

Copy link
Copy Markdown
Owner

Summary

Two related pieces of work to move the directory from demo toward production:

1. Real business data via Google Places API (97c17c8)

  • lib/places.ts — Google Places API (New) Text Search client + mapping to the Business shape, with a cost-scoped field mask.
  • scripts/fetch-places.ts — incremental, resumable cache builder (npm run fetch:places) that writes data/listings.generated.json. Supports --categories, --cities, --limit, --delay, --fresh.
  • data/businesses.ts — new getBusinesses(category, city) returns real cached data when present, otherwise falls back to the existing synthetic seeded-PRNG generator so the build never breaks. Places-absent fields (tagline, yearsInBusiness, website, phone, hours) are now optional.
  • BusinessCard + LocalBusiness JSON-LD — guard optional fields, add a Google Maps link, and only emit aggregateRating when real reviews exist.
  • Docs, .env.example (GOOGLE_PLACES_API_KEY), tsx dev dependency.

2. Rebrand: PrimeDirectory → Grow with BA (be37608)

  • Updated lib/site.ts (name, url https://growwithba.com, email, twitter, description). Header, Footer, and layout metadata derive from SITE, so they update automatically.
  • Replaced hardcoded copy in the home, about, contact, privacy, and terms pages.
  • Renamed the npm package to grow-with-ba.

Verification

  • tsc --noEmit clean
  • next build generates all ~1,116 static pages
  • fetch:places errors cleanly without an API key; no remaining "PrimeDirectory" references

Notes / follow-ups

  • The committed data/listings.generated.json is empty {} — the site renders synthetic data until npm run fetch:places is run with a real key. Fetching requires outbound access to googleapis.com and a Places API (New) key with billing enabled.
  • Contact email defaults to hello@growwithba.com and the phone is still the placeholder (800) 555-0142 — worth confirming.

https://claude.ai/code/session_01MYQxSyKx1CB5MuEd7UiE2P


Generated by Claude Code

claude added 2 commits June 15, 2026 18:34
Add a swappable data layer so listing pages can use real Google Places
listings instead of the synthetic seeded-PRNG generator:

- lib/places.ts: Google Places API (New) Text Search client + mapping
  to the Business shape (cost-scoped field mask).
- scripts/fetch-places.ts: incremental, resumable cache builder
  (npm run fetch:places) writing data/listings.generated.json.
- data/businesses.ts: getBusinesses() returns cached real data when
  present, else falls back to the synthetic generator so builds never
  break. Places-absent fields (tagline, yearsInBusiness, website,
  phone, hours) are now optional.
- BusinessCard + LocalBusiness JSON-LD: guard optional fields; add a
  Google Maps link; only emit aggregateRating when real reviews exist.
- Docs, .env.example, tsx devDep + fetch:places script.
Update the site identity in lib/site.ts (name, url, email, twitter,
description) and replace hardcoded 'PrimeDirectory' copy in the about,
contact, privacy, terms, and home pages. Header, Footer, and layout
metadata already derive from SITE so they update automatically. Also
rename the npm package to grow-with-ba.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants