Skip to content

Data Sources and Limits

hasnaina955 edited this page Sep 3, 2026 · 1 revision

Data Sources and Limits

Every external provider, what it costs, and what happens when it fails.


The rule

Google-first where a key exists, open-stack always. Any Google failure, absent key, or exhausted quota silently falls back to the free stack — the app never blocks on a paid API.

Providers

Provider Used for Key? Failure mode
Google Places autocomplete, along-route POI search, reported hours opt-in VITE_GOOGLE_MAPS_API_KEY falls back to OSM/Wikipedia/Mappls
Google Routes India-tuned leg distances + polyline same key OSRM → haversine estimate
OSRM (demo) road geometry, drive times keyless haversine fallback
Open-Meteo geocoding autocomplete, per-day weather keyless typed inputs, blank chips
OSM Overpass opening hours, purpose POI queries (food/fuel/EV/CNG) keyless suggestions hide, plan unaffected
Wikipedia geosearch nearby populated places (city anchors) keyless skipped
Mappls India-grade place search opt-in VITE_MAPPLS_KEY OSM fallback
OpenFreeMap basemap vector tiles keyless, no limits, commercial-OK map blank, app fine

Quotas & licensing

  • Google usage is guarded by a monthly soft cap per SKU (src/lib/providers/quota.ts); events count before each request fires; the cap trips the fallback
  • Basemap licensing: CARTO (free tier is non-commercial-only) and Esri (needs a dev plan) were replaced by OpenFreeMap (MIT, commercial-OK). Attribution (© OpenFreeMap © OpenMapTiles · OSM contributors) arrives via its TileJSON — do not also set customAttribution (duplicates the credit; a test tripwire enforces this)
  • Google map tiles themselves are not licensed to third-party renderers — don't chase the "Google look" with MapLibre; it means a Maps JavaScript API rewrite

Data-only policy

Google results render as suggestions in the UI; the app never persists Google data. This keeps the data model provider-neutral.


Related: Architecture Overview · Design Decisions

Canonical doc: docs/ARCHITECTURE.md · README "Data sources" section

Clone this wiki locally