Weather App
A simple but powerful weather app that provides real-time weather information and forecasts for any location in the world.
Features:
The application allows users to search for the weather conditions in a specific location. The application displays the selected location's current weather conditions, temperature, and humidity. The application has a responsive user interface that works on both desktop and mobile devices. The application uses an API to retrieve weather data. The application is built using a front-end framework such as React and a back-end framework such as Django.
Enter any location in the world and it should display a weather card containing the following information :
- Temperature
- Humidity
- Weather Description
- OpenWeather Geocoder API: To retrieve the latitude and longitude of a location
- OpenWeather Current Weather API: To retrieve the weather information for that location
This project consists of a frontend React application and a backend Django server. The dependencies for each are listed below:
- React
- react-dom
- react-scripts
- @mui/material
- Django
- requests
- python-dotenv
git clone https://github.com/ShivamH1/weather-app.git
Go to the server directory
cd weather-app/server/
And run
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
This will install all the required packages for the backend.
Create a .env file and paste your OpenWeather API as
API_KEY=<YOUR_API_KEY>
Make migrations and start the backend server
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py runserver localhost:8000
Similarly for frontend
cd weather-app/client/
yarn
or
cd weather-app/client/
npm install
After installing the required packages, start the frontend server
yarn start
or
npm start
The site should start running