A beautiful and functional weather app built using React and TypeScript.
Live Demo: React Weather App
- Search Preview: Real-time search results for cities.
- Location Fetching: Automatically fetches your current location.
- Dark/Light Mode: User preference for light or dark theme.
- Multi-language Support: Available in German and English.
- Time Format Switching: Choose between 12-hour and 24-hour formats.
- Unit System Options: Supports Metric, Imperial, and Kelvin units.
- Comprehensive Forecasts: Detailed 3-hourly updates and 5-day outlook.
- Additional Metrics: Includes air pressure, humidity, and more.
- React
- TypeScript
- OpenWeather API
- GeoDB API
- React Leaflet with ThunderForest API
-
Clone the repository:
git clone https://github.com/sebastian-sonne/react-weather-app.git cd react-weather-app
-
Install the dependencies:
npm install
-
Obtain API keys:
Note: Both APIs offer a free tier, meaning you don't need the paid option.
-
Create a
.env
file in the root directory and add your API keys:REACT_APP_OPEN_WEATHER_API_KEY=your_openweather_api_key REACT_APP_X_RapidAPI_Key=your_geodb_api_key REACT_APP_X_RapidAPI_Host=your_geodb_host
-
Run the application:
npm run dev
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License.