How dawid2504/wetter-projekt works
Wetter weltweit is a vanilla-JavaScript weather PWA. Users choose or search for a city (or use their location), then view current conditions, local time, forecasts, charts and related environmental details; a live map and saved favorites extend that flow. The README documents Open-Meteo weather data and RainViewer/Leaflet mapping, while sampled source confirms the main controller and its internal module dependencies. The main file excerpt is partial, so several feature-to-service links are based on README documentation rather than inspected call sites.
Main entry points: main.js App controller · state.js Shared state · time.js Time sync · index.html Web app shell
Components 25
User experience
- Web app shell
index.html - App controller
js/main.js - City search
js/main.js - Favorites and clocks
js/main.js
Weather features
- Weather details
js/main.js - Forecast and charts
js/main.js - Air, pollen, moon
js/main.js - Weather map
js/main.js
Shared modules
- City catalog
js/data/cities.js - Shared state
js/state.js - Preference keys
js/config.js - Translations
js/data/i18n.js - Weather codes
js/data/weather-codes.js - Weather helpers
js/helpers.js - Temperature units
js/units.js - Time sync
js/time.js - Weather icons
js/weather-icons.js
Platform and integrations
- Open-Meteo
- Geocoding service
- RainViewer
- Map tiles and Leaflet
- Browser APIs
- UTC time API
- Offline service worker
sw.js
Other components
- User
Connections 28
- User → Web app shell: opens
README.md - Web app shell → App controller: loads
README.md - App controller → City search: handles search
README.md - City search → City catalog: extends catalog
js/data/cities.js - City search → Geocoding service: geocodes cities
README.md - App controller → Weather details: renders details
README.md - App controller → Forecast and charts: renders forecasts
README.md - App controller → Air, pollen, moon: renders indicators
README.md - App controller → Weather map: shows map
README.md - App controller → Favorites and clocks: manages favorites
js/main.js - Favorites and clocks → Browser APIs: stores locally
js/main.js - App controller → Open-Meteo: fetches weather
README.md - Weather map → RainViewer: loads radar
README.md - Weather map → Map tiles and Leaflet: renders map
README.md - App controller → Browser APIs: uses geolocation
README.md - App controller → Shared state: reads and updates
js/main.js - Shared state → Preference keys: reads keys
js/state.js - App controller → Translations: imports translations
js/main.js - Translations → Shared state: reads language
js/data/i18n.js - App controller → Weather codes: imports codes
js/main.js - App controller → Weather helpers: imports helpers
js/main.js - App controller → Temperature units: imports formatting
js/main.js - Temperature units → Shared state: reads unit
js/units.js - App controller → Time sync: syncs clocks
js/main.js - Time sync → Shared state: updates offset
js/time.js - Time sync → UTC time API: requests UTC time
js/time.js - App controller → Weather icons: renders icons
js/main.js - Browser APIs → Offline service worker: runs offline support
sw.js