A Weather App built with React and TypeScript that fetches weather data using the OpenWeather API. The app allows users to search for weather conditions by city and view the current weather as well as a forecast.
- OpenWeather - Weather API
- Search for weather by city
- Display current weather conditions
- Show forecast for the next hours
- Responsive design
Make sure you have the following installed:
- Node.js
- npm or yarn
-
Clone the repository:
git clone https://github.com/xmurilo/weather.git cd weather -
Install dependencies:
npm install # or yarn install -
Create a
.envfile in the root of the project and add your OpenWeather API key:VITE_API_KEY=your_openweather_api_key
To start the development server, run:
npm run dev
# or
yarn devOpen http://localhost:5173/ to view it in the browser.
src/- Source codecomponents/- React componentsstyles/- Styled-components stylestypes/- TypeScript type definitionsutils/- Utility functionsApp.tsx- Main app componentindex.tsx- Entry point
- Enter the name of a city in the search bar.
- Click on the "Get Weather" button.
- View the current weather and forecast.
