Design a backend that aggregates weather data for user-chosen locations from one or more provider APIs. Cache responses, respect provider rate limits, and expose a unified JSON model for a dashboard UI with forecasts and current conditions.
Functional requirements
- Add and remove saved locations per user
- Fetch current conditions and short-term forecast for a location
- Normalize units (C/F, wind) based on user preference
- Background refresh or on-demand fetch with staleness thresholds
Non-functional requirements
- Protect upstream providers with caching and rate limiting
- Low latency for cached reads; graceful degradation if provider is down
- Audit usage to forecast API cost