A beautiful, real-time weather application built with HTML, CSS, and Vanilla JavaScript. SkyPulse allows users to instantly check current weather conditions for any city worldwide, featuring dynamic backgrounds that change based on the weather, a sleek modern UI with glassmorphism, and a responsive design.
- 🌍 Global Search: Get accurate, real-time weather data for any city.
- 📍 Geolocation: Instantly see the weather in your current location with one click.
- 🌡️ Unit Toggling: Seamlessly switch between Celsius (°C) and Fahrenheit (°F).
- 🎨 Dynamic Backgrounds: The app's gradient background changes dynamically to match the current weather conditions (e.g., clear, rain, clouds, snow).
- 📊 Comprehensive Data: Displays temperature, "feels like" temperature, humidity, wind speed, pressure, visibility, and sunrise/sunset times.
- 📱 Fully Responsive: Optimized for both desktop and mobile devices.
- Frontend: HTML5, CSS3, Vanilla JavaScript (ES6+).
- Styling: Custom CSS with CSS Variables, Flexbox, Grid, and Glassmorphism effects.
- API: OpenWeatherMap API (Current Weather Data).
- Icons: SVG icons embedded directly into the HTML.
To run this project on your local machine, follow these steps:
You will need a free API key from OpenWeatherMap.
- Go to OpenWeatherMap and sign up for a free account.
- Navigate to your API Keys section and generate a new key.
-
Clone or Download the Repository: Download the source code as a ZIP file or clone it using Git:
git clone https://github.com/yourusername/weather-app.git
-
Set up the API Key:
- Create a file named
config.jsin the root folder of the project. - Add your API key to the file like this:
const API_KEY = 'ENTER_YOUR_API_KEY_HERE';
(Note:
config.jsis ignored by.gitignoreto keep your key secure!) - Create a file named
-
Run the App:
- Simply open
index.htmlin your web browser. - For a better development experience, use an extension like Live Server in VS Code.
- Simply open
Since this is a front-end only application, API keys cannot be perfectly hidden from the browser. However, to prevent automated bots from scraping the key from the public GitHub repository:
- The API key is stored locally in
config.js(which is in.gitignore). - For the live site on GitHub Pages, the key is securely injected during the build process using GitHub Secrets and GitHub Actions.
Contributions, issues, and feature requests are welcome!
This project is available under the MIT License.