Skip to content

Krishnx21/Weather

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌀️ Weather App

A modern, elegant weather application built with React and Redux that provides real-time weather information and forecasts for any location worldwide.

Weather App Redux Toolkit Vite

✨ Features

  • 🌍 Location-Based Weather: Automatically detects your current location and displays local weather
  • πŸ” City Search: Search for weather information in any city worldwide
  • πŸ“Š Weather Charts: Visual representation of temperature and weather trends
  • πŸ“… 7-Day Forecast: Detailed daily weather forecasts
  • 🎨 Modern UI: Clean, responsive design with beautiful typography
  • ⚑ Fast Performance: Built with Vite for lightning-fast development and production builds
  • 🌑️ Detailed Metrics: Temperature, humidity, wind speed, and more

πŸš€ Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn package manager

Installation

  1. Clone the repository

    git clone https://github.com/Krishnx21/Weather.git
    cd Weather
  2. Install dependencies

    npm install
  3. Start the development server

    npm run dev
  4. Open your browser

    Navigate to http://localhost:5173 (or the port shown in your terminal)

πŸ“¦ Build for Production

To create an optimized production build:

npm run build

To preview the production build locally:

npm run preview

πŸ› οΈ Tech Stack

Frontend Framework

  • React 18.2.0 - Modern UI library with hooks
  • React DOM 18.2.0 - React rendering for web

State Management

  • Redux Toolkit 2.0.1 - Simplified Redux state management
  • React Redux 9.0.4 - Official React bindings for Redux

Build Tool

  • Vite 5.0.8 - Next-generation frontend tooling
  • @vitejs/plugin-react 4.2.1 - Official React plugin for Vite

Styling

  • Custom CSS with modern design principles
  • Google Fonts (DM Sans & Instrument Serif)

API

  • Open-Meteo API - Free weather API for real-time weather data

πŸ“ Project Structure

Weather/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”œβ”€β”€ CurrentWeather.jsx
β”‚   β”‚   β”œβ”€β”€ CurrentWeather.css
β”‚   β”‚   β”œβ”€β”€ Forecast.jsx
β”‚   β”‚   β”œβ”€β”€ Forecast.css
β”‚   β”‚   β”œβ”€β”€ SearchBar.jsx
β”‚   β”‚   β”œβ”€β”€ SearchBar.css
β”‚   β”‚   β”œβ”€β”€ WeatherChart.jsx
β”‚   β”‚   └── WeatherChart.css
β”‚   β”œβ”€β”€ store/              # Redux store and slices
β”‚   β”‚   └── weatherSlice.js
β”‚   β”œβ”€β”€ utils/              # Utility functions
β”‚   β”œβ”€β”€ App.jsx             # Main App component
β”‚   β”œβ”€β”€ App.css             # App styles
β”‚   β”œβ”€β”€ main.jsx            # Application entry point
β”‚   └── index.css           # Global styles
β”œβ”€β”€ index.html              # HTML template
β”œβ”€β”€ package.json            # Project dependencies
β”œβ”€β”€ vite.config.js          # Vite configuration
└── README.md               # Project documentation

🎯 Key Components

SearchBar

Allows users to search for weather in any city. Features a clean input design with search functionality.

CurrentWeather

Displays the current weather conditions including:

  • Temperature
  • Weather description
  • Location name
  • Local time

Forecast

Shows a 7-day weather forecast with daily high/low temperatures and weather conditions.

WeatherChart

Visual chart representation of weather data trends over time.

πŸ”§ Configuration

Vite Configuration

The project uses Vite with React plugin. Configuration can be modified in vite.config.js.

Redux Store

State management is handled through Redux Toolkit. The weather slice manages:

  • Weather data fetching
  • Loading states
  • Error handling
  • Location information

🌐 API Integration

This app uses the Open-Meteo API for weather data:

  • No API key required
  • Free and open-source
  • Reliable weather forecasts
  • Global coverage

πŸ“± Responsive Design

The application is fully responsive and works seamlessly across:

  • πŸ’» Desktop computers
  • πŸ“± Mobile phones
  • πŸ“² Tablets

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is open source and available under the MIT License.

πŸ‘¨β€πŸ’» Author

Krishnx21

πŸ™ Acknowledgments

  • Weather data provided by Open-Meteo
  • Icons and design inspiration from modern weather applications
  • Built with ❀️ using React and Redux

πŸ“ž Support

If you have any questions or run into issues, please open an issue on GitHub.


Made with β˜€οΈ and ❄️ by Krishnx21

About

Weather forecasting web application that fetches real-time weather data using API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors