Skip to content

Google Maps — fetch once (draft) ​

Rule: Places Details / Photos run on onboard or admin refresh. Marketplace detail never calls Google.

Store on property ​

googlePlaceId, lat/lng, googleRating, googleReviewCount, googleReviews[] (detail only), CDN photo URLs, nearby JSON, googlePlaceFetchedAt.

MelonQ / Extranet selects Place
  → Middleware Places Details + photos + nearby
  → file-manager / CDN
  → PATCH property snapshot
  → Marketplace / Booking Engine GET property only

Optional: admin re-sync, rate-limit 1/day/property. Weekly cron is OK. Fetch-on-read is not.

ENV ​

NameWhere
GOOGLE_MAPS_API_KEYMiddleware server
NEXT_PUBLIC_GOOGLE_MAPS_API_KEYMelonQ onboarding map picker only — restrict by referrer

v1 onboarding still marks Google import to implement. This draft is the intended winner.

IDOR ​

Server key never in the Marketplace bundle. Public browse GET may read stored rating/photos on active properties. Writes require partner JWT.

Acceptance ​

  • Warm property page = zero Places Details calls
  • Reviews/photos survive a Google outage
  • Re-sync updates googlePlaceFetchedAt

API-first. Middleware Backend wins over Core Backend when both exist.