This is a simple web application that allows users to get the current weather information for any city. The application is built using React for the frontend and Python (Flask) for the backend.
- Get current weather information for any city.
- Displays temperature.
- Shows the current date and time of the searched city.
- Error message displayed if no city is entered.
weather_app/
├── app/
│ ├── __init__.py
│ ├── config.py
│ ├── __pycache__/
│ ├── controllers/
│ │ ├── __init__.py
│ │ └── weather_controller.py
│ ├── models/
│ │ ├── __init__.py
│ │ └── weather.py
│ ├── services/
│ │ ├── __init__.py
│ │ └── weather_service.py
│ └── utils/
│ ├── __pycache__/
│ └── cache.py
├── frontend/
│ ├── node_modules/ (created after npm install)
│ ├── public/
│ │ ├── favicon.ico
│ │ └── index.html
│ ├── src/
│ │ ├── components/
│ │ │ ├── CityForm.js
│ │ │ └── WeatherDisplay.js
│ │ ├── App.css
│ │ ├── App.js
│ │ ├── App.test.js
│ │ ├── index.css
│ │ ├── index.js
│ │ ├── logo.svg
│ │ ├── reportWebVitals.js
│ │ └── setupTests.js
│ ├── .gitignore
│ ├── package-lock.json
│ ├── package.json
│ └── README.md
├── images/
│ ├── Screenshot of Code.png
│ └── Screenshot of Website.png
├── venv/ (created after 'python -m venv venv')
├── README.md
├── run.py
└── requirements.txt
- Clone the repository:
git clone https://github.com/yourusername/weather_app.git
- Navigate to the project directory:
cd weather_app - Create and activate a virtual environment:
python -m venv venv .\venv\Scripts\activate # On Windows source venv/bin/activate # On macOS/Linux
- Install the required packages:
pip install -r requirements.txt
- Run the backend server:
python run.py
- Navigate to the
frontenddirectory:cd frontend - Install the required packages:
npm install
- Start the frontend development server:
npm start
-
Ensure the backend server is running.
-
Open your web browser and navigate to
http://localhost:3000.
-
Enter a city name and click "Get Weather" to view the weather information.
This project is licensed under the MIT License. See the LICENSE file for details.
- React JS Tutorial – Build a Weather App With Cities Autocomplete
- Professional Weather App with Django in Python
- How To Make Weather App Using React JS 2024 | Weather API React Project Tutorial
- React Tutorial
- React Js Tutorial for beginners in Tamil 2024 |Full Course for Beginners |Basic to Advanced concepts