A sleek, interactive weather application built using React.js. This app fetches real-time weather data to display current conditions, hourly forecasts, and more, making it the perfect tool to stay updated with the weather in your area.
- Real-time Weather Updates: Displays the current weather for any location.
- Search Functionality: Look up weather information for cities around the world.
- Dynamic UI: Clean and responsive design that adapts to all screen sizes.
- Frontend: React.js
- API: OpenWeather API
- Styling: CSS Modules
Follow these steps to set up the project locally:
-
Clone the repository:
git clone https://github.com/Nikhilkumar2311/weather-react.git
-
Navigate to the project directory:
cd weather-react -
Install the dependencies:
npm install
-
Create a
.envfile in the root directory and add your OpenWeather API key:VITE_APP_ID=your_api_key_here
-
Start the development server:
npm run dev
-
Open your browser and go to
http://localhost:5173to see the app in action.
- Enter the name of a city in the search bar to fetch weather details.
- View the current temperature, humidity, wind speed, and other conditions.
react-weather-app.mp4
This project uses the OpenWeather API. You can obtain an API key by signing up at OpenWeather. Make sure to add it to your .env file as VITE_APP_ID.
Contributions are welcome! If you'd like to enhance the project, follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Make your changes and commit them:
git commit -m "Add your message here" - Push the changes to your fork:
git push origin feature/your-feature-name
- Open a pull request to the
mainbranch.
Developed by Nikhilkumar2311.
Feel free to fork, contribute, and share your feedback!