Skip to content

selvet-elif/WeatherForecast-Web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeatherWeb

WeatherWeb is a React + Vite weather application that fetches real-time weather data from OpenWeatherMap API and displays a weather card UI with search functionality.

Features

  • React 19 + Vite application
  • Real-time weather data integration with OpenWeatherMap API
  • Weather card interface displaying condition, temperature, location, humidity, and wind speed
  • Search functionality to look up weather by city name
  • Dynamic weather icons mapped to weather conditions
  • Responsive UI with local asset-based icons
  • Environment-based API key configuration

Project structure

  • src/main.jsx — React app entry point
  • src/App.jsx — Root app component
  • src/components/Weather.jsx — Weather card component with API integration and search logic
  • src/components/WeatherIcons.jsx — Weather icon mapping configuration
  • src/index.css / src/components/Weather.css — global and component styling
  • public/ — static public assets
  • package.json — project dependencies and scripts

Getting started

Prerequisites

Setup

  1. Install dependencies:
npm install
  1. Create a .env.local file in the project root and add your API key:
VITE_API_KEY=your_openweathermap_api_key_here
  1. Run the development server:
npm run dev

APP link: https://weather-forecast-web-selvet.vercel.app

Available Scripts

  • npm run dev — Start the development server
  • npm run build — Create a production build
  • npm run preview — Preview the production build locally
  • npm run lint — Run ESLint to check code quality

How It Works

  • The app fetches default weather data for Manisa, Turkey on initial load
  • Users can search for weather in any city by entering the city name in the search bar
  • The app uses OpenWeatherMap's Geocoding API to convert city names to coordinates
  • Weather data is retrieved based on coordinates and displayed in real-time

Technologies

  • React 19 — UI library
  • Vite — Build tool and dev server
  • React Icons — Icon library
  • OpenWeatherMap API — Weather data provider
  • ESLint — Code quality tool

About

Weather Forecast Project for learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors