weather-dashboard
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of harry-potter branch: v6View latest version
A Harry Potter themed weather application that displays current weather conditions with magical flair.
- Fetches real-time weather data based on user's location
- Translates weather conditions into Harry Potter themed descriptions
- Provides "broomstick flying conditions" based on wind speed
- Styled with Hogwarts house colors and magical elements
- Backend: TypeScript with Hono framework
- Weather Data: Open-Meteo API (no API key required)
- Geolocation: Browser's Geolocation API + OpenStreetMap for reverse geocoding
- Styling: Custom CSS with Tailwind utility classes
- The app requests the user's location through the browser
- It sends the coordinates to the backend API
- The backend fetches weather data from Open-Meteo
- Weather conditions are mapped to Harry Potter themed descriptions
- The frontend displays the weather with magical styling
- Clear skies: "Perfect for Quidditch practice!"
- Partly cloudy: "Looks like someone cast a mild Nebulus charm."
- Foggy: "A powerful Nebulus charm has been cast!"
- Rainy: "Aguamenti charm in effect!"
- Snowy: "Glacius charm has been cast!"
- Heavy rain: "Someone's been practicing Meteolojinx Recanto!"
- Thunderstorm: "Looks like the work of a powerful Tempestus spell!"
Wind speed is translated into recommendations for flying:
- < 5 mph: "Perfect for first-years"
- 5-10 mph: "Good for Quidditch practice"
- 10-15 mph: "Challenging but manageable"
- 15-25 mph: "Only for experienced flyers"
-
25 mph: "Too dangerous! Stay grounded"
Simply open the app in a browser and allow location access when prompted. The magical weather divination will reveal current conditions with Harry Potter flair!
