An intelligent weather forecasting application that combines real-time weather data with AI-powered insights. Built with React, Vite, and powered by WeatherAPI and Google Gemini AI.
- 🌤️ Real-time weather data from WeatherAPI
- 🤖 AI-powered weather insights using Google Gemini
- 🎨 Dynamic UI with temperature-based background colors
- 🔍 City search functionality
- 📱 Responsive design for all devices
- ⚡ Fast development with Vite
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher)
- npm, yarn, or pnpm
- WeatherAPI key (free at weatherapi.com)
- Google Gemini API key (free at Google AI Studio)
-
Clone the repository:
git clone https://github.com/x0lg0n/AI-Weather-App.git cd ai-weather-app -
Install dependencies:
pnpm install # or npm install # or yarn install
-
Create a
.envfile in the root directory with your API keys:VITE_WEATHER_API_KEY=your_weatherapi_key_here VITE_GEMINI_API_KEY=your_google_gemini_key_here
-
Start the development server:
pnpm dev # or npm run dev # or yarn dev
-
Open your browser to
http://localhost:5173
pnpm dev- Starts the development serverpnpm build- Builds the app for productionpnpm preview- Previews the production build locallypnpm lint- Runs ESLint
src/
├── components/
│ └── Siderbar.jsx
├── App.jsx
├── index.css
├── main.jsx
└── utils.js
- React 19 - Frontend library
- Vite 7 - Build tool and development server
- Tailwind CSS - Utility-first CSS framework
- WeatherAPI - Weather data provider
- Google Generative AI - For AI-powered weather insights
- Axios - HTTP client
- Lucide React - Icon library
- Framer Motion - Animation library
- Users enter a city name in the search bar
- The app fetches current weather data from WeatherAPI
- Weather data is displayed in an attractive dashboard with dynamic background colors
- Google Gemini AI generates personalized weather insights and outfit suggestions
- Additional weather metrics like humidity, wind speed, and "feels like" temperature are shown
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Weather data provided by WeatherAPI
- AI insights powered by Google Gemini
- UI built with Tailwind CSS
- Icons from Lucide