π Try it here!
A simple, responsive weather web application built with HTML, CSS, and JavaScript, using OpenWeather API to retrieve real-time weather data. Styled alerts are integrated via SweetAlert2 and HTTP requests are handled with Axios.
- π Search by city name
- π‘οΈ Displays temperature, humidity, wind speed, sunrise and sunset
- π― Input validation with user-friendly alerts
- π‘ Dynamic weather icon based on current conditions
- π« Animated result card on each new search
- π§Ό Clears and focuses input after each search
- π± Fully responsive design
- HTML5
- CSS3
- JavaScript (ES6+)
- Axios
- SweetAlert2
- OpenWeatherMap API
weather-checker-app/
β
βββ index.html
βββ .env.example
βββ package.json
βββ package-lock.json
βββ .gitignore
βββ LICENSE
βββ README.md
β
βββ assets/
β βββ img/
β βββ preview.png
β
βββ src/
βββ main.js
βββ styles.cssindex.html: Main HTML structure of the app..env.example: Environment variable example file to define the API key.package.json: Project metadata and list of dependencies.package-lock.json: Lockfile that ensures consistent dependency versions..gitignore: Specifies files/folders to be ignored by Git (e.g.,.env).LICENSE: License file (MIT).README.md: Project documentation and setup instructions.assets/img/preview.png: UI preview screenshot shown in the README.src/main.js: Main JavaScript logic for fetching and displaying weather data.src/styles.css: Custom styles and responsive layout for the app.
-
Clone this repository:
git clone https://github.com/Carturo8/Weather-Checker-App.git cd weather-checker-app -
Install dependencies:
npm install
-
Add your API key:
Copy the
.env.examplefile and rename it to.env, then add your API key:VITE_API_KEY=your_api_key_here
-
Start the development server (if using Vite):
npm run dev
This app uses the OpenWeatherMap API. You need to sign up and generate a free API key.
- API key is stored securely using Vite environment variables
- Uses modern ES modules and
type="module"in script tag - Accessible form elements (
aria-live,visually-hidden,label for, etc.)
This project is licensed under the MIT Licenseβ―ββ―see theβ―LICENSEβ―file for more details.
