How sumitmishra77285/air-quality-transit-tracker works
AirPulse Transit is a browser-based tracker that combines air quality and weather with nearby transit stops and departures. Users choose or search a location, then the application context loads each data domain; the dashboard presents conditions, trends, map and transit information, and health/commute analysis. Favorites and settings support personalization, with browser-local storage and optional data-provider keys. The README documents Open-Meteo/OpenAQ, geocoding, Transitland/Overpass, and Leaflet/OpenStreetMap capabilities. Arrows follow excerpted calls or README claims; unsampled component internals are represented by their exact paths, and inferred map integration is left unlinked.
Main entry points: AppContext.tsx App state & loading · Dashboard.tsx Dashboard · airQuality.ts Air quality fetch · App.tsx App routing
Components 25
App experience
- App routing
src/App.tsx - Dashboard
src/pages/Dashboard.tsx - Settings
src/pages/Settings.tsx - Commute advisory
src/components/CommuteAdvisory.tsx
Location & state
- App state & loading
src/context/AppContext.tsx - Location search
src/components/LocationPicker.tsx - Geocoding
src/api/geocoding.ts - HTTP client
src/api/client.ts
Air & weather
- Air quality fetch
src/api/airQuality.ts - Weather fetch
src/api/weather.ts - Air quality & trends
src/components/AirQualityPanel.tsx - City comparison
src/components/CityCompare.tsx - Health & exposure
src/components/HealthGroupAdvisories.tsx - Seasonal context
src/components/SeasonalContext.tsx - Weather & comfort
src/components/WeatherPanel.tsx
Transit
- Nearby transit fetch
src/api/transit.ts - Stops & ETAs
src/components/TransitPanel.tsx - Transit map
src/components/MapView.tsx
Personalization
- Browser storage
src/utils/storage.ts - Favorites & routes
src/components/FavoritesPanel.tsx
Other components
- User
- Open-Meteo / OpenAQ
- Open-Meteo weather
- Transitland / Overpass
- Geocoding services
Connections 39
- User → App routing: opens
src/App.tsx - App routing → Dashboard: routes to
src/App.tsx - App routing → Settings: routes to
src/App.tsx - App routing → App state & loading: provides state
src/App.tsx - Dashboard → Location search: renders
src/pages/Dashboard.tsx - Dashboard → Air quality & trends: renders
src/pages/Dashboard.tsx - Dashboard → City comparison: renders
src/pages/Dashboard.tsx - Dashboard → Health & exposure: renders
src/pages/Dashboard.tsx - Dashboard → Seasonal context: renders
src/pages/Dashboard.tsx - Dashboard → Weather & comfort: renders
src/pages/Dashboard.tsx - Dashboard → Stops & ETAs: renders
src/pages/Dashboard.tsx - Dashboard → Transit map: renders
src/pages/Dashboard.tsx - Dashboard → Favorites & routes: renders
src/pages/Dashboard.tsx - Dashboard → Commute advisory: renders
src/pages/Dashboard.tsx - Location search → Geocoding: searches via
src/components/LocationPicker.tsx - Geocoding → Geocoding services: queries
README.md - App state & loading → Air quality fetch: loads air data
src/context/AppContext.tsx - App state & loading → Weather fetch: loads weather
src/context/AppContext.tsx - App state & loading → Nearby transit fetch: loads transit
src/context/AppContext.tsx - Air quality fetch → Open-Meteo / OpenAQ: fetches observations
- Weather fetch → Open-Meteo weather: fetches forecasts
- Nearby transit fetch → Transitland / Overpass: discovers departures
README.md - Air quality fetch → HTTP client: requests JSON
src/api/airQuality.ts - Weather fetch → HTTP client: requests JSON
src/api/weather.ts - Nearby transit fetch → HTTP client: requests JSON
src/api/transit.ts - Air quality fetch → Browser storage: caches results
src/api/airQuality.ts - Nearby transit fetch → Browser storage: caches results
src/api/transit.ts - Settings → App state & loading: updates preferences
src/pages/Settings.tsx - Settings → Browser storage: clears cache
src/pages/Settings.tsx - Favorites & routes → App state & loading: reads state
src/components/FavoritesPanel.tsx - Favorites & routes → Browser storage: persists favorites
src/components/FavoritesPanel.tsx - Air quality & trends → App state & loading: reads conditions
src/components/AirQualityPanel.tsx - City comparison → Air quality fetch: fetches comparison
src/components/CityCompare.tsx - Health & exposure → App state & loading: reads conditions
src/components/HealthGroupAdvisories.tsx - Seasonal context → App state & loading: reads conditions
src/components/SeasonalContext.tsx - Weather & comfort → App state & loading: reads forecast
src/components/WeatherPanel.tsx - Stops & ETAs → App state & loading: reads departures
src/components/TransitPanel.tsx - Transit map → App state & loading: reads location
src/components/MapView.tsx - Commute advisory → App state & loading: reads conditions
src/components/CommuteAdvisory.tsx