Project walkthrough
WeatherNow: A JavaScript Weather App with Forecasts, AQI and GitHub Source Code
WeatherNow is a browser-based JavaScript weather app that combines current conditions, seven-day forecasts, air quality, temperature charts and side-by-side city comparisons. Developed by Shubhranil Layek, it uses public APIs to turn weather data into an interactive dashboard.
You can explore the WeatherNow demo or read its implementation in the stunning-weather-app GitHub repository.
What Is WeatherNow?
WeatherNow is a frontend weather dashboard built with HTML, vanilla JavaScript, Tailwind CSS and Chart.js. It does not include a custom application backend or require a frontend compilation step.
The application retrieves weather and air-quality information from Open-Meteo. Its interface lets users select locations, switch temperature units, compare cities and save favourite locations in their browser.
The repository is named stunning-weather-app, while the application is presented to users as WeatherNow. Both names refer to the same project.
Key Features of the WeatherNow Weather App
The project documentation and JavaScript implementation describe several practical dashboard features:
| Feature | What it provides |
|---|---|
| Current conditions | Temperature, feels-like temperature, humidity and wind information |
| Seven-day forecast | Daily high and low temperatures, condition icons and precipitation probability |
| Air quality | A US AQI value with a colour-coded summary badge when data is available |
| Temperature charts | Daily high and low temperature trends across the recent and forecast periods returned by the API |
| City comparison | Weather metrics displayed side by side for two selected locations |
| Favourite cities | Saved locations stored in the current browser |
| Display options | Celsius/Fahrenheit switching and light/dark themes |
| Location and sharing | Optional browser geolocation and weather-summary sharing, depending on browser support |
Together, these features provide multiple ways to explore weather information without leaving the application.
How Does WeatherNow Get Its Weather Data?
The application follows a straightforward data flow:
- Select a location. Enter a city or optionally grant browser geolocation permission.
- Resolve coordinates. Location lookup provides the latitude and longitude needed for weather requests.
- Request data. JavaScript starts weather and air-quality requests together.
- Render the dashboard. The interface displays the available conditions, forecast cards, AQI summary and chart.
Open-Meteo provides the weather and air-quality data. The current implementation also includes Nominatim city lookup and reverse-geocoding logic that tries BigDataCloud before a Nominatim fallback.
Weather data is requested when a location is loaded. The application should not be described as a continuously updating, second-by-second monitoring service.
Compare Weather Between Two Cities
WeatherNow includes a comparison interface for checking two locations together. Users select a city for each side, and the application displays metrics such as temperature, conditions, humidity, wind speed, UV index and available AQI data.
For developers, this feature is also a useful example of coordinating multiple location selections and API responses in a browser interface.
Forecasts and AQI information depend on upstream services. Application-generated advisory banners are not a substitute for official weather warnings or professional safety guidance.
Explore the GitHub Repository
The repository has a small file structure that makes it approachable for readers learning frontend development:
| File | Purpose |
|---|---|
| index.html | Dashboard layout, controls and comparison interface |
| app.js | API requests, application state, rendering and event handling |
| style.css | Custom presentation and theme styling |
| README.md | Project overview and setup instructions |
Although there is no build step, the app is not dependency-free. It loads libraries from external CDNs and requests data from third-party APIs.
How to Run WeatherNow Locally
With Git and Python installed, run:
git clone https://github.com/shubhranillayek/stunning-weather-app.git
cd stunning-weather-app
python3 -m http.server 8000
Then open http://localhost:8000.
Python serves the static files in this example; the application logic still runs in the browser. An internet connection is needed for APIs and CDN-hosted resources. Current-location access requires permission and a secure context such as HTTPS or localhost.
What to Know Before Deploying Your Own Version
The configured requests do not contain API keys, but that does not mean every type of usage is unrestricted.
- Weather data: Open-Meteo's free API is intended for non-commercial use and has request limits. Commercial deployments should review its current terms and plans.
- City lookup: The public Nominatim usage policy prohibits client-side autocomplete and requires responsible request volumes and attribution. A production implementation must use a compliant search workflow or a provider that permits the intended experience.
- Code reuse: Review the repository's licensing before redistributing or incorporating its code into another product. Public visibility alone is not an unrestricted reuse licence.
These checks are part of responsible deployment, not obstacles to exploring the project's implementation.
Frequently Asked Questions
Does WeatherNow require an API key?
The requests currently configured in the repository do not include API keys. Provider restrictions, rate limits, attribution requirements and commercial-use conditions still apply.
Does WeatherNow need a backend?
No custom application backend is included. Static hosting serves the files, and browser JavaScript communicates with external services.
Where are favourite cities saved?
Favourite locations are stored in the browser's localStorage. They are not linked to a cloud account and do not automatically synchronise between devices.
Is location permission required?
No. Users can search for a city instead. Accessing the current device location is optional and requires browser permission.
Does WeatherNow work offline?
Fresh weather and air-quality information requires an internet connection. CDN-hosted dependencies also mean full offline operation should not be assumed.
Try WeatherNow and Read the Source
Start with the WeatherNow demo to explore the interface. Then visit the GitHub repository to read the implementation and local setup instructions.
For more original projects, visit Shubhranil Layek's developer website.