Skip to content

Auto-select featured city on homepage forecast using IP geolocation #354

@marta-baraibar

Description

@marta-baraibar

Description:
Currently, the featured city in the homepage forecast is either fixed or manually selected. To improve personalization and relevance, the system should automatically detect the user's location based on IP address and display the corresponding city’s forecast.

Expected Behavior:

  • When a user accesses the homepage, their IP geolocation should be used to identify their approximate location.
  • The forecast module should automatically display the city closest to the user's location as the featured forecast.
  • If geolocation fails or the city is not in the database, a default city should be shown.

Suggested Actions:

  • Integrate an IP geolocation service (e.g. ipapi, ipstack, GeoIP) on the backend or client side.
  • Match the geolocated coordinates to the nearest available city in the forecast dataset.
  • Ensure user privacy by not storing or tracking location data beyond session use.

Bonus:
Allow manual override by the user to pick another city if desired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    climwebclimtech specific issuesenhancementNew feature or request

    Projects

    Status

    CMS Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions